From e3010396f9fe7b0091b4286653b3fb96104f8df8 Mon Sep 17 00:00:00 2001 From: Emmet Date: Fri, 6 Oct 2023 18:09:13 -0500 Subject: [PATCH] Auto desktop notification mute while obs open --- user/wm/hyprland/hyprland.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/user/wm/hyprland/hyprland.nix b/user/wm/hyprland/hyprland.nix index 8e328c9..057f402 100644 --- a/user/wm/hyprland/hyprland.nix +++ b/user/wm/hyprland/hyprland.nix @@ -34,6 +34,7 @@ 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 = obs-notification-mute-daemon exec = ~/.swaybg-stylix @@ -293,6 +294,16 @@ killall wlsunset &> /dev/null; 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" '' #!/bin/sh # from https://github.com/taylor85345/hyprland-dotfiles/blob/master/hypr/scripts/workspace