diff --git a/hosts/monolith.nix b/hosts/monolith.nix index c78f64f..24588dc 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -11,6 +11,8 @@ in boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + hardware.opentabletdriver.enable = true; + boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; diff --git a/user/sway/default.nix b/user/sway/default.nix index 7f7b8b8..16cb78e 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -100,6 +100,8 @@ in indicator = true; }; + xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json; + home.packages = with pkgs; [ sway swaybg diff --git a/user/sway/open-tablet-driver.json b/user/sway/open-tablet-driver.json new file mode 100644 index 0000000..834c323 --- /dev/null +++ b/user/sway/open-tablet-driver.json @@ -0,0 +1,114 @@ +{ + "Profiles": [ + { + "Tablet": "Wacom CTL-4100", + "OutputMode": { + "Path": "OpenTabletDriver.Desktop.Output.LinuxArtistMode", + "Settings": [], + "Enable": true + }, + "Filters": [], + "AbsoluteModeSettings": { + "Display": { + "Width": 1920.0, + "Height": 1080.0, + "X": 960.0, + "Y": 540.0, + "Rotation": 0.0 + }, + "Tablet": { + "Width": 152.0, + "Height": 85.5, + "X": 76.0, + "Y": 47.5, + "Rotation": 0.0 + }, + "EnableClipping": false, + "EnableAreaLimiting": false, + "LockAspectRatio": true + }, + "RelativeModeSettings": { + "XSensitivity": 10.0, + "YSensitivity": 10.0, + "RelativeRotation": 0.0, + "RelativeResetDelay": "00:00:00.1000000" + }, + "Bindings": { + "TipActivationThreshold": 0.0, + "TipButton": null, + "EraserActivationThreshold": 0.0, + "EraserButton": null, + "PenButtons": [ + { + "Path": "OpenTabletDriver.Desktop.Binding.LinuxArtistMode.LinuxArtistModeButtonBinding", + "Settings": [ + { + "Property": "Button", + "Value": "Pen Button 1" + } + ], + "Enable": true + }, + { + "Path": "OpenTabletDriver.Desktop.Binding.LinuxArtistMode.LinuxArtistModeButtonBinding", + "Settings": [ + { + "Property": "Button", + "Value": "Pen Button 2" + } + ], + "Enable": true + } + ], + "AuxButtons": [ + { + "Path": "OpenTabletDriver.Desktop.Binding.MultiKeyBinding", + "Settings": [ + { + "Property": "Keys", + "Value": "Control+Z" + } + ], + "Enable": true + }, + { + "Path": "OpenTabletDriver.Desktop.Binding.MultiKeyBinding", + "Settings": [ + { + "Property": "Keys", + "Value": "Control+Shift+Z" + } + ], + "Enable": true + }, + { + "Path": "OpenTabletDriver.Desktop.Binding.MultiKeyBinding", + "Settings": [ + { + "Property": "Keys", + "Value": "Control+Minus" + } + ], + "Enable": true + }, + { + "Path": "OpenTabletDriver.Desktop.Binding.MultiKeyBinding", + "Settings": [ + { + "Property": "Keys", + "Value": "Control+Shift+Equal" + } + ], + "Enable": true + } + ], + "MouseButtons": [], + "MouseScrollUp": null, + "MouseScrollDown": null + } + } + ], + "LockUsableAreaDisplay": true, + "LockUsableAreaTablet": true, + "Tools": [] +} \ No newline at end of file