diff --git a/switch-theme.sh b/switch-theme.sh index 430510d..5cfb9d7 100755 --- a/switch-theme.sh +++ b/switch-theme.sh @@ -1,12 +1,10 @@ #! /usr/bin/make -f # Awesome Copycats switch theme script -# -# It also updates to latest commit and -# backups previous rc.lua. -# +# It also updates to latest commit. # Dependencies: make, git + DESTDIR=~/.config/awesome PROJECT=copycat-killer/awesome-copycats @@ -16,12 +14,10 @@ define swap_dialog echo "see https://github.com/$(PROJECT)" ; \ echo ; $(themes) | cat -n ; echo ; \ typeset -i num; \ - : - :x - :x + read -p "Switch to theme: " num ; \ if [ ! -z $${num} -a $${num} -ge 1 -a -le $${n_themes} ] ; then \ NEW_THEME=$$($(themes) | head -n$${num} | tail -n1 ) ; \ - mv --backup=numbered rc.lua rc.lua.previous ; \ + mv --backup=numbered rc.lua rc.lua.previous ; \ cp $${NEW_THEME} rc.lua ; \ echo "Theme is now $${NEW_THEME}"; \ else echo " !! Aborted. " ; fi