From 6537eef95bb9067d0f20574a3f4f5f00f90cc4eb Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Sun, 6 Mar 2022 21:36:37 +0530 Subject: updating old scripts --- scripts/setbg | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) mode change 100644 => 100755 scripts/setbg (limited to 'scripts/setbg') diff --git a/scripts/setbg b/scripts/setbg old mode 100644 new mode 100755 index d94e64b..f267a3a --- 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 -- cgit v1.2.3