migrated dots setup

This commit is contained in:
2023-02-24 16:56:31 +01:00
commit 04560bb475
37 changed files with 11091 additions and 0 deletions

66
dwm/.xinitrc Normal file
View File

@@ -0,0 +1,66 @@
#!/bin/sh
# screenlayout setup for odin
$HOME/.screenlayout/main.sh
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
# shellcheck source=/dev/null
[ -x "$f" ] && . "$f"
done
unset f
fi
xset -b # disable bell
# ssh agent setup
eval `/usr/bin/ssh-agent`
if test -f /usr/lib/openssh/x11-ssh-askpass # Archlinux
then
SSH_ASKPASS=/usr/lib/openssh/x11-ssh-askpass ssh-add < /dev/null
fi
if test -f /usr/lib/ssh/x11-ssh-askpass # Debian
then
SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass ssh-add < /dev/null
fi
# some merges
xsetroot -cursor_name left_ptr &
export GTK2_RC_FILES="$HOME/.gtkrc-2.0" &
xrdb merge .Xresources &
# compositor
picom -b --vsync &
# set keyboard layout
setxkbmap pl &
# enable local fonts in .fonts directory
xset +fp /usr/share/fonts/local &
xset +fp /usr/share/fonts/misc &
xset +fp ~/.fonts &
xset fp rehash &
fc-cache -fv &
# powersaving options
xset s off &
xset s noblank &
xset s noexpose &
xset c on &
xset -dpms &
# auths
/usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &
gnome-keyring-daemon &
# wallpapers
nitrogen --restore &
# notification daemon
dunst &
# start dwm
exec dwm

49
dwm/xinitrc.example Normal file
View File

@@ -0,0 +1,49 @@
#!/bin/bash
# Taken from:
# https://raw.github.com/kaihendry/Kai-s--HOME/master/.xinitrc
#
# for terminus font in Archlinux :(
xset +fp /usr/share/fonts/local
xset fp rehash
xset -b # disable bell
eval `/usr/bin/ssh-agent`
if test -f /usr/lib/openssh/x11-ssh-askpass # Archlinux
then
SSH_ASKPASS=/usr/lib/openssh/x11-ssh-askpass ssh-add < /dev/null
fi
if test -f /usr/lib/ssh/x11-ssh-askpass # Debian
then
SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass ssh-add < /dev/null
fi
# 1280x720 = 720p X220
hash fswebcam && fswebcam -q --no-banner -r 1280x720 ~/private/login-photos/$(date +%Y-%m-%dT%H).jpg &
xrdb -merge $HOME/.Xresources
xmodmap ~/.Xmodmap
setxkbmap -layout gb -option ctrl:nocaps
hash chromium && chromium &
while true
do
VOL=$(amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/')
LOCALTIME=$(date +%Z\=%Y-%m-%dT%H:%M)
OTHERTIME=$(TZ=Europe/London date +%Z\=%H:%M)
IP=$(for i in `ip r`; do echo $i; done | grep -A 1 src | tail -n1) # can get confused if you use vmware
TEMP="$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))C"
if acpi -a | grep off-line > /dev/null
then
BAT="Bat. $(acpi -b | awk '{ print $4 " " $5 }' | tr -d ',')"
xsetroot -name "$IP $BAT $VOL $TEMP $LOCALTIME $OTHERTIME"
else
xsetroot -name "$IP $VOL $TEMP $LOCALTIME $OTHERTIME"
fi
sleep 20s
done &
exec dwm