all repos

dotfiles @ 5c6170b

i use rach linux btw

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
updaties, 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="discord"
99
  match app-id="org.mozilla.Thunderbird"
100
  match app-id="org.telegram.desktop"
101
  open-on-workspace "one"
102
}
103
104
window-rule {
105
  match app-id="firefox"
106
  match app-id="brave-browser"
107
  match app-id="helium"
108
  open-on-workspace "two"
109
  open-focused true
110
}
111
112
window-rule {
113
  match app-id="spotify"
114
  match app-id="org.gnome.Snapshot"
115
  match app-id="org.gnome.Calendar"
116
  match app-id="org.keepassxc.KeePassXC"
117
  open-on-workspace "laptop"
118
}
119
120
window-rule {
121
  match app-id="Spotify"
122
  match app-id="spotify"
123
  match app-id="zen"
124
  match app-id="firefox"
125
  match app-id="helium"
126
  match app-id="Brave-browser"
127
  match app-id="brave-browser"
128
  match app-id="kitty"
129
  match app-id="ghostty"
130
  match app-id="obsidian"
131
  match app-id="Code"
132
  match app-id="Zed"
133
  match app-id="discord"
134
  open-maximized true
135
}
136
137
window-rule {
138
  match app-id="pavucontrol"
139
  match app-id="blueman-manager"
140
  match app-id="xdg-desktop-portal-gtk"
141
  open-floating true
142
}
143
144
window-rule {
145
  match app-id="KeePassXC"
146
  match app-id="obsidian"
147
  match app-id="org.telegram.desktop"
148
  block-out-from "screen-capture"
149
}
150
// }}}
151
// keybinds {{{
152
binds {
153
  Mod+d { spawn "dunstctl" "close"; }
154
  Mod+q { close-window; }
155
  Mod+Alt+l { spawn "hyprlock"; }
156
  Mod+Return { spawn "ghostty"; }
157
  Mod+Shift+Escape { spawn "~/bin/wofi-power-menu" "niri";}
158
  Mod+Shift+Return { spawn "wofi"; }
159
160
  Mod+Shift+a { spawn "anki"; }
161
  Mod+Shift+r { spawn "sioyek"; }
162
  Mod+Shift+s { spawn "gelly"; }
163
  Mod+Shift+t { spawn "Telegram"; }
164
  Mod+Shift+w { spawn "helium-browser"; }
165
  // func keys {{{
166
  // audio
167
  XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"; }
168
  XF86AudioMicMute     allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
169
  XF86AudioMute        allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
170
  XF86AudioNext        allow-when-locked=true { spawn "playerctl" "next"; }
171
  XF86AudioPlay        allow-when-locked=true { spawn "playerctl" "play-pause"; }
172
  XF86AudioPrev        allow-when-locked=true { spawn "playerctl" "previous"; }
173
  XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"; }
174
  // brighthness
175
  XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "set" "5%-"; }
176
  XF86MonBrightnessUp   allow-when-locked=true { spawn "brightnessctl" "set" "+5%"; }
177
  // screen shots
178
  Print { screenshot; }
179
  Alt+Print { screenshot-window; }
180
  Ctrl+Print { screenshot-screen; }
181
  // }}}
182
  // wm {{{
183
  Mod+O repeat=false { toggle-overview; }
184
  Alt+Tab { focus-window-previous; }
185
186
  // window management {{{
187
  Mod+Ctrl+f { toggle-window-floating; }
188
189
  Mod+r { switch-preset-column-width; }
190
  Mod+t { maximize-column; }
191
  Mod+f { fullscreen-window; }
192
193
  Mod+Minus { set-column-width "-10%"; }
194
  Mod+Equal { set-column-width "+10%"; }
195
196
  Mod+h { focus-column-left; }
197
  Mod+j { focus-window-down; }
198
  Mod+k { focus-window-up; }
199
  Mod+l { focus-column-right; }
200
  Mod+Shift+h { move-column-left; }
201
  Mod+Shift+j { move-window-down; }
202
  Mod+Shift+k { move-window-up; }
203
  Mod+Shift+l { move-column-right; }
204
205
  // monitor navigation
206
  Mod+Comma { focus-monitor-left; }
207
  Mod+Period { focus-monitor-right; }
208
  Mod+Shift+Comma { move-column-to-monitor-left; }
209
  Mod+Shift+Period { move-column-to-monitor-right; }
210
211
  // workspaces
212
  Mod+1 { focus-workspace 1; }
213
  Mod+2 { focus-workspace 2; }
214
  Mod+3 { focus-workspace 3; }
215
  Mod+4 { focus-workspace 4; }
216
  Mod+5 { focus-workspace 5; }
217
  Mod+Shift+1 { move-column-to-workspace 1; }
218
  Mod+Shift+2 { move-column-to-workspace 2; }
219
  Mod+Shift+3 { move-column-to-workspace 3; }
220
  Mod+Shift+4 { move-column-to-workspace 4; }
221
  Mod+Shift+5 { move-column-to-workspace 5; }
222
223
  Mod+WheelScrollDown cooldown-ms=50 { focus-workspace-down; }
224
  Mod+WheelScrollUp   cooldown-ms=50 { focus-workspace-up; }
225
  // }}}
226
}
227
// }}}