From 96001998eb3ea26c556dd9151f74c7812eaae25a Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Tue, 27 Dec 2022 18:21:59 +0530 Subject: setbg - Double quote to prevent globbing and word splitting --- .scripts/setbg | 12 ++++++------ 1 file 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" -- cgit v1.2.3