all repos

dotfiles @ 5fb063a

i use rach linux btw

dotfiles/config/niri/config.kdl (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
updates, 1 month ago
1
// vim: foldenable foldmethod=marker ts=2 sw=2
2
// auto start {{{
3
spawn-at-startup "noctalia"
4
// }}}
5
// env {{{
6
environment {
7
  XDG_CURRENT_DESKTOP "niri"
8
  ELECTRON_OZONE_PLATFORM_HINT "auto"
9
  DISPLAY null
10
  GTK_IM_MODULE "simple"
11
  MOZ_ENABLE_WAYLAND "1"
12
  QT_QPA_PLATFORM "wayland;xcb"
13
  QT_QPA_PLATFORMTHEME "gtk3"
14
  QT_QPA_PLATFORMTHEME_QT6 "gtk3"
15
  QT_WAYLAND_DISABLE_WINDOWDECORATION "1"
16
}
17
// }}}
18
// inputs {{{
19
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
20
input {
21
  keyboard {
22
    xkb {
23
      layout "us,ua"
24
      options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
25
    }
26
  }
27
  touchpad {
28
    tap
29
    dwt
30
    // dwtp
31
    // drag-lock
32
    accel-speed 0.2
33
    scroll-factor 1.5
34
    accel-profile "adaptive"
35
    click-method "clickfinger"
36
    scroll-method "two-finger"
37
  }
38
  focus-follows-mouse max-scroll-amount="25%"
39
  mouse {
40
    accel-speed 0.0
41
    accel-profile "flat"
42
  }
43
}
44
45
switch-events {
46
  lid-close { spawn "noctalia" "msg" "session" "lock-and-suspend"; }
47
}
48
/// }}}
49
// Monitors {{{
50
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
51
output "HDMI-A-1" {
52
  focus-at-startup
53
  mode "1920x1080@100.00"
54
  scale 1
55
  transform "normal"
56
  position x=0 y=0
57
}
58
59
output "eDP-1" {
60
  focus-at-startup
61
  mode "1920x1080@60.001"
62
  scale 1
63
  transform "normal"
64
  position x=1920 y=144
65
}
66
/// }}}
67
// Layout {{{
68
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
69
layout {
70
  gaps 0
71
  center-focused-column "never"
72
  default-column-width { proportion 0.7; }
73
  border { off; }
74
  preset-column-widths {
75
    proportion 0.33333
76
    proportion 0.5
77
    proportion 0.66667
78
  }
79
  focus-ring {
80
    width 2
81
    active-color "#7aa2f7"
82
    inactive-color "#292e42"
83
  }
84
}
85
// }}}
86
// general {{{
87
prefer-no-csd
88
hotkey-overlay { skip-at-startup; }
89
animations { off; }
90
debug { honor-xdg-activation-with-invalid-serial; }
91
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
92
// }}}
93
// window/workspace rules {{{
94
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
95
// https://github.com/YaLTeR/niri/wiki/Configuration:-move-column-to-workspace
96
97
workspace "one" { open-on-output "HDMI-A-1"; }
98
workspace "two" { open-on-output "HDMI-A-1"; }
99
workspace "tri" { open-on-output "HDMI-A-1"; }
100
workspace "laptop" { open-on-output "eDP-1"; }
101
102
window-rule {
103
  match app-id="obsidian"
104
  match app-id="discord"
105
  match app-id="org.mozilla.Thunderbird"
106
  match app-id="org.telegram.desktop"
107
  open-on-workspace "one"
108
}
109
110
window-rule {
111
  match app-id="firefox"
112
  match app-id="brave-browser"
113
  match app-id="helium"
114
  open-on-workspace "two"
115
  open-focused true
116
}
117
118
window-rule {
119
  match app-id="spotify"
120
  match app-id="org.gnome.Snapshot"
121
  match app-id="org.keepassxc.KeePassXC"
122
  open-on-workspace "laptop"
123
}
124
125
window-rule {
126
  match app-id="Spotify"
127
  match app-id="spotify"
128
  match app-id="firefox"
129
  match app-id="helium"
130
  match app-id="Brave-browser"
131
  match app-id="brave-browser"
132
  match app-id="kitty"
133
  match app-id="wezterm"
134
  match app-id="ghostty"
135
  match app-id="obsidian"
136
  match app-id="Code"
137
  match app-id="Zed"
138
  match app-id="discord"
139
  match app-id="vesktop"
140
  open-maximized true
141
}
142
143
window-rule {
144
  match app-id="pavucontrol"
145
  match app-id="blueman-manager"
146
  match app-id="xdg-desktop-portal-gtk"
147
  open-floating true
148
}
149
150
window-rule {
151
  match app-id="KeePassXC"
152
  match app-id="obsidian"
153
  match app-id="org.telegram.desktop"
154
  block-out-from "screen-capture"
155
}
156
157
// noctalia
158
layer-rule {
159
  match namespace="^noctalia-backdrop"
160
  place-within-backdrop true
161
}
162
163
window-rule {
164
  match app-id="dev.noctalia.Noctalia"
165
  open-floating true
166
  default-column-width { fixed 1080; }
167
  default-window-height { fixed 920; }
168
}
169
// }}}
170
// keybinds {{{
171
binds {
172
  Mod+q { close-window; }
173
  Mod+d { spawn "noctalia" "msg" "notification-clear-active"; }
174
  Mod+Alt+l { spawn "noctalia" "msg" "session" "lock"; }
175
  Mod+Shift+Escape { spawn "noctalia" "msg" "panel-toggle" "session"; }
176
  Mod+Shift+Return { spawn "noctalia" "msg" "panel-toggle" "launcher"; }
177
178
  Mod+Return  { spawn "wezterm"; }
179
  Mod+Shift+a { spawn "anki"; }
180
  Mod+Shift+d { spawn "discord"; }
181
  Mod+Shift+s { spawn "sioyek"; }
182
  Mod+Shift+t { spawn "Telegram"; }
183
  Mod+Shift+w { spawn "helium-browser"; }
184
185
  // func keys {{{
186
  XF86AudioRaiseVolume allow-when-locked=true { spawn "noctalia" "msg" "volume-up"; }
187
  XF86AudioLowerVolume allow-when-locked=true { spawn "noctalia" "msg" "volume-down"; }
188
  XF86AudioMute        allow-when-locked=true { spawn "noctalia" "msg" "volume-mute"; }
189
  XF86AudioMicMute     allow-when-locked=true { spawn "noctalia" "msg" "mic-mute"; }
190
  XF86AudioNext { spawn "noctalia" "msg" "media" "next"; }
191
  XF86AudioPlay { spawn "noctalia" "msg" "media" "toggle"; }
192
  XF86AudioPrev { spawn "noctalia" "msg" "media" "previous"; }
193
  // brighthness
194
  XF86MonBrightnessDown allow-when-locked=true { spawn "noctalia" "msg" "brightness-down"; }
195
  XF86MonBrightnessUp   allow-when-locked=true { spawn "noctalia" "msg" "brightness-up"; }
196
  // screen shots
197
  Print { screenshot; }
198
  Alt+Print { screenshot-window; }
199
  Ctrl+Print { screenshot-screen; }
200
  // }}}
201
  // wm {{{
202
  Mod+O repeat=false { toggle-overview; }
203
  Alt+Tab { focus-window-previous; }
204
205
  // window management
206
  Mod+Ctrl+f { toggle-window-floating; }
207
  Mod+r { switch-preset-column-width; }
208
  Mod+t { maximize-column; }
209
  Mod+f { fullscreen-window; }
210
211
  Mod+Minus { set-column-width "-10%"; }
212
  Mod+Equal { set-column-width "+10%"; }
213
214
  Mod+h { focus-column-left; }
215
  Mod+j { focus-window-down; }
216
  Mod+k { focus-window-up; }
217
  Mod+l { focus-column-right; }
218
  Mod+Shift+h { move-column-left; }
219
  Mod+Shift+j { move-window-down; }
220
  Mod+Shift+k { move-window-up; }
221
  Mod+Shift+l { move-column-right; }
222
223
  // monitor navigation
224
  Mod+Comma { focus-monitor-left; }
225
  Mod+Period { focus-monitor-right; }
226
  Mod+Shift+Comma { move-column-to-monitor-left; }
227
  Mod+Shift+Period { move-column-to-monitor-right; }
228
229
  // workspaces
230
  Mod+1 { focus-workspace 1; }
231
  Mod+2 { focus-workspace 2; }
232
  Mod+3 { focus-workspace 3; }
233
  Mod+4 { focus-workspace 4; }
234
  Mod+5 { focus-workspace 5; }
235
  Mod+Shift+1 { move-column-to-workspace 1; }
236
  Mod+Shift+2 { move-column-to-workspace 2; }
237
  Mod+Shift+3 { move-column-to-workspace 3; }
238
  Mod+Shift+4 { move-column-to-workspace 4; }
239
  Mod+Shift+5 { move-column-to-workspace 5; }
240
241
  Mod+WheelScrollDown cooldown-ms=50 { focus-workspace-down; }
242
  Mod+WheelScrollUp   cooldown-ms=50 { focus-workspace-up; }
243
  // }}}
244
}
245
// }}}