summaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-12-27 18:21:59 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-12-27 18:21:59 +0530
commit96001998eb3ea26c556dd9151f74c7812eaae25a (patch)
tree656f28ae09f7971803ee7fb712ca7b8a3a54e851 /.scripts
parente28616baf4a94e352a73b909a4f82b043fbd9284 (diff)
setbg - Double quote to prevent globbing and word splitting
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/setbg12
1 files changed, 6 insertions, 6 deletions
diff --git a/.scripts/setbg b/.scripts/setbg
index 6681c9f..01676a4 100755
--- a/.scripts/setbg
+++ b/.scripts/setbg
@@ -3,16 +3,16 @@
walldir="$HOME/pix/Wallpaper/w/wow"
if [ -z "$1" ]; then
echo "Chosing a random wallpaper..."
- wall=$(find $walldir -type f | shuf -n 1)
- echo "Setting up the wallpaper: $(echo $wall|cut -d '/' -f 8)"
+ wall=$(find "$walldir" -type f | shuf -n 1)
+ echo "Setting up the wallpaper: $(echo "$wall" |cut -d '/' -f 8)"
else
- wall="$1"
+ wall="$1"
fi
-echo "Setting up the wallpaper: $(echo $wall)"
-xwallpaper --zoom $wall &&
+echo "Setting up the wallpaper: $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
[[ $(ps -u $USER -o comm | grep "telegram") = "telegram-deskto" ]] && r="-r"