about summary refs log tree commit diff
path: root/modules/keyd-qol.nix
blob: 8d97089901a541c63c86f655e953ce457b92c596 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ config, pkgs, unstable, unstable-small, lib, ... }:

{
  options.services.keyd-qol.enable = lib.mkEnableOption "keyd service for quality-of-life improvements";

  config = lib.mkIf config.services.keyd-qol.enable {
    services.keyd.enable = true;

    services.keyd.keyboards = {
      default = {
        ids = [ "*" ];
        settings = {
          main = {
            capslock = "overload(control, esc)";

            insert = "S-insert";
          };
        };
      };

      sun = {
        ids = [
          # HHKB Hybrid
          "04fe:0021"
        ];
        settings = {
          main = {
            control = "overload(control, esc)";

            insert = "S-insert";
          };
        };
      };

      kensington_trackball = {
        ids = [
          # Slimblade Pro
          "047d:80d4"
        ];
        settings = {
          main = {
            # MIDDLE / MOUSE1
            # LEFT   / RIGHT
            middlemouse = "middlemouse";
            mouse1 = "rightmouse";
            leftmouse = "leftmouse";
            rightmouse = "back";
          };
        };
      };
    };
  };
}