]> Skullheadx's Git Forge - nixos.git/commitdiff
use systemd services for sxhkd and slstatus
authorSkullheadx <admonty1@protonmail.com>
Mon, 4 May 2026 20:54:47 +0000 (16:54 -0400)
committerSkullheadx <admonty1@protonmail.com>
Mon, 4 May 2026 20:54:47 +0000 (16:54 -0400)
x11.nix

diff --git a/x11.nix b/x11.nix
index 2648bf8b037a0c24ba8ef80e6ee0942b7e8b7f27..3ab3bb62cf4d4c0f6ee60d1243ba66ed7269dd99 100644 (file)
--- a/x11.nix
+++ b/x11.nix
@@ -30,8 +30,6 @@
                        #!/bin/sh
                        ${pkgs.xrandr}/bin/xrandr --output DP-3 --primary --mode 2560x1440 --rate 180 --pos 0x0 --output DP-2 --mode 1920x1080 --rate 160 --pos 2560x360
                        ${pkgs.feh}/bin/feh --no-fehbg --bg-fill '/home/andrew/Wallpapers/Daniel_in_the_Lions_Den_by_Briton_Riviere.jpg'
-                       ${pkgs.sxhkd}/bin/sxhkd &
-                       ${pkgs.slstatus}/bin/slstatus &
       '';
     };
     xkb = {
     enable = true;
   };
 
+
+systemd.user.services.sxhkd = {
+  description = "Simple X Hot Key Daemon (sxhkd)";
+  
+  serviceConfig = {
+    ExecStart = "${pkgs.sxhkd}/bin/sxhkd";
+    Restart = "on-failure";
+  };
+  wantedBy = [ "graphical-session.target" ];
+};
+
+
+
+  systemd.user.services.slstatus = {
+    description = "slstatus bar";
+    wantedBy = [ "graphical-session.target" ];
+    
+    path = with pkgs; [ 
+        pamixer
+        scrolling-title
+    ];
+
+    serviceConfig = {
+      ExecStart = "${pkgs.slstatus}/bin/slstatus";
+      
+      Restart = "always";
+      RestartSec = "1s";
+    };
+  };
 }