fusuma: add module

Fusuma is a tool supports multitouch gestures with libinput driver on
Linux.
This commit is contained in:
iosmanthus 2022-02-17 00:09:46 +08:00 committed by Robert Helgesson
parent da92196a95
commit 8bdfa41b4e
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
11 changed files with 226 additions and 0 deletions

View file

@ -0,0 +1,4 @@
{
fusuma-example-settings = ./settings.nix;
fusuma-systemd-user-service = ./service.nix;
}

View 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

View 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

View 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}
'';
}

View 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}
'';
}