From c74585443be72099c9c2093a8f5b4738153f7cdf Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 17 Feb 2026 17:38:38 -0800 Subject: [PATCH] feat(rumno): tune notification rules and timeout handling --- dotfiles/config/hypr/hyprland.conf | 18 ++++++++---------- dotfiles/lib/bin/brightness.hs | 3 ++- dotfiles/lib/bin/brightness.sh | 3 ++- dotfiles/lib/functions/pashowvolume | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dotfiles/config/hypr/hyprland.conf b/dotfiles/config/hypr/hyprland.conf index a414f67a..b71230b8 100644 --- a/dotfiles/config/hypr/hyprland.conf +++ b/dotfiles/config/hypr/hyprland.conf @@ -218,16 +218,14 @@ windowrule = match:title ^(Confirm)$, float on # Rumno OSD/notifications: treat as an overlay, not a "real" managed window. # (Matches both class and title because rumno may set either depending on backend.) -windowrulev2 = float, class:.*[Rr]umno.* -windowrulev2 = pin, class:.*[Rr]umno.* -windowrulev2 = noborder, class:.*[Rr]umno.* -windowrulev2 = noshadow, class:.*[Rr]umno.* -windowrulev2 = noinitialfocus, class:.*[Rr]umno.* -windowrulev2 = float, title:.*[Rr]umno.* -windowrulev2 = pin, title:.*[Rr]umno.* -windowrulev2 = noborder, title:.*[Rr]umno.* -windowrulev2 = noshadow, title:.*[Rr]umno.* -windowrulev2 = noinitialfocus, title:.*[Rr]umno.* +windowrule = match:class ^(.*[Rr]umno.*)$, float on +windowrule = match:class ^(.*[Rr]umno.*)$, pin on +windowrule = match:class ^(.*[Rr]umno.*)$, decorate off +windowrule = match:class ^(.*[Rr]umno.*)$, no_shadow on +windowrule = match:title ^(.*[Rr]umno.*)$, float on +windowrule = match:title ^(.*[Rr]umno.*)$, pin on +windowrule = match:title ^(.*[Rr]umno.*)$, decorate off +windowrule = match:title ^(.*[Rr]umno.*)$, no_shadow on # Scratchpad sizing handled by hyprscratch exec rules (see hyprland.nix) # Using hyprscratch rules instead of windowrule to avoid affecting child windows (e.g. Slack meets) diff --git a/dotfiles/lib/bin/brightness.hs b/dotfiles/lib/bin/brightness.hs index 7d7b4b66..9e099ed6 100755 --- a/dotfiles/lib/bin/brightness.hs +++ b/dotfiles/lib/bin/brightness.hs @@ -130,11 +130,12 @@ getAverageBrightness = do -- Send notification using rumno if available sendNotification :: Int -> IO () sendNotification brightness = do + let timeoutSeconds = "2.5" rumnoExists <- (== ExitSuccess) <$> rawSystem "sh" ["-c", "command -v rumno >/dev/null 2>&1"] if rumnoExists then do - _ <- readProcess "rumno" ["notify", "-b", show brightness] "" + _ <- readProcess "rumno" ["notify", "-t", timeoutSeconds, "-b", show brightness] "" return () else putStrLn (show brightness) diff --git a/dotfiles/lib/bin/brightness.sh b/dotfiles/lib/bin/brightness.sh index 69f73bf7..4283e0e3 100755 --- a/dotfiles/lib/bin/brightness.sh +++ b/dotfiles/lib/bin/brightness.sh @@ -83,10 +83,11 @@ fi # Get current brightness percentage for display BRIGHTNESS=$(get_brightness_percentage) +RUMNO_TIMEOUT="${RUMNO_TIMEOUT:-2.5}" # Show notification if rumno is available if command -v rumno &> /dev/null; then - rumno notify -b "$BRIGHTNESS" + rumno notify -t "$RUMNO_TIMEOUT" -b "$BRIGHTNESS" else echo "$BRIGHTNESS" fi diff --git a/dotfiles/lib/functions/pashowvolume b/dotfiles/lib/functions/pashowvolume index 5bd3ad3b..7fc638c9 100755 --- a/dotfiles/lib/functions/pashowvolume +++ b/dotfiles/lib/functions/pashowvolume @@ -1,15 +1,15 @@ #!/usr/bin/env sh function pashowvolume { + timeout="${RUMNO_TIMEOUT:-2.5}" if paismuted; then - rumno notify -m + rumno notify -t "$timeout" -m else actual=$(pavolume) max=100 show=$(( actual < max ? actual : max )) - rumno notify -v "$show" + rumno notify -t "$timeout" -v "$show" fi } pashowvolume -