all repos

dotfiles @ daa4972

i use rach linux btw

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
wezterm; update yazi, 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
  open-maximized true
140
}
141
142
window-rule {
143
  match app-id="pavucontrol"
144
  match app-id="blueman-manager"
145
  match app-id="xdg-desktop-portal-gtk"
146
  open-floating true
147
}
148
149
window-rule {
150
  match app-id="KeePassXC"
151
  match app-id="obsidian"
152
  match app-id="org.telegram.desktop"
153
  block-out-from "screen-capture"
154
}
155
156
// noctalia
157
layer-rule {
158
  match namespace="^noctalia-backdrop"
159
  place-within-backdrop true
160
}
161
162
window-rule {
163
  match app-id="dev.noctalia.Noctalia"
164
  open-floating true
165
  default-column-width { fixed 1080; }
166
  default-window-height { fixed 920; }
167
}
168
// }}}
169
// keybinds {{{
170
binds {
171
  Mod+q { close-window; }
172
  Mod+d { spawn "noctalia" "msg" "notification-clear-active"; }
173
  Mod+Alt+l { spawn "noctalia" "msg" "session" "lock"; }
174
  Mod+Shift+Escape { spawn "noctalia" "msg" "panel-toggle" "session"; }
175
  Mod+Shift+Return { spawn "noctalia" "msg" "panel-toggle" "launcher"; }
176
177
  Mod+Return  { spawn "wezterm"; }
178
  Mod+Shift+a { spawn "anki"; }
179
  Mod+Shift+d { spawn "discord"; }
180
  Mod+Shift+s { spawn "sioyek"; }
181
  Mod+Shift+t { spawn "Telegram"; }
182
  Mod+Shift+w { spawn "helium-browser"; }
183
184
  // func keys {{{
185
  XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"; }
186
  XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"; }
187
  XF86AudioMute        allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
188
  XF86AudioMicMute     allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
189
  XF86AudioNext { spawn "playerctl" "next"; }
190
  XF86AudioPlay { spawn "playerctl" "play-pause"; }
191
  XF86AudioPrev { spawn "playerctl" "previous"; }
192
  // brighthness
193
  XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "set" "5%-"; }
194
  XF86MonBrightnessUp   allow-when-locked=true { spawn "brightnessctl" "set" "+5%"; }
195
  // screen shots
196
  Print { screenshot; }
197
  Alt+Print { screenshot-window; }
198
  Ctrl+Print { screenshot-screen; }
199
  // }}}
200
  // wm {{{
201
  Mod+O repeat=false { toggle-overview; }
202
  Alt+Tab { focus-window-previous; }
203
204
  // window management
205
  Mod+Ctrl+f { toggle-window-floating; }
206
  Mod+r { switch-preset-column-width; }
207
  Mod+t { maximize-column; }
208
  Mod+f { fullscreen-window; }
209
210
  Mod+Minus { set-column-width "-10%"; }
211
  Mod+Equal { set-column-width "+10%"; }
212
213
  Mod+h { focus-column-left; }
214
  Mod+j { focus-window-down; }
215
  Mod+k { focus-window-up; }
216
  Mod+l { focus-column-right; }
217
  Mod+Shift+h { move-column-left; }
218
  Mod+Shift+j { move-window-down; }
219
  Mod+Shift+k { move-window-up; }
220
  Mod+Shift+l { move-column-right; }
221
222
  // monitor navigation
223
  Mod+Comma { focus-monitor-left; }
224
  Mod+Period { focus-monitor-right; }
225
  Mod+Shift+Comma { move-column-to-monitor-left; }
226
  Mod+Shift+Period { move-column-to-monitor-right; }
227
228
  // workspaces
229
  Mod+1 { focus-workspace 1; }
230
  Mod+2 { focus-workspace 2; }
231
  Mod+3 { focus-workspace 3; }
232
  Mod+4 { focus-workspace 4; }
233
  Mod+5 { focus-workspace 5; }
234
  Mod+Shift+1 { move-column-to-workspace 1; }
235
  Mod+Shift+2 { move-column-to-workspace 2; }
236
  Mod+Shift+3 { move-column-to-workspace 3; }
237
  Mod+Shift+4 { move-column-to-workspace 4; }
238
  Mod+Shift+5 { move-column-to-workspace 5; }
239
240
  Mod+WheelScrollDown cooldown-ms=50 { focus-workspace-down; }
241
  Mod+WheelScrollUp   cooldown-ms=50 { focus-workspace-up; }
242
  // }}}
243
}
244
// }}}