tablet driver
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
hardware = {
|
hardware = {
|
||||||
firmware.enable = true;
|
firmware.enable = true;
|
||||||
ssd.enable = true;
|
ssd.enable = true;
|
||||||
|
tablet.enable = true;
|
||||||
};
|
};
|
||||||
graphical = {
|
graphical = {
|
||||||
audio.enable = true;
|
audio.enable = true;
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ in {
|
|||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
wayland
|
wayland
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
xfce.tumbler # for thumbnails
|
||||||
#qt5.qtwayland
|
#qt5.qtwayland
|
||||||
#qt6.qmake
|
#qt6.qmake
|
||||||
#qt6.qtwayland
|
#qt6.qtwayland
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver.wacom.enable = true;
|
#services.xserver.wacom.enable = true;
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
@@ -59,7 +59,7 @@ in
|
|||||||
p7zip
|
p7zip
|
||||||
qbittorrent
|
qbittorrent
|
||||||
brightnessctl
|
brightnessctl
|
||||||
wacomtablet
|
#wacomtablet
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
libsForQt5.kolourpaint
|
libsForQt5.kolourpaint
|
||||||
libsForQt5.kcalc
|
libsForQt5.kcalc
|
||||||
|
|||||||
@@ -8,5 +8,6 @@
|
|||||||
./vfio.nix
|
./vfio.nix
|
||||||
./wooting.nix
|
./wooting.nix
|
||||||
./tpm.nix
|
./tpm.nix
|
||||||
|
./tablet.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
32
modules/hardware/tablet-patches.diff
Normal file
32
modules/hardware/tablet-patches.diff
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
diff --git a/OpenTabletDriver.Plugin/Log.cs b/OpenTabletDriver.Plugin/Log.cs
|
||||||
|
index c77d83e1..28577939 100644
|
||||||
|
--- a/OpenTabletDriver.Plugin/Log.cs
|
||||||
|
+++ b/OpenTabletDriver.Plugin/Log.cs
|
||||||
|
@@ -74,7 +74,7 @@ namespace OpenTabletDriver.Plugin
|
||||||
|
/// <param name="text">Text for the <see cref="LogMessage"/>.</param>
|
||||||
|
public static void Debug(string group, string text)
|
||||||
|
{
|
||||||
|
- Write(group, text, LogLevel.Debug);
|
||||||
|
+ Write(group, text, LogLevel.Info);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
diff --git a/OpenTabletDriver.Plugin/Tablet/TiltTabletReport.cs b/OpenTabletDriver.Plugin/Tablet/TiltTabletReport.cs
|
||||||
|
index c5251855..8daa3d01 100644
|
||||||
|
--- a/OpenTabletDriver.Plugin/Tablet/TiltTabletReport.cs
|
||||||
|
+++ b/OpenTabletDriver.Plugin/Tablet/TiltTabletReport.cs
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
using System.Numerics;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
+using OpenTabletDriver.Plugin.Logging;
|
||||||
|
|
||||||
|
namespace OpenTabletDriver.Plugin.Tablet
|
||||||
|
{
|
||||||
|
@@ -27,6 +28,7 @@ namespace OpenTabletDriver.Plugin.Tablet
|
||||||
|
penByte.IsBitSet(1),
|
||||||
|
penByte.IsBitSet(2)
|
||||||
|
};
|
||||||
|
+ Log.Write("Device", $"{Tilt}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] Raw { set; get; }
|
||||||
14
modules/hardware/tablet.nix
Normal file
14
modules/hardware/tablet.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
let cfg = config.custom.hardware.tablet;
|
||||||
|
in {
|
||||||
|
options.custom.hardware.tablet = {
|
||||||
|
enable = mkEnableOption "Enables tablet";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
hardware.opentabletdriver.enable = true;
|
||||||
|
#hardware.opentabletdriver.package = pkgs.opentabletdriver.overrideAttrs
|
||||||
|
# (old: { patches = old.patches ++ [ ./tablet-patches.diff ]; });
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user