From d43b829fa5f0564f33ac5cb5eb2fe43189c8717a Mon Sep 17 00:00:00 2001 From: ache Date: Tue, 26 Mar 2019 08:54:55 +0100 Subject: Save a Wallpaper --- autoWall.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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} ] -- cgit v1.2.3