yambar: add module
This commit is contained in:
parent
f2c5ba5e72
commit
5514ed3210
8 changed files with 130 additions and 0 deletions
4
tests/modules/programs/yambar/default.nix
Normal file
4
tests/modules/programs/yambar/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
yambar-empty-settings = ./empty-settings.nix;
|
||||
yambar-example-settings = ./example-settings.nix;
|
||||
}
|
||||
11
tests/modules/programs/yambar/empty-settings.nix
Normal file
11
tests/modules/programs/yambar/empty-settings.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.yambar.enable = true;
|
||||
|
||||
test.stubs.yambar = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/yambar
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
bar:
|
||||
background: '00000066'
|
||||
height: 26
|
||||
location: top
|
||||
right:
|
||||
- clock:
|
||||
content:
|
||||
- string:
|
||||
text: '{time}'
|
||||
35
tests/modules/programs/yambar/example-settings.nix
Normal file
35
tests/modules/programs/yambar/example-settings.nix
Normal 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}'
|
||||
''
|
||||
}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue