Auto desktop notification mute while obs open

This commit is contained in:
Emmet 2023-10-06 18:09:13 -05:00
parent 7f3ff1f798
commit e3010396f9

View file

@ -34,6 +34,7 @@
exec-once = emacs --daemon exec-once = emacs --daemon
exec-once = swayidle -w timeout 300 'gtklock -d' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep "gtklock -d" exec-once = swayidle -w timeout 300 'gtklock -d' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep "gtklock -d"
exec-once = obs-notification-mute-daemon
exec = ~/.swaybg-stylix exec = ~/.swaybg-stylix
@ -293,6 +294,16 @@
killall wlsunset &> /dev/null; killall wlsunset &> /dev/null;
fi fi
'') '')
(pkgs.writeScriptBin "obs-notification-mute-daemon" ''
#!/bin/sh
while true; do
if pgrep -x .obs-wrapped > /dev/null;
then pkill -STOP fnott;
else pkill -CONT fnott;
fi
sleep 10;
done
'')
(pkgs.writeScriptBin "hyprworkspace" '' (pkgs.writeScriptBin "hyprworkspace" ''
#!/bin/sh #!/bin/sh
# from https://github.com/taylor85345/hyprland-dotfiles/blob/master/hypr/scripts/workspace # from https://github.com/taylor85345/hyprland-dotfiles/blob/master/hypr/scripts/workspace