From 54bc8ead039957cdbf63f2f0a6b57955fbf8cd68 Mon Sep 17 00:00:00 2001 From: luke bonham Date: Sun, 1 Feb 2015 11:04:01 +0100 Subject: [PATCH 1/3] #76 fix --- switch-theme.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/switch-theme.sh b/switch-theme.sh index dcd2163..430510d 100755 --- a/switch-theme.sh +++ b/switch-theme.sh @@ -1,10 +1,12 @@ #! /usr/bin/make -f # Awesome Copycats switch theme script -# It also updates to latest commit. +# +# It also updates to latest commit and +# backups previous rc.lua. +# # Dependencies: make, git - DESTDIR=~/.config/awesome PROJECT=copycat-killer/awesome-copycats @@ -14,9 +16,12 @@ define swap_dialog echo "see https://github.com/$(PROJECT)" ; \ echo ; $(themes) | cat -n ; echo ; \ typeset -i num; \ - read -p "Switch to theme: " num ; \ + : + :x + :x 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 ; \ cp $${NEW_THEME} rc.lua ; \ echo "Theme is now $${NEW_THEME}"; \ else echo " !! Aborted. " ; fi From aed5810f60badd1d66f0d236e4e10bbf9dd98177 Mon Sep 17 00:00:00 2001 From: luke bonham Date: Sun, 1 Feb 2015 11:47:07 +0100 Subject: [PATCH 2/3] lain: new commit --- lain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lain b/lain index 75db055..925c027 160000 --- a/lain +++ b/lain @@ -1 +1 @@ -Subproject commit 75db05552172584c57624b853384fa1a79acfcfb +Subproject commit 925c0276a567c35bb3cf140aedc368b9a6e152db From 2e547e836de224601352231515e264e143c34ff1 Mon Sep 17 00:00:00 2001 From: luke bonham Date: Sun, 1 Feb 2015 12:01:29 +0100 Subject: [PATCH 3/3] switch-theme.sh: vim typos removed --- switch-theme.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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