yambar: add module

This commit is contained in:
Akiyoshi Suda 2022-10-25 21:31:46 +09:00 committed by Robert Helgesson
parent f2c5ba5e72
commit 5514ed3210
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
8 changed files with 130 additions and 0 deletions

View file

@ -0,0 +1,4 @@
{
yambar-empty-settings = ./empty-settings.nix;
yambar-example-settings = ./example-settings.nix;
}

View file

@ -0,0 +1,11 @@
{ ... }:
{
programs.yambar.enable = true;
test.stubs.yambar = { };
nmt.script = ''
assertPathNotExists home-files/.config/yambar
'';
}

View file

@ -0,0 +1,9 @@
bar:
background: '00000066'
height: 26
location: top
right:
- clock:
content:
- string:
text: '{time}'

View file

@ -0,0 +1,35 @@
{ config, ... }:
{
programs.yambar = {
enable = true;
package = config.lib.test.mkStubPackage { };
settings = {
bar = {
location = "top";
height = 26;
background = "00000066";
right = [{ clock.content = [{ string.text = "{time}"; }]; }];
};
};
};
nmt.script = ''
assertFileContent \
home-files/.config/yambar/config.yml \
${
builtins.toFile "yambar-expected.yml" ''
bar:
background: '00000066'
height: 26
location: top
right:
- clock:
content:
- string:
text: '{time}'
''
}
'';
}