quickshell: fix conflicting idleinhibitor with firefox

This commit is contained in:
2025-10-18 00:20:34 +02:00
parent bf984237a7
commit f7fe2b00b5
3 changed files with 15 additions and 15 deletions

View File

@@ -120,8 +120,9 @@ layer-rule {
// Switch configs // Switch configs
spawn-sh-at-startup "config-switch niri" spawn-sh-at-startup "config-switch niri"
// Bar // Idle
spawn-at-startup "quickshell" spawn-sh-at-startup "hypridle"
// Wallpaper // Wallpaper
spawn-at-startup "wallpaper-daemon" 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-sh-at-startup "gnome-keyring-daemon --start --components=secrets"
spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
// Idle
spawn-sh-at-startup "hypridle"
// Clipboard history // Clipboard history
spawn-sh-at-startup "wl-paste --type text --watch cliphist store" spawn-sh-at-startup "wl-paste --type text --watch cliphist store"
spawn-sh-at-startup "wl-paste --type image --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 // Some other heavy apps
spawn-at-startup "sunshine" spawn-at-startup "sunshine"
// Quickshell must start after hypridle,
// otherwise Firefox cannot block idle when playing media
spawn-at-startup "quickshell"
/************************Envs************************/ /************************Envs************************/
environment { environment {

View File

@@ -120,8 +120,9 @@ layer-rule {
// Switch configs // Switch configs
spawn-sh-at-startup "config-switch niri" spawn-sh-at-startup "config-switch niri"
// Bar // Idle
spawn-at-startup "quickshell" spawn-sh-at-startup "hypridle"
// Wallpaper // Wallpaper
spawn-at-startup "wallpaper-daemon" 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-sh-at-startup "gnome-keyring-daemon --start --components=secrets"
spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
// Idle
spawn-sh-at-startup "hypridle"
// Clipboard history // Clipboard history
spawn-sh-at-startup "wl-paste --type text --watch cliphist store" spawn-sh-at-startup "wl-paste --type text --watch cliphist store"
spawn-sh-at-startup "wl-paste --type image --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 // Some other heavy apps
spawn-at-startup "sunshine" spawn-at-startup "sunshine"
// Quickshell must start after hypridle,
// otherwise Firefox cannot block idle when playing media
spawn-at-startup "quickshell"
/************************Envs************************/ /************************Envs************************/
environment { environment {

View File

@@ -6,10 +6,6 @@ import qs.Utils
pragma Singleton pragma Singleton
Singleton { Singleton {
// "systemd", "wayland", or "auto"
// systemd-inhibit not found, try Wayland tools
// wayhibitor not found
id: root id: root
property string reason: "Application request" property string reason: "Application request"
@@ -90,10 +86,10 @@ Singleton {
if (!isInhibited) if (!isInhibited)
return ; return ;
// SIGTERM
if (inhibitorProcess.running) if (inhibitorProcess.running)
inhibitorProcess.signal(15); inhibitorProcess.signal(15);
// SIGTERM
isInhibited = false; isInhibited = false;
} }