check for notify-send in sway-screen-menu

This commit is contained in:
rileyrg 2021-05-23 18:55:30 +02:00
parent 1b539cf1de
commit ee6a13375d
3 changed files with 3 additions and 3 deletions

View file

@ -1632,7 +1632,7 @@ if [ ! -z "$SCREEN" ]; then
ENABLED="$(zenity --list --title "Enable ${SCREEN}?" --text "" --radiolist --column "Pick" --column "Enabled" TRUE enable FALSE disable)"
if [ ! -z "$ENABLED" ]; then
swaymsg "output $SCREEN $ENABLED"
(sleep 0.5 && notify-send -t 3000 "$SCREEN:$ENABLED") &
command -v notify-send &> /dev/null && (sleep 0.5 && notify-send -t 3000 "$SCREEN:$ENABLED") &
fi
fi
```

View file

@ -5,6 +5,6 @@ if [ ! -z "$SCREEN" ]; then
ENABLED="$(zenity --list --title "Enable ${SCREEN}?" --text "" --radiolist --column "Pick" --column "Enabled" TRUE enable FALSE disable)"
if [ ! -z "$ENABLED" ]; then
swaymsg "output $SCREEN $ENABLED"
(sleep 0.5 && notify-send -t 3000 "$SCREEN:$ENABLED") &
command -v notify-send &> /dev/null && (sleep 0.5 && notify-send -t 3000 "$SCREEN:$ENABLED") &
fi
fi

View file

@ -2076,7 +2076,7 @@ Just a gathering place of locky/suspendy type things...
ENABLED="$(zenity --list --title "Enable ${SCREEN}?" --text "" --radiolist --column "Pick" --column "Enabled" TRUE enable FALSE disable)"
if [ ! -z "$ENABLED" ]; then
swaymsg "output $SCREEN $ENABLED"
(sleep 0.5 && notify-send -t 3000 "$SCREEN:$ENABLED") &
command -v notify-send &> /dev/null && (sleep 0.5 && notify-send -t 3000 "$SCREEN:$ENABLED") &
fi
fi
#+end_src