about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/by-name/ya/yambar/module.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/by-name/ya/yambar/module.nix b/modules/by-name/ya/yambar/module.nix
index 2f6ea22f..2d0f1e97 100644
--- a/modules/by-name/ya/yambar/module.nix
+++ b/modules/by-name/ya/yambar/module.nix
@@ -18,6 +18,11 @@
       dependencies = dependencies ++ (builtins.attrValues {inherit (pkgs) dash;});
     }
     + "/bin/${name}";
+
+  mkWrapper = bin: cmd:
+    pkgs.writeShellScript cmd ''
+      ${bin} ${cmd}
+    '';
 in {
   options.soispha.programs.yambar = {
     enable = lib.mkEnableOption "yambar";
@@ -38,6 +43,7 @@ in {
           inherit lib;
           inherit (cfg) laptop;
           laptopBacklightName = cfg.backlight;
+
           scripts = {
             mpd_song_name_script = makeScript {
               dependencies = [pkgs.mpc];
@@ -49,9 +55,9 @@ in {
               name = "sound-volume";
             };
 
-            cpu_script = "${lib.getExe pkgs.yambar-modules} cpu";
+            cpu_script = mkWrapper (lib.getExe pkgs.yambar-modules) "cpu";
 
-            memory_script = "${lib.getExe pkgs.yambar-modules} memory";
+            memory_script = mkWrapper (lib.getExe pkgs.yambar-modules) "memory";
 
             disk_script = makeScript {
               dependencies = with pkgs; [gawk btrfs-progs coreutils];