Replies: 2 comments
-
Anyone have a solution for this? 🙃 |
Beta Was this translation helpful? Give feedback.
0 replies
-
This script doesn't reply exactly to your needs but could give you an idea on how to set this up. It listen to a socket for If you find a way in sway to detect when have a fullscreen application, you should be able to adapt this script. #!/bin/sh
toggleNotifications () {
# Extract the first number after >>
state=$(echo "$1" | cut -d'>' -f3 | cut -d',' -f1)
if [ "$state" -eq 1 ]; then
echo "🎥 Screencast started"
swaync-client --inhibitor-add "xdg-desktop-portal-wlr"
swaync-client --dnd-on
else
echo "🛑 Screencast stopped"
swaync-client --inhibitor-remove "xdg-desktop-portal-wlr"
swaync-client --dnd-off
fi
}
handle() {
case $1 in
screencast*) toggleNotifications $1 ;;
esac
}
socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to inhibit notifications when I'm viewing a fullscreen application in Sway, because notifications popping up over game windows is causing stutters. How can I do this?
Beta Was this translation helpful? Give feedback.
All reactions