summaryrefslogtreecommitdiff
path: root/modules/packages/niri/settings.nix
blob: eeba0c8fcaea1c0cb0a3f4b71968692dafd96233 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{self, ...}: {
  flake.wrapperModules.niri = {
    lib,
    config,
    pkgs,
    noctalia-shell,
    ...
  }: let
    noctaliaExe = lib.getExe noctalia-shell;
  in {
    settings = {
      input = {
        focus-follows-mouse = {};

        keyboard = {
          xkb = {
            layout = "us";
          };
        };

        touchpad = {
          natural-scroll = {};
          tap = {};
          dwt = {};
        };

        mouse = {
          accel-profile = "flat";
          accel-speed = -0.35;
          scroll-factor = 0.8;
        };
      };

      layout = {
        gaps = 1;

        preset-column-widths = [
          {
            proportion = 0.33;
          }
          {
            proportion = 0.5;
          }
          {
            proportion = 0.75;
          }
          {
            proportion = 1.0;
          }
        ];
      };

      xwayland-satellite.path = lib.getExe pkgs.xwayland-satellite;
      prefer-no-csd = {};
      hotkey-overlay.skip-at-startup = {};
      gestures.hot-corners.off = {};

      binds = {
        "Mod+Shift+M".quit = {};
        "Mod+M".spawn-sh = "${noctaliaExe} ipc call sessionMenu toggle";

        "Mod+F1".spawn-sh = "${noctaliaExe} ipc call launcher toggle";
        "Mod+F2".spawn = lib.getExe self.packages.${pkgs.stdenv.hostPlatform.system}.terminal;
        "Mod+F3".spawn = lib.getExe pkgs.thunar;
        "Mod+F4".close-window = {};

        "Mod+R".switch-preset-column-width = {};

        "Mod+1".focus-workspace = "w0";
        "Mod+2".focus-workspace = "w1";
        "Mod+3".focus-workspace = "w2";
        "Mod+4".focus-workspace = "w3";
        "Mod+5".focus-workspace = "w4";
        "Mod+6".focus-workspace = "w5";
        "Mod+7".focus-workspace = "w6";
        "Mod+8".focus-workspace = "w7";
        "Mod+9".focus-workspace = "w8";
        "Mod+0".focus-workspace = "w9";

        "Mod+Shift+1".move-column-to-workspace = "w0";
        "Mod+Shift+2".move-column-to-workspace = "w1";
        "Mod+Shift+3".move-column-to-workspace = "w2";
        "Mod+Shift+4".move-column-to-workspace = "w3";
        "Mod+Shift+5".move-column-to-workspace = "w4";
        "Mod+Shift+6".move-column-to-workspace = "w5";
        "Mod+Shift+7".move-column-to-workspace = "w6";
        "Mod+Shift+8".move-column-to-workspace = "w7";
        "Mod+Shift+9".move-column-to-workspace = "w8";
        "Mod+Shift+0".move-column-to-workspace = "w9";

        "Mod+WheelScrollUp".focus-column-left = {};
        "Mod+WheelScrollDown".focus-column-right = {};
        "Mod+Shift+WheelScrollDown".focus-workspace-down = {};
        "Mod+Shift+WheelScrollUp".focus-workspace-up = {};

        "XF86AudioPrev".spawn-sh = "playerctl previous";
        "XF86AudioPause".spawn-sh = "playerctl play-pause";
        "XF86AudioPlay".spawn-sh = "playerctl play-pause";
        "XF86AudioNext".spawn-sh = "playerctl next";
        "XF86AudioStop".spawn-sh = "playerctl stop";

        "Shift+XF86AudioPrev".spawn-sh = "playerctl --player=Feishin previous";
        "Shift+XF86AudioPause".spawn-sh = "playerctl --player=Feishin play-pause";
        "Shift+XF86AudioPlay".spawn-sh = "playerctl --player=Feishin play-pause";
        "Shift+XF86AudioNext".spawn-sh = "playerctl --player=Feishin next";
        "Shift+XF86AudioStop".spawn-sh = "playerctl --player=Feishin stop";

        "XF86AudioRaiseVolume".spawn-sh = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+";
        "XF86AudioLowerVolume".spawn-sh = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-";
        "XF86AudioMute".spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";

        "XF86MonBrightnessUp".spawn-sh = "${noctaliaExe} brightness increase";
        "XF86MonBrightnessDown".spawn-sh = "${noctaliaExe} brightness decrease";
      };

      spawn-at-startup = [
        noctaliaExe
      ];
    };
  };
}