From 8ae0ac340d04fceb8fbaa832054233ce6f6c0500 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Thu, 20 Oct 2022 18:02:36 -0700 Subject: [PATCH] Working tablet driver (configs local) --- hosts/desktop.nix | 25 +++---------------------- wacom-config.sh | 12 ------------ 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100755 wacom-config.sh diff --git a/hosts/desktop.nix b/hosts/desktop.nix index bac033b..3176eb3 100644 --- a/hosts/desktop.nix +++ b/hosts/desktop.nix @@ -1,30 +1,9 @@ { config, pkgs, ... }: -let - wacom-config = pkgs.substituteAll { - name = "wacom-config"; - src = ../wacom-config.sh; - dir = "bin"; - isExecutable = true; - }; -in { services = { - dbus.packages = with pkgs; [ dconf ]; - # $ nix-shell -p usbutils - # $ lsusb - # ID : - # Gets stored in /etc/udev/rules.d/99-wacom.rules - udev.extraRules = '' - ACTION=="add", - SUBSYSTEMS=="usb", - ATTRS{idVendor}="056a", - ATTRS{idProduct}="0302", - RUN+="${wacom-config}/bin/wacom-config" - ''; - xserver = { + xserver = { enable = true; - wacom.enable = true; libinput = { enable = true; touchpad.tapping = true; @@ -54,6 +33,8 @@ in }; }; + hardware.opentabletdriver.enable = true; + # To prevent `Unit dconf.service not found.` after theming GTK in HM programs.dconf.enable = true; diff --git a/wacom-config.sh b/wacom-config.sh deleted file mode 100755 index 0f2b61c..0000000 --- a/wacom-config.sh +++ /dev/null @@ -1,12 +0,0 @@ -# ----------------------------- -# Desktop monitor configuration -# ----------------------------- -# xsetwacom --list devices | grep -oP '(?<=id:\s)\w+' | while read -r id ; do -# xsetwacom set $id MapToOutput 1920x1080+1920+0 -# done - -touch /home/elnu/wacom-ran - -/run/current-system/sw/bin/xsetwacom set "Wacom Intuos PT S Pad pad" Button 1 "key ctrl [" -/run/current-system/sw/bin/xsetwacom set "Wacom Intuos PT S Pad pad" Button 3 "key ctrl ]" -/run/current-system/sw/bin/xsetwacom set "Wacom Intuos PT S Pen stylus" Button 3 "key ctrl z"