local/bin/wall

   1 #!/bin/bash
   2 
   3 if [[ $@ == -* ]]; then
   4     [[ $1 == -i && -f $2 ]] && $0 "$2"
   5     [[ $1 == -R ]] && $0 ~/.config/wallpaper.jpg
   6 
   7     wal -o $0 --vte "$@"
   8 elif [[ -f $1 ]]; then
   9     hsetroot -fill "$1"
  10     cp "$1" ~/.config/wallpaper.jpg
  11     gsettings set org.gnome.desktop.background picture-uri file://$_
  12 fi
  13 
  14 [[ $@ ]] && exit
  15 
  16 wal=~/.cache/wal
  17 source $wal/colors.sh
  18 
  19 sed -i 's/\\ec//' $wal/colors-tty.sh
  20 sed -i "s/12;$cursor/12;$foreground/" $wal/sequences
  21 
  22 xrdb -merge $wal/*.Xresources
  23 i3-msg reload
  24 pkill -USR1 polybar
  25 
  26 mkdir -p ~/.local/share/themes/wal/xfce-notify-4.0
  27 pushd $_
  28 ln -s $wal/notifyd.css gtk.css
  29 ln -s $wal/notifyd.gtkrc gtkrc
  30 popd
  31 pkill -USR1 xfce4-notifyd
  32 
  33 rm ~/.config/dunst/dunstrc
  34 cat ~/.dotfiles/config/dunst/dunstrc $wal/dunst.conf $_ > $_
  35 killall dunst