twmn: add module
This module allows to configure and start the twmn daemon.
This commit is contained in:
parent
11c0e5d188
commit
63dccc4e60
9 changed files with 483 additions and 0 deletions
|
|
@ -156,6 +156,7 @@ import nmt {
|
|||
./modules/services/sxhkd
|
||||
./modules/services/syncthing
|
||||
./modules/services/trayer
|
||||
./modules/services/twmn
|
||||
./modules/services/window-managers/bspwm
|
||||
./modules/services/window-managers/herbstluftwm
|
||||
./modules/services/window-managers/i3
|
||||
|
|
|
|||
32
tests/modules/services/twmn/basic-configuration.conf
Normal file
32
tests/modules/services/twmn/basic-configuration.conf
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[gui]
|
||||
always_on_top=true
|
||||
background_color=black
|
||||
bounce=true
|
||||
bounce_duration=271
|
||||
font=Noto Sans
|
||||
font_size=16
|
||||
font_variant=italic
|
||||
foreground_color=#FF00FF
|
||||
height=20
|
||||
in_animation=27
|
||||
in_animation_duration=314
|
||||
max_length=80
|
||||
offset_x=+20
|
||||
offset_y=-60
|
||||
opacity=80
|
||||
out_animation=13
|
||||
out_animation_duration=168
|
||||
position=center
|
||||
screen=0
|
||||
|
||||
[icons]
|
||||
critical=/path/icon/critical
|
||||
info=/path/icon/info
|
||||
warning=/path/icon/warning
|
||||
|
||||
[main]
|
||||
duration=4242
|
||||
host=example.com
|
||||
port=9006
|
||||
sound_command=/path/sound/command
|
||||
|
||||
51
tests/modules/services/twmn/basic-configuration.nix
Normal file
51
tests/modules/services/twmn/basic-configuration.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
config = {
|
||||
services.twmn = {
|
||||
enable = true;
|
||||
duration = 4242;
|
||||
host = "example.com";
|
||||
port = 9006;
|
||||
screen = 0;
|
||||
soundCommand = "/path/sound/command";
|
||||
icons.critical = "/path/icon/critical";
|
||||
icons.info = "/path/icon/info";
|
||||
icons.warning = "/path/icon/warning";
|
||||
text = {
|
||||
color = "#FF00FF";
|
||||
font.family = "Noto Sans";
|
||||
font.size = 16;
|
||||
font.variant = "italic";
|
||||
maxLength = 80;
|
||||
};
|
||||
window = {
|
||||
alwaysOnTop = true;
|
||||
color = "black";
|
||||
height = 20;
|
||||
offset.x = 20;
|
||||
offset.y = -60;
|
||||
opacity = 80;
|
||||
position = "center";
|
||||
animation = {
|
||||
easeIn.curve = 27;
|
||||
easeIn.duration = 314;
|
||||
easeOut.curve = 13;
|
||||
easeOut.duration = 168;
|
||||
bounce.enable = true;
|
||||
bounce.duration = 271;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.twmn = { };
|
||||
|
||||
nmt.script = ''
|
||||
serviceFile="home-files/.config/systemd/user/twmnd.service"
|
||||
assertFileExists "$serviceFile"
|
||||
assertFileRegex "$serviceFile" 'X-Restart-Triggers=.*twmn\.conf'
|
||||
assertFileRegex "$serviceFile" 'ExecStart=@twmn@/bin/twmnd'
|
||||
assertFileExists "home-files/.config/twmn/twmn.conf"
|
||||
assertFileContent "home-files/.config/twmn/twmn.conf" \
|
||||
${./basic-configuration.conf}
|
||||
'';
|
||||
};
|
||||
}
|
||||
1
tests/modules/services/twmn/default.nix
Normal file
1
tests/modules/services/twmn/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ twmn-basic-configuration = ./basic-configuration.nix; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue