themeswitch (439B)
1 #!/usr/bin/env bash 2 3 usage () { 4 printf "usage: themeswitch <dark|light>\n" 5 exit 1 6 } 7 8 theme="$1" 9 10 [ -z "$theme" ] && usage 11 [ "$theme" != "dark" ] && [ "$theme" != "light" ] && usage 12 13 termcolor "$theme" & 14 pkill --signal SIGUSR1 xmonad 15 switch-term-themes "$theme" & 16 17 if [ "$theme" == "light" ]; then 18 feh --bg-fill ~/var/img/wallpapers/wireframe-deer-white.jpg & 19 else 20 feh --bg-fill ~/var/img/wallpapers/red-low-poly.png & 21 fi 22 23 wait