mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-09 10:31:06 +01:00
mako: refactor (#6948)
Refactors the services.mako module to replace all its configuration options with a freeform settings option and criterias. I also added a test for the configuration.
This commit is contained in:
parent
94f4c66660
commit
d1bbab6b04
5 changed files with 183 additions and 349 deletions
|
|
@ -442,6 +442,7 @@ import nmtSrc {
|
|||
./modules/services/lieer
|
||||
./modules/services/linux-wallpaperengine
|
||||
./modules/services/lxqt-policykit-agent
|
||||
./modules/services/mako
|
||||
./modules/services/mopidy
|
||||
./modules/services/mpd
|
||||
./modules/services/mpd-mpris
|
||||
|
|
|
|||
23
tests/modules/services/mako/config
Normal file
23
tests/modules/services/mako/config
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
actions=true
|
||||
anchor=top-right
|
||||
backgroundColor=#000000
|
||||
borderColor=#FFFFFF
|
||||
borderRadius=0
|
||||
defaultTimeout=0
|
||||
font=monospace 10
|
||||
height=100
|
||||
icons=true
|
||||
ignoreTimeout=false
|
||||
layer=top
|
||||
margin=10
|
||||
markup=true
|
||||
width=300
|
||||
|
||||
[actionable=true]
|
||||
anchor=top-left
|
||||
|
||||
[app-name=Google\ Chrome]
|
||||
max-visible=5
|
||||
|
||||
[field1=value field2=value]
|
||||
text-alignment=left
|
||||
1
tests/modules/services/mako/default.nix
Normal file
1
tests/modules/services/mako/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ mako-example-config = ./example-config.nix; }
|
||||
41
tests/modules/services/mako/example-config.nix
Normal file
41
tests/modules/services/mako/example-config.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
services.mako = {
|
||||
enable = true;
|
||||
settings = {
|
||||
actions = "true";
|
||||
anchor = "top-right";
|
||||
backgroundColor = "#000000";
|
||||
borderColor = "#FFFFFF";
|
||||
borderRadius = "0";
|
||||
defaultTimeout = "0";
|
||||
font = "monospace 10";
|
||||
height = "100";
|
||||
width = "300";
|
||||
icons = "true";
|
||||
ignoreTimeout = "false";
|
||||
layer = "top";
|
||||
margin = "10";
|
||||
markup = "true";
|
||||
};
|
||||
|
||||
criterias = {
|
||||
"actionable=true" = {
|
||||
anchor = "top-left";
|
||||
};
|
||||
|
||||
"app-name=Google\\ Chrome" = {
|
||||
max-visible = "5";
|
||||
};
|
||||
|
||||
"field1=value field2=value" = {
|
||||
text-alignment = "left";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/mako/config
|
||||
assertFileContent home-files/.config/mako/config \
|
||||
${./config}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue