simpler fusuma
This commit is contained in:
1 parent
464477cfe7
commit
ad0f2e5459
7 files changed
+86
-88
No files matched your search
@@ -0,0 +1,49 @@
|
|||||||
|
swipe:
|
||||||
|
3:
|
||||||
|
left:
|
||||||
|
command: "niri msg action FocusColumnRight"
|
||||||
|
right:
|
||||||
|
command: "niri msg action FocusColumnLeft"
|
||||||
|
up:
|
||||||
|
command: "niri msg action FocusWorkspaceDown"
|
||||||
|
down:
|
||||||
|
command: "niri msg action FocusWorkspaceUp"
|
||||||
|
4:
|
||||||
|
up:
|
||||||
|
command: "niri msg action ToggleOverview"
|
||||||
|
down:
|
||||||
|
command: "niri msg action ToggleOverview"
|
||||||
|
pinch:
|
||||||
|
2:
|
||||||
|
in:
|
||||||
|
keypress:
|
||||||
|
LEFTCTRL: press
|
||||||
|
MINUS: press
|
||||||
|
out:
|
||||||
|
keypress:
|
||||||
|
LEFTCTRL: press
|
||||||
|
EQUAL: press
|
||||||
|
app:
|
||||||
|
zed:
|
||||||
|
match:
|
||||||
|
class: "dev.zed.Zed"
|
||||||
|
swipe:
|
||||||
|
2:
|
||||||
|
left:
|
||||||
|
keypress:
|
||||||
|
ALT: press
|
||||||
|
LEFT: press
|
||||||
|
right:
|
||||||
|
keypress:
|
||||||
|
ALT: press
|
||||||
|
RIGHT: press
|
||||||
|
pinch:
|
||||||
|
2:
|
||||||
|
in:
|
||||||
|
keypress:
|
||||||
|
LEFTCTRL: press
|
||||||
|
MINUS: press
|
||||||
|
out:
|
||||||
|
keypress:
|
||||||
|
LEFTCTRL: press
|
||||||
|
EQUAL: press
|
||||||
@@ -1,2 +1,4 @@
|
|||||||
|
|
||||||
|
spawn-at-startup "fusuma" "--daemon" "--config" "/home/ari/nixos-setup/configs/niri/fusuma.yml"
|
||||||
|
|
||||||
// spawn-at-startup "niri-touchscreen-gestures"
|
// spawn-at-startup "niri-touchscreen-gestures"
|
||||||
@@ -61,6 +61,8 @@ in
|
|||||||
};
|
};
|
||||||
virtualisation.waydroid.enable = true;
|
virtualisation.waydroid.enable = true;
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
# Fusuma needs raw input device access to read touchpad/touchscreen gestures.
|
||||||
|
users.users.${user.name}.extraGroups = [ "input" ];
|
||||||
# Tailscale
|
# Tailscale
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
services.tailscale.extraDaemonFlags = [ "--statedir=/var/lib/tailscale" ];
|
services.tailscale.extraDaemonFlags = [ "--statedir=/var/lib/tailscale" ];
|
||||||
@@ -245,6 +247,7 @@ in
|
|||||||
|
|
||||||
# My Own
|
# My Own
|
||||||
niri-touchscreen-gestures
|
niri-touchscreen-gestures
|
||||||
|
fusuma
|
||||||
|
|
||||||
]);
|
]);
|
||||||
services.usbmuxd.enable = true;
|
services.usbmuxd.enable = true;
|
||||||
|
|||||||
@@ -21,6 +21,8 @@
|
|||||||
ds4-cuda = final.callPackage ../../pkgs/ds4 { backend = "cuda"; };
|
ds4-cuda = final.callPackage ../../pkgs/ds4 { backend = "cuda"; };
|
||||||
# Touchscreen gesture bridge for niri, see pkgs/niri-touchscreen-gestures.
|
# Touchscreen gesture bridge for niri, see pkgs/niri-touchscreen-gestures.
|
||||||
niri-touchscreen-gestures = final.callPackage ../../pkgs/niri-touchscreen-gestures { };
|
niri-touchscreen-gestures = final.callPackage ../../pkgs/niri-touchscreen-gestures { };
|
||||||
|
# Fusuma + niri plugin, see pkgs/fusuma.
|
||||||
|
fusuma = final.callPackage ../../pkgs/fusuma { };
|
||||||
})
|
})
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.skyg.nixos.common.fusuma;
|
|
||||||
configFile =
|
|
||||||
if cfg.configFile != null then
|
|
||||||
cfg.configFile
|
|
||||||
else
|
|
||||||
pkgs.writeText "fusuma-config.yml" (lib.generators.toYAML { } cfg.settings);
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.skyg.nixos.common.fusuma = {
|
|
||||||
enable = lib.mkEnableOption "Fusuma multi-touch gesture daemon (niri + per-app support)";
|
|
||||||
|
|
||||||
package = lib.mkPackageOption pkgs "fusuma" { };
|
|
||||||
|
|
||||||
settings = lib.mkOption {
|
|
||||||
type = with lib.types; attrsOf anything;
|
|
||||||
default = { };
|
|
||||||
example = {
|
|
||||||
swipe."3".left.command = "niri msg action FocusColumnRight";
|
|
||||||
app.zed = {
|
|
||||||
match.class = "dev.zed.Zed";
|
|
||||||
swipe."2".left.keypress = { ALT = "press"; LEFT = "press"; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
description = ''
|
|
||||||
Fusuma configuration as a Nix attribute set.
|
|
||||||
Converted to YAML and passed to the daemon.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
configFile = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.path;
|
|
||||||
default = null;
|
|
||||||
description = "Path to an existing Fusuma config.yml (overrides generated settings)";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
environment.systemPackages = [ cfg.package ];
|
|
||||||
|
|
||||||
# Ensure the user can read raw input devices
|
|
||||||
users.users.${config.skyg.user.name}.extraGroups = lib.mkIf config.skyg.user.enable [ "input" ];
|
|
||||||
|
|
||||||
systemd.user.services.fusuma = {
|
|
||||||
description = "Fusuma multi-touch gesture daemon";
|
|
||||||
partOf = [ "graphical-session.target" ];
|
|
||||||
after = [ "graphical-session.target" ];
|
|
||||||
wantedBy = [ "graphical-session.target" ];
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${lib.getExe cfg.package} --daemon --config ${configFile}";
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = 2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -15,7 +15,8 @@ let
|
|||||||
|
|
||||||
pluginLib = "${../fusuma-plugin-niri-appmatcher}/lib";
|
pluginLib = "${../fusuma-plugin-niri-appmatcher}/lib";
|
||||||
in
|
in
|
||||||
runCommand "fusuma-3.12.0" {
|
runCommand "fusuma-3.12.0"
|
||||||
|
{
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
} ''
|
} ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|||||||
+28
-28
@@ -1,83 +1,83 @@
|
|||||||
{
|
{
|
||||||
fusuma = {
|
fusuma = {
|
||||||
groups = ["default"];
|
groups = [ "default" ];
|
||||||
platforms = [];
|
platforms = [ ];
|
||||||
source = {
|
source = {
|
||||||
remotes = ["https://rubygems.org"];
|
remotes = [ "https://rubygems.org" ];
|
||||||
sha256 = "19pw97h6mjr0xxm066jcgm62pxcczjq7zlxv2l9cdc4p4x9ba591";
|
sha256 = "19pw97h6mjr0xxm066jcgm62pxcczjq7zlxv2l9cdc4p4x9ba591";
|
||||||
type = "gem";
|
type = "gem";
|
||||||
};
|
};
|
||||||
version = "3.12.0";
|
version = "3.12.0";
|
||||||
};
|
};
|
||||||
fusuma-plugin-appmatcher = {
|
fusuma-plugin-appmatcher = {
|
||||||
dependencies = ["fusuma" "rexml" "ruby-dbus"];
|
dependencies = [ "fusuma" "rexml" "ruby-dbus" ];
|
||||||
groups = ["default"];
|
groups = [ "default" ];
|
||||||
platforms = [];
|
platforms = [ ];
|
||||||
source = {
|
source = {
|
||||||
remotes = ["https://rubygems.org"];
|
remotes = [ "https://rubygems.org" ];
|
||||||
sha256 = "0ip25c7kz6lpnmjpdmxxaballjnml79p3gvhrqabppk29bmrgqrh";
|
sha256 = "0ip25c7kz6lpnmjpdmxxaballjnml79p3gvhrqabppk29bmrgqrh";
|
||||||
type = "gem";
|
type = "gem";
|
||||||
};
|
};
|
||||||
version = "0.12.0";
|
version = "0.12.0";
|
||||||
};
|
};
|
||||||
fusuma-plugin-keypress = {
|
fusuma-plugin-keypress = {
|
||||||
dependencies = ["fusuma"];
|
dependencies = [ "fusuma" ];
|
||||||
groups = ["default"];
|
groups = [ "default" ];
|
||||||
platforms = [];
|
platforms = [ ];
|
||||||
source = {
|
source = {
|
||||||
remotes = ["https://rubygems.org"];
|
remotes = [ "https://rubygems.org" ];
|
||||||
sha256 = "sha256-NBrLjKexZ+w5gAbjtC4Y2XntTvGLFUP3Qiv5koxsmpk=";
|
sha256 = "sha256-NBrLjKexZ+w5gAbjtC4Y2XntTvGLFUP3Qiv5koxsmpk=";
|
||||||
type = "gem";
|
type = "gem";
|
||||||
};
|
};
|
||||||
version = "0.11.0";
|
version = "0.11.0";
|
||||||
};
|
};
|
||||||
fusuma-plugin-sendkey = {
|
fusuma-plugin-sendkey = {
|
||||||
dependencies = ["fusuma" "revdev"];
|
dependencies = [ "fusuma" "revdev" ];
|
||||||
groups = ["default"];
|
groups = [ "default" ];
|
||||||
platforms = [];
|
platforms = [ ];
|
||||||
source = {
|
source = {
|
||||||
remotes = ["https://rubygems.org"];
|
remotes = [ "https://rubygems.org" ];
|
||||||
sha256 = "1gy0gz2kyavfvq4sfqvybzaah8hiajfzi2mlcizv2n834vy9lwhj";
|
sha256 = "1gy0gz2kyavfvq4sfqvybzaah8hiajfzi2mlcizv2n834vy9lwhj";
|
||||||
type = "gem";
|
type = "gem";
|
||||||
};
|
};
|
||||||
version = "0.14.0";
|
version = "0.14.0";
|
||||||
};
|
};
|
||||||
logger = {
|
logger = {
|
||||||
groups = ["default"];
|
groups = [ "default" ];
|
||||||
platforms = [];
|
platforms = [ ];
|
||||||
source = {
|
source = {
|
||||||
remotes = ["https://rubygems.org"];
|
remotes = [ "https://rubygems.org" ];
|
||||||
sha256 = "00q2zznygpbls8asz5knjvvj2brr3ghmqxgr83xnrdj4rk3xwvhr";
|
sha256 = "00q2zznygpbls8asz5knjvvj2brr3ghmqxgr83xnrdj4rk3xwvhr";
|
||||||
type = "gem";
|
type = "gem";
|
||||||
};
|
};
|
||||||
version = "1.7.0";
|
version = "1.7.0";
|
||||||
};
|
};
|
||||||
revdev = {
|
revdev = {
|
||||||
groups = ["default"];
|
groups = [ "default" ];
|
||||||
platforms = [];
|
platforms = [ ];
|
||||||
source = {
|
source = {
|
||||||
remotes = ["https://rubygems.org"];
|
remotes = [ "https://rubygems.org" ];
|
||||||
sha256 = "1b6zg6vqlaik13fqxxcxhd4qnkfgdjnl4wy3a1q67281bl0qpsz9";
|
sha256 = "1b6zg6vqlaik13fqxxcxhd4qnkfgdjnl4wy3a1q67281bl0qpsz9";
|
||||||
type = "gem";
|
type = "gem";
|
||||||
};
|
};
|
||||||
version = "0.2.1";
|
version = "0.2.1";
|
||||||
};
|
};
|
||||||
rexml = {
|
rexml = {
|
||||||
groups = ["default"];
|
groups = [ "default" ];
|
||||||
platforms = [];
|
platforms = [ ];
|
||||||
source = {
|
source = {
|
||||||
remotes = ["https://rubygems.org"];
|
remotes = [ "https://rubygems.org" ];
|
||||||
sha256 = "0hninnbvqd2pn40h863lbrn9p11gvdxp928izkag5ysx8b1s5q0r";
|
sha256 = "0hninnbvqd2pn40h863lbrn9p11gvdxp928izkag5ysx8b1s5q0r";
|
||||||
type = "gem";
|
type = "gem";
|
||||||
};
|
};
|
||||||
version = "3.4.4";
|
version = "3.4.4";
|
||||||
};
|
};
|
||||||
ruby-dbus = {
|
ruby-dbus = {
|
||||||
dependencies = ["logger" "rexml"];
|
dependencies = [ "logger" "rexml" ];
|
||||||
groups = ["default"];
|
groups = [ "default" ];
|
||||||
platforms = [];
|
platforms = [ ];
|
||||||
source = {
|
source = {
|
||||||
remotes = ["https://rubygems.org"];
|
remotes = [ "https://rubygems.org" ];
|
||||||
sha256 = "0528x9jm3frq3r10ilf1fkhsy3m5w2gkr93pa5xcixv1daliqhzy";
|
sha256 = "0528x9jm3frq3r10ilf1fkhsy3m5w2gkr93pa5xcixv1daliqhzy";
|
||||||
type = "gem";
|
type = "gem";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user