2020-03-02 21:31:15 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
services.polybar = {
|
|
|
|
enable = true;
|
2021-09-26 09:08:45 +00:00
|
|
|
package = config.lib.test.mkStubPackage { };
|
2020-03-02 21:31:15 +00:00
|
|
|
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%";
|
|
|
|
};
|
|
|
|
};
|
2021-02-20 17:34:59 +00:00
|
|
|
settings = {
|
|
|
|
"module/volume" = {
|
|
|
|
type = "internal/pulseaudio";
|
|
|
|
format.volume = "<ramp-volume> <label-volume>";
|
|
|
|
label.muted.text = "🔇";
|
|
|
|
label.muted.foreground = "#666";
|
|
|
|
ramp.volume = [ "🔈" "🔉" "🔊" ];
|
|
|
|
click.right = "pavucontrol &";
|
|
|
|
};
|
|
|
|
};
|
2020-03-02 21:31:15 +00:00
|
|
|
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 = ''
|
2020-04-09 22:25:21 +00:00
|
|
|
serviceFile=home-files/.config/systemd/user/polybar.service
|
2020-03-02 21:31:15 +00:00
|
|
|
|
|
|
|
assertFileExists $serviceFile
|
2022-11-27 00:17:28 +00:00
|
|
|
assertFileRegex $serviceFile 'X-Restart-Triggers=.*/.config/polybar/config.ini'
|
2020-03-02 21:31:15 +00:00
|
|
|
assertFileRegex $serviceFile 'ExecStart=.*/bin/polybar-start'
|
|
|
|
|
2022-08-07 08:39:03 +00:00
|
|
|
assertFileExists home-files/.config/polybar/config.ini
|
|
|
|
assertFileContent home-files/.config/polybar/config.ini \
|
2020-03-02 21:31:15 +00:00
|
|
|
${./basic-configuration.conf}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|