about summary refs log tree commit diff
path: root/users/tazjin/dotfiles/niri.config.kdl
blob: a5926d5a8a8d13651c047cac2f15c98721115347 (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
// 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 12
    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"
  EDITOR "emacsclient"
}

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"; }
    Super+B { spawn "emacsclient" "-e" "(niri-go-anywhere-external)"; }

    // 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-or-monitor-left; }
    Mod+Right     { focus-column-or-monitor-right; }
    Mod+Down      { focus-column-or-monitor-right; }
    Mod+Up        { focus-column-or-monitor-left; }
    Mod+J         { focus-column-or-monitor-left; }
    Mod+K         { focus-column-or-monitor-right; }
    Mod+L         { focus-window-up; }
    Mod+Semicolon { focus-window-down; }

    Mod+Ctrl+Left  { move-column-left-or-to-monitor-left; }
    Mod+Ctrl+Right { move-column-right-or-to-monitor-right; }
    Mod+Ctrl+J     { move-column-left-or-to-monitor-left; }
    Mod+Ctrl+K     { move-column-right-or-to-monitor-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; }

    // Scroll (or move windows) between columns when holding the modifier down.
    Mod+WheelScrollDown      cooldown-ms=150 { focus-column-or-monitor-right; }
    Mod+WheelScrollUp        cooldown-ms=150 { focus-column-or-monitor-left; }
    Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-right-or-to-monitor-right; }
    Mod+Ctrl+WheelScrollUp   cooldown-ms=150 { move-column-left-or-to-monitor-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; }
}