diff options
| -rw-r--r-- | systems/qi/sway.nix | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/systems/qi/sway.nix b/systems/qi/sway.nix index 7dfe3bed..17ca2754 100644 --- a/systems/qi/sway.nix +++ b/systems/qi/sway.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ config, pkgs, ... }: { nixpkgs.overlays = [(self: super: { sway-unwrapped = super.sway-unwrapped.overrideAttrs (old: { patches = old.patches or [] ++ [ @@ -18,6 +18,21 @@ ExecStart = "${pkgs.squeekboard}/bin/squeekboard"; }; }; + # Gestures with two fingers. + systemd.user.services.lisgd = { + partOf = [ "sway-session.target" ]; + wantedBy = [ "sway-session.target" ]; + path = [ config.programs.sway.package pkgs.systemd ]; + serviceConfig.ExecStart = pkgs.writers.writeDash "lisgd" '' + exec ${pkgs.lisgd}/bin/lisgd \ + -d /dev/input/by-path/platform-a90000.i2c-event \ + -m 500 \ + -g '2,DU,*,*,R,systemctl --user start wvkbd' \ + -g '2,UD,*,*,R,systemctl --user stop wvkbd' \ + -g '2,RL,*,*,R,swaymsg workspace next' \ + -g '2,LR,*,*,R,swaymsg workspace prev' + ''; + }; systemd.user.services.wvkbd = { environment = { WAYLAND_DISPLAY = "wayland-1"; @@ -43,19 +58,6 @@ systemctl --user start squeekboard fi '') - # integrate into sway config - (pkgs.writeDashBin "start-lisgd" '' - if ! ${pkgs.procps}/bin/pgrep lisgd >/dev/null; then - ${pkgs.lisgd}/bin/lisgd \ - -d /dev/input/by-path/platform-a90000.i2c-event \ - -m 500 \ - -g '2,DU,*,*,R,systemctl --user start wvkbd' \ - -g '2,UD,*,*,R,systemctl --user stop wvkbd' \ - -g '2,RL,*,*,R,swaymsg workspace next' \ - -g '2,LR,*,*,R,swaymsg workspace prev' \ - & - fi - '') ]; programs.sway.enable = true; xdg.portal = { |
