diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-05-10 00:18:43 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-05-10 00:18:43 +0200 |
commit | fcdb68fc3e2e7f082c74237153f70e714009077c (patch) | |
tree | 15b9383f1ac708893a7ba4a7aedd455f887b0960 | |
parent | 7584bcba18b8236a10e3833140de09ad5e7c83a1 (diff) |
use variable for favorites dir
-rwxr-xr-x | bin/guiscripts/favwal | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/guiscripts/favwal b/bin/guiscripts/favwal index 4be5c9c..f3222a2 100755 --- a/bin/guiscripts/favwal +++ b/bin/guiscripts/favwal @@ -1,8 +1,10 @@ #!/bin/sh pics="$(xdg-user-dir PICTURES)" -mkdir -p "${pics:=$HOME/pics}/favorites" +favs="wallpapers/favorites" + +mkdir -p "${pics:=$HOME/pics}/$favs" wal="$(realpath "$pics/wallpaper")" -diff "$wal" "$pics/favorites/$(realpath "$wal" | xargs basename)" > /dev/null 2>&1 && +diff "$wal" "$pics/$favs/$(realpath "$wal" | xargs basename)" > /dev/null 2>&1 && exit -cp "$wal" "$pics/favorites" +cp "$wal" "$pics/$favs" echo "$wal" |