From 861bbbbe12f657cbb561d0f854f31750f1ca876b Mon Sep 17 00:00:00 2001 From: Sebastian Weddmark Olsson Date: Tue, 23 Jul 2024 10:52:39 +0200 Subject: [PATCH] Only execute wzpaper if $WZPAPER_PATH exist remove the negation of the `-e` conditional; checks if file exist before executing wzpaper --- screenz | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/screenz b/screenz index 7b385d9..8550dfc 100755 --- a/screenz +++ b/screenz @@ -154,7 +154,7 @@ while [[ 1 ]]; do sed -i '1d' $CONFIG_FILE sed -i 1i"${line[0]}" $CONFIG_FILE xrandr --output ${line[0]} --auto --$position $main_screen - if [[ ! -e $WZPAPER_PATH ]]; then + if [[ -e $WZPAPER_PATH ]]; then killall wzpaper > /dev/null 2>&1 wzpaper -p 0.25 fi @@ -213,7 +213,7 @@ while [[ 1 ]]; do if [[ $answer == "left-of" ]] || [[ $answer == "right-of" ]] || [[ $answer == "above" ]] || [[ $answer == "below" ]]; then xrandr --output $selected_output --auto --$answer $main_screen echo -e "$selected_output is on the $answer side of your main screen" - if [[ ! -e $WZPAPER_PATH ]]; then + if [[ -e $WZPAPER_PATH ]]; then killall wzpaper > /dev/null 2>&1 wzpaper -p 0.25 fi @@ -257,4 +257,4 @@ case $1 in exit 84 ;; esac -exit 0 \ No newline at end of file +exit 0