Skip to content

drxxmy/opentabletdriver-nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

OpenTabletDriver Home Manager Module ❄️

Declarative configuration module for OpenTabletDriver using Home Manager.

This module generates:

~/.config/OpenTabletDriver/settings.json

Features

  • Declarative tablet profile configuration
  • Supports:
    • Absolute mode
    • Linux artist mode
    • Relative mode
  • Display & tablet area mapping
  • Smoothing filter configuration
  • Tip bindings
  • Pen button key bindings

Requirements

  • NixOS with hardware.opentabletdriver.enable = true;
  • Home Manager
  • OpenTabletDriver daemon running as user service

Installation (Flake)

{
  inputs.opentabletdriver.url = "github:drxxmy/opentabletdriver-nix";

  outputs = { self, nixpkgs, opentabletdriver, ... }: {
    # ...
  };
}

Then import the module:

imports = [
  inputs.opentabletdriver.homeManagerModules.default
];

Example configuration

{ inputs, ... }:
{
  flake.modules.nixos.tablet = {
    # Enable NixOS module for OpenTabletDriver
    hardware.opentabletdriver = {
      enable = true;
      daemon.enable = true;
    };
  };

  flake.modules.homeManager.tablet = {
    imports = [
      # Import home-manager module here...
      inputs.opentabletdriver.homeManagerModules.default
    ];

    # Configure tablet
    programs.opentabletdriver = {
      enable = true;
      settings = {
        tabletName = "Wacom CTL-671";

        display = {
          width = 1920.0;
          height = 1080.0;
          x = 960.0;
          y = 540.0;
        };

        area = {
          width = 74.0;
          height = 41.625;
          x = 120.0;
          y = 107.25;
        };

        filters = {
          smoothing = {
            enable = true;
            outerRadius = 0.57216;
            innerRadius = 0.234;
            initialCoefficient = 0.234;
            softKneeScale = 0.40852;
            leakCoefficient = 0.3065;
          };
        };

        bindings = {
          tip = {
            enable = true;
            disablePressure = true;
            disableTilt = true;
          };
        };
      };
    };
  };
}

About

❄️ Home-manager module for OpenTabletDriver!

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages