1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-30 15:09:46 +01:00
home-manager/tests/modules/programs/waybar/settings-complex.nix

57 lines
1.4 KiB
Nix
Raw Normal View History

2020-07-29 22:29:51 +02:00
{ config, lib, pkgs, ... }:
with lib;
{
2020-07-29 22:29:51 +02:00
config = {
programs.waybar = {
package = config.lib.test.mkStubPackage { outPath = "@waybar@"; };
2020-07-29 22:29:51 +02:00
enable = true;
settings = [{
layer = "top";
position = "top";
height = 30;
output = [ "DP-1" ];
modules-left = [ "sway/workspaces" "sway/mode" "custom/my-module" ];
modules-center = [ "sway/window" ];
modules-right = [
"idle_inhibitor"
"pulseaudio"
"network"
"cpu"
"memory"
"backlight"
"tray"
"battery#bat1"
"battery#bat2"
2020-07-29 22:29:51 +02:00
"clock"
];
modules = {
"sway/workspaces" = {
disable-scroll = true;
all-outputs = true;
};
"sway/mode" = { tooltip = false; };
"sway/window" = { max-length = 120; };
"idle_inhibitor" = { format = "{icon}"; };
"custom/my-module" = {
format = "hello from {}";
exec = let
dummyScript =
config.lib.test.mkStubPackage { outPath = "@dummy@"; };
2020-07-29 22:29:51 +02:00
in "${dummyScript}/bin/dummy";
};
};
}];
};
nmt.script = ''
assertPathNotExists home-files/.config/waybar/style.css
assertFileContent \
home-files/.config/waybar/config \
${./settings-complex-expected.json}
'';
};
}