]> Skullheadx's Git Forge - nixos.git/commitdiff
move sxhkdrc to dotfiles and replaceVars
authorSkullheadx <admonty1@protonmail.com>
Sun, 26 Apr 2026 04:50:08 +0000 (00:50 -0400)
committerSkullheadx <admonty1@protonmail.com>
Sun, 26 Apr 2026 04:50:08 +0000 (00:50 -0400)
dotfiles/sxhkdrc [new file with mode: 0644]
hjem.nix

diff --git a/dotfiles/sxhkdrc b/dotfiles/sxhkdrc
new file mode 100644 (file)
index 0000000..0cfee62
--- /dev/null
@@ -0,0 +1,26 @@
+super + space
+    @dmenu@/bin/dmenu_run
+
+super + Return
+    @st@/bin/st
+
+super + b
+    @librewolf@/bin/librewolf
+
+XF86AudioRaiseVolume
+    @pamixer@/bin/pamixer -i 5
+
+XF86AudioLowerVolume
+    @pamixer@/bin/pamixer -d 5
+
+XF86AudioMute
+    @pamixer@/bin/pamixer -t
+
+super + s
+    @maim@/bin/maim -i $(@xdotool@/bin/xdotool getactivewindow) | @xclip@/bin/xclip -selection clipboard -t image/png
+
+super + shift + s
+    @maim@/bin/maim -s | @xclip@/bin/xclip -selection clipboard -t image/png
+
+super + l
+    @lockscreen@/bin/lock-screen
index 1c43cb34a0f3de8730e194ca84c13214ffa3cdb1..5fa27baaf59d4558205f1c21770841d743917b76 100644 (file)
--- a/hjem.nix
+++ b/hjem.nix
     directory = "/home/andrew";
     files = {
 
-      ".config/sxhkd/sxhkdrc".text = ''
-super + space
-       ${pkgs.dmenu}/bin/dmenu_run
-
-super + Return
-       ${pkgs.st}/bin/st       
-
-super + b
-       ${pkgs.librewolf}/bin/librewolf
-
-XF86AudioRaiseVolume
-    ${pkgs.pamixer}/bin/pamixer -i 5
-
-XF86AudioLowerVolume
-    ${pkgs.pamixer}/bin/pamixer -d 5
-
-XF86AudioMute
-    ${pkgs.pamixer}/bin/pamixer -t
-
-super + s
-    ${pkgs.maim}/bin/maim -i $(${pkgs.xdotool}/bin/xdotool getactivewindow) | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png
-
-super + shift + s
-       ${pkgs.maim}/bin/maim -s | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png
-
-super + l
-       ${pkgs.lock-screen}/bin/lock-screen 
-
-      '';
+      ".config/sxhkd/sxhkdrc".text = builtins.readFile (pkgs.replaceVars ./dotfiles/sxhkdrc {
+               dmenu = pkgs.dmenu;
+       st = pkgs.st;
+      librewolf = pkgs.librewolf;
+      pamixer = pkgs.pamixer;
+      maim = pkgs.maim;
+      xdotool = pkgs.xdotool;
+      xclip = pkgs.xclip;
+      lockscreen = pkgs.lock-screen;
+});
     };
     packages = with pkgs; [
       discord