all repos

dotfiles @ d293e77

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