From cc066488a885120d79413705754a87f88ba8813b Mon Sep 17 00:00:00 2001 From: Hekuran <62762955+narukeh@users.noreply.github.com> Date: Sat, 16 May 2020 16:43:34 +0200 Subject: [PATCH] an option to only change the aspect ratio if you quickly want to only change how the bg covers your screen --- .local/bin/setbg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.local/bin/setbg b/.local/bin/setbg index 5f70fa54..a3c0c4af 100755 --- a/.local/bin/setbg +++ b/.local/bin/setbg @@ -9,7 +9,8 @@ # Location of link to wallpaper link. bgloc="${XDG_DATA_HOME:-$HOME/.local/share/}/bg" -[ -f "$1" ] && ln -sf "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..." +[ -f "$1" ] && ln -sf "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..." || + { [ -n "$1" ] && xwallpaper --"$1" "$bgloc" && exit 1;} [ -d "$1" ] && ln -sf "$(find "$(readlink -f "$1")" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random Wallpaper chosen."