aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-03-26 08:54:55 +0100
committerache <ache@ache.one>2019-03-26 08:54:55 +0100
commitd43b829fa5f0564f33ac5cb5eb2fe43189c8717a (patch)
tree40be13d8e8f7c5f70a2354f49bed025a2dad5e17
parentWayland compatible (diff)
Save a Wallpaper
-rwxr-xr-xautoWall.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/autoWall.sh b/autoWall.sh
index b3df352..7e17b82 100755
--- a/autoWall.sh
+++ b/autoWall.sh
@@ -8,6 +8,14 @@ if [ -n "$WAYLAND_DISPLAY" ] ; then
cmd='swaymsg output "*" background %s fill'
fi
+if [ -e ~/.savedWall ] ; then
+ wall=$(cat ~/.savedWall)
+ cmd=$(printf "${cmd}" ${wall})
+ echo ${cmd}
+ eval ${cmd}
+ exit
+fi
+
for action in $@
do
if [ ${action:0:1} = "+" ]
@@ -27,6 +35,16 @@ do
done
echo
fi
+ if [ ${action} = "save" ]
+ then
+ cp ~/.actWall ~/.savedWall
+ exit
+ fi
+ if [ ${action} = "unsave" ]
+ then
+ rm ~/.savedWall
+ exit
+ fi
if [ ${action:0:1} = "-" ]
then
if [ -d ${wallDir}/${action:1} ]