From 0e9a73084cd60024ac20f196be708ed6561d0928 Mon Sep 17 00:00:00 2001 From: Valentin Kharin Date: Sun, 20 Oct 2024 19:10:22 +0300 Subject: [PATCH] Fix nm-applet focus stealing Signed-off-by: Valentin Kharin --- modules/desktop/graphics/labwc.config.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/desktop/graphics/labwc.config.nix b/modules/desktop/graphics/labwc.config.nix index 9886a45ef..76293e35a 100644 --- a/modules/desktop/graphics/labwc.config.nix +++ b/modules/desktop/graphics/labwc.config.nix @@ -12,7 +12,11 @@ let audio-ctrl = pkgs.callPackage ../../../packages/audio-ctrl { }; ghaf-screenshot = pkgs.callPackage ../../../packages/ghaf-screenshot { }; gtklockStyle = pkgs.callPackage ./styles/lock-style.nix { }; - lockCmd = "${pkgs.gtklock}/bin/gtklock -s ${gtklockStyle}"; + + kill-nm-applet = pkgs.writeScriptBin "kill-nm-applet" "${pkgs.procps}/bin/pkill nm-launcher"; + # We kill nm-applet after every screen lock to prevent stealing focus from the lock screen, otherwise user is unable to login afterwards. As nm-applet is managed by systemd service it automatically restarts after every kill. + lockCmd = "${pkgs.gtklock}/bin/gtklock -s ${gtklockStyle} -L ${kill-nm-applet}/bin/kill-nm-applet"; + ghaf-launcher = pkgs.callPackage ./ghaf-launcher.nix { inherit config pkgs; }; autostart = pkgs.writeShellApplication { name = "labwc-autostart";