aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-30 08:36:21 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-30 08:36:21 +0100
commit774778629a7ecceb08992786cacfa657db3bdf8a (patch)
treecb1ccda7a2276b0205c5ce3ed3cb14efe413ec3a /modules
parentfix(modules/yambar): Don't treat numbers as strings (diff)
downloadnixos-config-774778629a7ecceb08992786cacfa657db3bdf8a.zip
fix(modules/yambar): Wrap the commands with arguments with a script
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];