diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2022-03-06 21:36:37 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2022-03-06 21:36:37 +0530 |
commit | 6537eef95bb9067d0f20574a3f4f5f00f90cc4eb (patch) | |
tree | 26d5ac6eb0830ad523818ae1a86daf0591338349 /scripts/setbg | |
parent | f23cfa36053e25466b4bb0263c74e0a0ecfd76d2 (diff) |
updating old scripts
Diffstat (limited to 'scripts/setbg')
-rwxr-xr-x[-rw-r--r--] | scripts/setbg | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/setbg b/scripts/setbg index d94e64b..f267a3a 100644..100755 --- a/scripts/setbg +++ b/scripts/setbg @@ -1,11 +1,17 @@ #!/bin/sh -echo "Chosing a random wallpaper..." -wall=$(find $HOME/Pictures/Wallpaper/w/wow -type f | shuf -n 1) -echo "Setting up the wallpaper: $(echo $wall|cut -d '/' -f 8)" -xwallpaper --zoom $wall +if [ -z "$1" ]; then + echo "Chosing a random wallpaper..." + wall=$(find $HOME/Pictures/Wallpaper/w/wow -type f | shuf -n 1) + echo "Setting up the wallpaper: $(echo $wall|cut -d '/' -f 8)" +else + wall="$1" +fi + +echo "Setting up the wallpaper: $(echo $wall)" +xwallpaper --zoom $wall && echo "Generating pywal color schemes..." -wal -n -i $wall >/dev/null +wal -n -i $wall >/dev/null && echo "dwm reading Xresources color values at runtime" xdotool key super+F5 pywal-discord |