From 54def17385642dbad8890372a4fccf91751ad232 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 11 Feb 2019 22:05:10 +0000 Subject: [PATCH] [zsh:wp] add restore functionality --- home/.zshrc.local | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/home/.zshrc.local b/home/.zshrc.local index 45a3761..301ced5 100644 --- a/home/.zshrc.local +++ b/home/.zshrc.local @@ -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 ) }