tablet driver

This commit is contained in:
Kopatz
2024-05-29 15:35:51 +02:00
parent 9980828315
commit 6df154f71d
6 changed files with 51 additions and 2 deletions

View File

@@ -19,6 +19,7 @@
hardware = {
firmware.enable = true;
ssd.enable = true;
tablet.enable = true;
};
graphical = {
audio.enable = true;

View File

@@ -69,6 +69,7 @@ in {
networkmanagerapplet
wayland
wl-clipboard
xfce.tumbler # for thumbnails
#qt5.qtwayland
#qt6.qmake
#qt6.qtwayland

View File

@@ -39,7 +39,7 @@ in
];
};
services.xserver.wacom.enable = true;
#services.xserver.wacom.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
@@ -59,7 +59,7 @@ in
p7zip
qbittorrent
brightnessctl
wacomtablet
#wacomtablet
wl-clipboard
libsForQt5.kolourpaint
libsForQt5.kcalc

View File

@@ -8,5 +8,6 @@
./vfio.nix
./wooting.nix
./tpm.nix
./tablet.nix
];
}

View 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; }

View 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 ]; });
};
}