Skip to content

Commit

Permalink
video-wall-select: account for empty input
Browse files Browse the repository at this point in the history
  • Loading branch information
wizzdom committed Jan 3, 2024
1 parent bbd5511 commit 54f1f01
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions video-wall-select.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ LIST_FILE="/tmp/video-wallpapers"
SELECTED=$(cat $LIST_FILE | $DMENU -i -p "Select a video wallpaper")

# Set the selected video as default wallpaper
if [ -f "$DEFAULT" ]; then
rm -f "$DEFAULT"
if [ "$SELECTED" ]; then
if [ -f "$DEFAULT" ]; then
rm -f "$DEFAULT"
fi
fi

ln -sf "$SELECTED" "$DEFAULT"
Expand Down

0 comments on commit 54f1f01

Please sign in to comment.