about summary refs log tree commit diff
path: root/users/tazjin/dotfiles/niri.config.kdl
blob: 8a9ed39f5a29bb10a59daa6ffdc6c06d659b90a9 (plain) (blame)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview

input {
    keyboard {
        xkb {
            layout "us,ru"
            variant "hyper"
            options "grp:win_space_toggle,compose:ralt,caps:hyper"
        }
    }

    touchpad {
        tap
    }
}

layout {
    gaps 14
    center-focused-column "never"

    preset-column-widths {
        proportion 0.33333
        proportion 0.5
        proportion 0.66667
    }

    default-column-width {}

    focus-ring {
        off
    }

    border {
        off
    }
}

spawn-at-startup "xwayland-satellite"
spawn-at-startup "xrandr --output eDP-1 --primary"
spawn-at-startup "wpaperd" "-d"
spawn-at-startup "systemctl --user start xss-lock"

environment {
  QT_QPA_PLATFORM "wayland"
  DISPLAY ":0"
}

hotkey-overlay {
  skip-at-startup
}

screenshot-path "~/screenshots/screenshot-%Y-%m-%d_%H-%M-%S.png"

animations {
    slowdown 0.3
}

binds {
    Mod+Shift+Slash { show-hotkey-overlay; }

    Mod+T { spawn "emacsclient" "--no-wait" "--create-frame" "--eval" "(vterm)"; }
    Mod+Shift+T { spawn "alacritty"; } // fallback terminal
    Mod+D { spawn "xfce4-appfinder" "--disable-server"; }
    Super+Alt+L { spawn "swaylock" "-fFkl" "-c" "#008080"; }

    // Volume control
    XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
    XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
    XF86AudioMute        allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
    XF86AudioMicMute     allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }

    // Brightness control
    XF86MonBrightnessUp allow-when-locked=true { spawn "light" "-A" "5"; }
    Shift+XF86MonBrightnessUp allow-when-locked=true { spawn "light" "-A" "1"; }
    XF86MonBrightnessDown allow-when-locked=true { spawn "light" "-U" "5"; }
    Shift+XF86MonBrightnessDown allow-when-locked=true { spawn "light" "-U" "1"; }

    Mod+Q { close-window; }

    Mod+Left      { focus-column-left; }
    Mod+Right     { focus-column-right; }
    Mod+Down      { focus-column-right; }
    Mod+Up        { focus-column-left; }
    Mod+J         { focus-column-left; }
    Mod+K         { focus-column-right; }
    Mod+L         { focus-window-up; }
    Mod+Semicolon { focus-window-down; }

    Mod+Ctrl+Left  { move-column-left; }
    Mod+Ctrl+Right { move-column-right; }
    Mod+Ctrl+J     { move-column-left; }
    Mod+Ctrl+K     { move-column-right; }

    Mod+Home { focus-column-first; }
    Mod+End  { focus-column-last; }

    Mod+Ctrl+Home { move-column-to-first; }
    Mod+Ctrl+End  { move-column-to-last; }

    Mod+Shift+Left  { focus-monitor-left; }
    Mod+Shift+Down  { focus-monitor-down; }
    Mod+Shift+Up    { focus-monitor-up; }
    Mod+Shift+Right { focus-monitor-right; }
    Mod+Shift+H     { focus-monitor-left; }
    Mod+Shift+J     { focus-monitor-down; }
    Mod+Shift+K     { focus-monitor-up; }
    Mod+Shift+L     { focus-monitor-right; }

    Mod+Shift+Ctrl+Left  { move-column-to-monitor-left; }
    Mod+Shift+Ctrl+Down  { move-column-to-monitor-down; }
    Mod+Shift+Ctrl+Up    { move-column-to-monitor-up; }
    Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
    Mod+Shift+Ctrl+H     { move-column-to-monitor-left; }
    Mod+Shift+Ctrl+J     { move-column-to-monitor-down; }
    Mod+Shift+Ctrl+K     { move-column-to-monitor-up; }
    Mod+Shift+Ctrl+L     { move-column-to-monitor-right; }

    // Scroll (or move windows) between columns when holding the modifier down.
    Mod+WheelScrollDown      cooldown-ms=150 { focus-column-right; }
    Mod+WheelScrollUp        cooldown-ms=150 { focus-column-left; }
    Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-right; }
    Mod+Ctrl+WheelScrollUp   cooldown-ms=150 { move-column-left; }

    Mod+Comma  { consume-window-into-column; }
    Mod+Period { expel-window-from-column; }

    // There are also commands that consume or expel a single window to the side.
    // Mod+BracketLeft  { consume-or-expel-window-left; }
    // Mod+BracketRight { consume-or-expel-window-right; }

    Mod+R { switch-preset-column-width; }
    Mod+Shift+R { reset-window-height; }
    Mod+F { maximize-column; }
    Mod+Shift+F { fullscreen-window; }
    Mod+C { center-column; }

    Mod+Minus { set-column-width "-10%"; }
    Mod+Equal { set-column-width "+10%"; }

    // Finer height adjustments when in column with other windows.
    Mod+Shift+Minus { set-window-height "-2%"; }
    Mod+Shift+Equal { set-window-height "+2%"; }

    Print { screenshot; }
    Ctrl+Print { screenshot-screen; }
    Alt+Print { screenshot-window; }

    Mod+Shift+E { quit; }
}