diff options
author | Kaiden Fey <kookie@spacekookie.de> | 2020-09-21 14:12:32 +0200 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-09-21 14:12:32 +0200 |
commit | f80843dd45d7acd563d0a5b014cec3a2ea686fc2 (patch) | |
tree | 87189d873d6f932d85f9c1a480462b37d96cd6a5 /home-manager/tests/modules/services/polybar/basic-configuration.nix | |
parent | e0800985dab8f8ebb4cebdfd7e361fd1fafdb2a7 (diff) | |
parent | 9b1b55ba0264a55add4b7b4e022bdc2832b531f6 (diff) |
Merge commit '9b1b55ba0264a55add4b7b4e022bdc2832b531f6'
Diffstat (limited to 'home-manager/tests/modules/services/polybar/basic-configuration.nix')
-rw-r--r-- | home-manager/tests/modules/services/polybar/basic-configuration.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/home-manager/tests/modules/services/polybar/basic-configuration.nix b/home-manager/tests/modules/services/polybar/basic-configuration.nix new file mode 100644 index 00000000000..a8886dab6d5 --- /dev/null +++ b/home-manager/tests/modules/services/polybar/basic-configuration.nix @@ -0,0 +1,48 @@ +{ config, pkgs, ... }: + +{ + config = { + services.polybar = { + enable = true; + package = pkgs.writeScriptBin "dummy-polybar" ""; + script = "polybar bar &"; + config = { + "bar/top" = { + monitor = "\${env:MONITOR:eDP1}"; + width = "100%"; + height = "3%"; + radius = 0; + modules-center = "date"; + }; + "module/date" = { + type = "internal/date"; + internal = 5; + date = "%d.%m.%y"; + time = "%H:%M"; + label = "%time% %date%"; + }; + }; + extraConfig = '' + [module/date] + type = internal/date + interval = 5 + date = "%d.%m.%y" + time = %H:%M + format-prefix-foreground = ''${colors.foreground-alt} + label = %time% %date% + ''; + }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/polybar.service + + assertFileExists $serviceFile + assertFileRegex $serviceFile 'X-Restart-Triggers=.*polybar\.conf' + assertFileRegex $serviceFile 'ExecStart=.*/bin/polybar-start' + + assertFileExists home-files/.config/polybar/config + assertFileContent home-files/.config/polybar/config \ + ${./basic-configuration.conf} + ''; + }; +} |