[zsh:wp] add restore functionality

legacy
Simon Bruder 2019-02-11 22:05:10 +00:00
parent 4f88b04ea4
commit 54def17385
No known key found for this signature in database
GPG Key ID: 6F03E0000CC5B62F
1 changed files with 4 additions and 1 deletions

View File

@ -121,7 +121,7 @@ function timer() {
function wp() {
(
if [ -z "$1" ] || ([ "$1" = "rand" ] && [ -z "$2" ]); then
echo "USAGE: $0 rand|default [path]"
echo "USAGE: $0 rand|restore|default [path]"
return 1
fi
if [ "$1" = "default" ];then
@ -132,6 +132,9 @@ function wp() {
rand=$(shuf -n1 -e $base/$2/*)
[ -z "$rand" ] || feh --bg-fill "$rand"
fi
if [ "$1" = "restore" ]; then
~/.fehbg
fi
)
}