From: Siraaj Khandkar Date: Sun, 23 Jan 2022 21:57:43 +0000 (-0500) Subject: Support setting current X-Git-Url: https://git.xandkar.net/?p=khome.git;a=commitdiff_plain;h=ddd3f2511171abed8c071ff0794b518792f44570 Support setting current --- diff --git a/home/bin/wallpapers_preview b/home/bin/wallpapers_preview index c859451..34d98d7 100755 --- a/home/bin/wallpapers_preview +++ b/home/bin/wallpapers_preview @@ -17,6 +17,7 @@ read_command() { l | L) echo 'CMD_MOVE_FORWARD';; f | F) echo 'CMD_FAVORITE_ADD';; r | R) echo 'CMD_FAVORITE_REMOVE';; + s | S) echo 'CMD_SET_CURRENT';; *) echo 'CMD_UKNOWN';; esac } @@ -84,6 +85,9 @@ paths_preview() { | sort -u \ | sponge "$FILE_WALLPAPER_FAVS" ;; + CMD_SET_CURRENT) + printf 'Setting as current: "%s"\n' "$path" >&2 + echo "$path" > "$FILE_WALLPAPER_CURR";; CMD_UKNOWN) continue;; esac