all repos

dotfiles @ 328de0d

i use rach linux btw

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

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