fusuma: add module
Fusuma is a tool supports multitouch gestures with libinput driver on Linux.
This commit is contained in:
parent
da92196a95
commit
8bdfa41b4e
11 changed files with 226 additions and 0 deletions
4
tests/modules/services/fusuma/default.nix
Normal file
4
tests/modules/services/fusuma/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
fusuma-example-settings = ./settings.nix;
|
||||
fusuma-systemd-user-service = ./service.nix;
|
||||
}
|
||||
11
tests/modules/services/fusuma/expected-service.service
Normal file
11
tests/modules/services/fusuma/expected-service.service
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Environment=PATH=@coreutils@/bin:@xdotool@/bin
|
||||
ExecStart=@fusuma@/bin/fusuma -c /home/hm-user/.config/fusuma/config.yaml
|
||||
|
||||
[Unit]
|
||||
After=graphical-session-pre.target
|
||||
Description=Fusuma services
|
||||
PartOf=graphical-session.target
|
||||
12
tests/modules/services/fusuma/expected-settings.yaml
Normal file
12
tests/modules/services/fusuma/expected-settings.yaml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
interval:
|
||||
swipe: 7
|
||||
swipe:
|
||||
3:
|
||||
left:
|
||||
command: xdotool key ctrl+alt+Right
|
||||
4:
|
||||
left:
|
||||
command: xdotool key ctrl+shift+alt+Right
|
||||
threshold:
|
||||
swipe: 1
|
||||
|
||||
19
tests/modules/services/fusuma/service.nix
Normal file
19
tests/modules/services/fusuma/service.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.fusuma = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { outPath = "@fusuma@"; };
|
||||
extraPackages = [
|
||||
(config.lib.test.mkStubPackage { outPath = "@coreutils@"; })
|
||||
(config.lib.test.mkStubPackage { outPath = "@xdotool@"; })
|
||||
];
|
||||
settings = { };
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/systemd/user/fusuma.service \
|
||||
${./expected-service.service}
|
||||
'';
|
||||
}
|
||||
23
tests/modules/services/fusuma/settings.nix
Normal file
23
tests/modules/services/fusuma/settings.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.fusuma = {
|
||||
enable = true;
|
||||
extraPackages = [ (config.lib.test.mkStubPackage { }) ];
|
||||
|
||||
settings = {
|
||||
threshold = { swipe = 1; };
|
||||
interval = { swipe = 7; };
|
||||
swipe = {
|
||||
"3" = { left = { command = "xdotool key ctrl+alt+Right"; }; };
|
||||
"4" = { left = { command = "xdotool key ctrl+shift+alt+Right"; }; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/fusuma/config.yaml \
|
||||
${./expected-settings.yaml}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue