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SQ33KQC { config, lib, pkgs, ... }: letinherit (lib) mkIf enabled;in mkIf config.isDesktopNotWsl {environment.systemPackages = [ pkgs.libnotify ]; # Provides `notify-send`.home-manager.sharedModules = [{services.mako = with config.theme; enabled {settings = {icons = true;max-icon-size = 32;font = "${font.mono.name} ${toString font.size.small}";# Format: `bold app, bold summary, body`.format = "<b>%s</b>\\n%b";markup = true;anchor = "top-right";layer = "overlay";width = 400;height = 150;margin = "${toString margin}";padding = "${toString padding}";output = mkIf (config.networking.hostName == "yuzu") "DP-1";sort = "-time";max-visible = 10;group-by = "app-name";border-size = border;border-radius = radius * 2;background-color = "#${colors.base00}BB";text-color = "#${colors.base07}FF";border-color = "#${colors.base0A}BB";progress-color = "over #${colors.base09}55";default-timeout = 20000;};extraConfig = /* ini */ ''[urgency=low]border-color=#${colors.base0E}FFdefault-timeout=10000[urgency=normal]border-color=#${colors.base0A}FFdefault-timeout=20000[urgency=critical]border-color=#${colors.base08}FFdefault-timeout=30000'';};}];}
if (which dunstify | is-not-empty) {let base_args = ["--appname=Theme Switcher" "--replace=1002"]let args = if $progress >= 0 {$base_args | append ["--hints" $"int:value:($progress)"]
if (which notify-send | is-not-empty) {let base_args = ["--replace-id=1002" "--print-id"]# Don't add progress hint for completion (progress=100) so it times out.let args = if $progress >= 0 and $progress < 100 {$base_args | append ["--hint" $"int:value:($progress)"]
# Use persistent notifications (timeout=0) when in-progress.# Use short timeout for completion messages (progress=100).let timeout = if $progress >= 0 and $progress < 100 { 0 } else { 15000 }
let timeout = if ($message | str downcase | str contains "error") { 30000 } else { 15000 }let urgency = if ($message | str downcase | str contains "error") { "critical" } else { "normal" }
if ($message | str downcase | str contains "error") {^dunstify ...$args --urgency=critical --timeout=30000 "Theme Switcher" $"($message)"} else {^dunstify ...$args --urgency=normal --timeout=($timeout) "Theme Switcher" $"($message)"}
^notify-send ...$args --urgency=($urgency) --expire-time=($timeout) "Theme Switcher" $"($message)"
if (which dunstify | is-not-empty) {let base_args = ["--appname=Rebuilder" "--replace=1003"]let args = if $progress >= 0 {$base_args | append ["--hints" $"int:value:($progress)"]
if (which notify-send | is-not-empty) {let base_args = ["--replace-id=1003" "--print-id"]# Don't add progress hint for completion (progress=100) so it times out.let args = if $progress >= 0 and $progress < 100 {$base_args | append ["--hint" $"int:value:($progress)"]
# Use persistent notifications (timeout=0) when in-progress.# Use short timeout for completion messages (progress=100).let timeout = if $progress >= 0 and $progress < 100 { 0 } else { 15000 }
let timeout = if ($message | str downcase | str contains "error") { 30000 } else { 15000 }let urgency = if ($message | str downcase | str contains "error") { "critical" } else { "normal" }
if ($message | str downcase | str contains "error") {^dunstify ...$args --urgency=critical --timeout=30000 "Rebuilder" $"($message)"} else {^dunstify ...$args --urgency=normal --timeout=($timeout) "Rebuilder" $"($message)"}
^notify-send ...$args --urgency=($urgency) --expire-time=($timeout) "Rebuilder" $"($message)"