dotfiles

Cem's Dotfiles
git clone git://git.ckyln.com/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

wallset (505B)


      1 #!/usr/bin/env sh
      2 
      3 die() { printf "==> ERROR: $1\\n"; exit 1; }
      4 
      5 [ -e "$HOME/.night" ] || die "Could not find $HOME/.night"
      6 . "$HOME/.night"
      7 [ "$NIGHT" = "1" ] && nightmode="Night" || nightmode="Morning"
      8 selection="$(find "$HOME/Pictures/Wallpapers/$nightmode" -maxdepth 1 -name '*.jpg' -type f -printf "%f\n" | dmenu -l 10)"
      9 [ -z "$selection" ] && die "no selection was made"
     10 feh --bg-fill "$HOME/Pictures/Wallpapers/$nightmode/$selection"
     11 notify-send 'New wallpaper' 'Your wallpaper has been changed !'