From f7fe2b00b53ae98950d1b83617497fcc2df0dc80 Mon Sep 17 00:00:00 2001 From: Uyanide Date: Sat, 18 Oct 2025 00:20:34 +0200 Subject: [PATCH] quickshell: fix conflicting idleinhibitor with firefox --- niri/config.kdl | 12 +++++++----- niri/config.kdl.template | 12 +++++++----- quickshell/Services/Caffeine.qml | 6 +----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/niri/config.kdl b/niri/config.kdl index 9b020c1..d400104 100644 --- a/niri/config.kdl +++ b/niri/config.kdl @@ -120,8 +120,9 @@ layer-rule { // Switch configs spawn-sh-at-startup "config-switch niri" -// Bar -spawn-at-startup "quickshell" +// Idle +spawn-sh-at-startup "hypridle" + // Wallpaper spawn-at-startup "wallpaper-daemon" @@ -135,9 +136,6 @@ spawn-at-startup "nm-applet" spawn-sh-at-startup "gnome-keyring-daemon --start --components=secrets" spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" -// Idle -spawn-sh-at-startup "hypridle" - // Clipboard history spawn-sh-at-startup "wl-paste --type text --watch cliphist store" spawn-sh-at-startup "wl-paste --type image --watch cliphist store" @@ -151,6 +149,10 @@ spawn-at-startup "kbuildsycoca6" // Some other heavy apps spawn-at-startup "sunshine" +// Quickshell must start after hypridle, +// otherwise Firefox cannot block idle when playing media +spawn-at-startup "quickshell" + /************************Envs************************/ environment { diff --git a/niri/config.kdl.template b/niri/config.kdl.template index 9f5ae13..87a7610 100644 --- a/niri/config.kdl.template +++ b/niri/config.kdl.template @@ -120,8 +120,9 @@ layer-rule { // Switch configs spawn-sh-at-startup "config-switch niri" -// Bar -spawn-at-startup "quickshell" +// Idle +spawn-sh-at-startup "hypridle" + // Wallpaper spawn-at-startup "wallpaper-daemon" @@ -135,9 +136,6 @@ spawn-at-startup "nm-applet" spawn-sh-at-startup "gnome-keyring-daemon --start --components=secrets" spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" -// Idle -spawn-sh-at-startup "hypridle" - // Clipboard history spawn-sh-at-startup "wl-paste --type text --watch cliphist store" spawn-sh-at-startup "wl-paste --type image --watch cliphist store" @@ -151,6 +149,10 @@ spawn-at-startup "kbuildsycoca6" // Some other heavy apps spawn-at-startup "sunshine" +// Quickshell must start after hypridle, +// otherwise Firefox cannot block idle when playing media +spawn-at-startup "quickshell" + /************************Envs************************/ environment { diff --git a/quickshell/Services/Caffeine.qml b/quickshell/Services/Caffeine.qml index 51e0eab..8b676af 100644 --- a/quickshell/Services/Caffeine.qml +++ b/quickshell/Services/Caffeine.qml @@ -6,10 +6,6 @@ import qs.Utils pragma Singleton Singleton { - // "systemd", "wayland", or "auto" - // systemd-inhibit not found, try Wayland tools - // wayhibitor not found - id: root property string reason: "Application request" @@ -90,10 +86,10 @@ Singleton { if (!isInhibited) return ; + // SIGTERM if (inhibitorProcess.running) inhibitorProcess.signal(15); - // SIGTERM isInhibited = false; }