.xinitrc (704B)
1 #!/bin/rc 2 3 host = `{hostname} 4 # wm = `{printf 'dwm\nbspwm\n' | dmenu -i} 5 wm = bspwm 6 7 $host^/displays 8 9 xrdb $home/.local/xres & 10 setxkbmap haydenh & 11 $host^/keyboard & 12 xmodmap -e 'keysym Control_R = Multi_key' & 13 st & 14 15 # while (inotifywait -e close /sys/class/drm/card0*) { 16 # $host^/displays 17 # bspwm/configure-monitors 18 # } & 19 20 switch ($wm) { 21 case dwm 22 dwmbar/dwmbar & 23 sxhkd & 24 25 while (dwm > /tmp/dwm-log) { 26 true 27 } 28 29 pkill dwmbar 30 case bspwm 31 sxhkd $home/.config/bspwm/keys & 32 # give hbspbar a moment because it needs to connect to bspwm 33 @{ 34 sleep 1 35 hbspbar & 36 } 37 bspwm > /tmp/bspwm-log 38 case * 39 if (command -v $wm >/dev/null) { 40 $wm 41 } else { 42 echo 'No such window manager or program: ' ^ $wm 43 } 44 } 45