summaryrefslogtreecommitdiff
path: root/dot-config/hypr/rules.conf
blob: b3be2b2c4932cb3932a9b242aa044e29013b7028 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
##############################
### WINDOWS AND WORKSPACES ###
##############################

# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules

### TAG ###
# workspaces
windowrule = match:tag terminal, workspace 1
# workspace = 1, persistent:true
windowrule = match:tag web, workspace 2
# workspace = 2, persistent:true
windowrule = match:tag file, workspace 3
# workspace = 3, persistent:true
windowrule = match:tag code, workspace 4
# workspace = 4, persistent:true
windowrule = match:tag office, workspace 5
# workspace = 5, persistent:true
windowrule = match:tag communication, workspace 6
# workspace = 6, persistent:true
windowrule = match:tag media, workspace 7
# workspace = 7, persistent:true
windowrule = match:tag games, workspace 8
# workspace = 8, persistent:true
windowrule = match:tag system, workspace 9
# workspace = 9, persistent:true
windowrule = match:tag misc, workspace 10
# workspace = 10, persistent:true

# content hints(content-type-v1)
windowrule = match:tag games, content game
# windowrule = content media, tag:media-contents

# GUI Utils
windowrule = match:tag gui-utils, opacity 0.85 0.75
windowrule = match:tag gui-utils, pin on
windowrule = match:tag gui-utils, size (monitor_w*0.53) (monitor_h*0.6)
windowrule = match:tag gui-utils, move (monitor_w*0.465) (monitor_h*0.048)
windowrule = match:tag gui-utils, animation slide right top

# media contents
windowrule = match:tag media-contents, float on
windowrule = match:tag media-contents, pin on
windowrule = match:tag media-contents, move (monitor_w-window_w-$outer_gaps) 0
windowrule = match:tag media-contents, no_initial_focus on
windowrule = match:tag media-contents, no_shadow on
windowrule = match:tag media-contents, keep_aspect_ratio on
windowrule = match:tag media-contents, no_dim on
# It grabs our focus when it change video
windowrule = match:tag media-contents, suppress_event activatefocus

# fake fullscreen
windowrule = match:tag fakefullscreen, fullscreen_state 0 2

# Games
windowrule = match:tag games, fullscreen on
# Tearing (for better gaming performance)
windowrule = match:tag games, immediate on
# fh5
windowrule = match:title ^(Forza Horizon 5)$, suppress_event activatefocus
windowrule = match:class ^(steam_app_1551360)$, suppress_event activatefocus
windowrule = match:tag games, suppress_event activatefocus

# time-sensitive app rules
windowrule = match:tag time-sensitive, stay_focused on
windowrule = match:tag time-sensitive, pin on
windowrule = match:tag time-sensitive, dim_around on
windowrule = match:tag time-sensitive, center on
windowrule = match:tag time-sensitive, float on

# popup
# windowrule = stayfocused, tag:popup
windowrule = match:tag popup, dim_around on
windowrule = match:tag popup, center on
windowrule = match:tag popup, float on

# cli util apps
windowrule = match:tag cli-utils, float on
windowrule = match:tag cli-utils, pin on
windowrule = match:tag cli-utils, dim_around on

# hidden
windowrule = match:tag hidden, workspace special:minimized silent

### END TAG ###

# Group
# windowrule = group, ^virt-manager$

# Terminal applications
windowrule = match:class ^(Alacritty|Xfce4-terminal|Kitty|$term|com.mitchellh.ghostty)$, tag +terminal

windowrule = match:class ^kitty$, workspace 2
# Web browsers
windowrule = match:class ^($browser|Brave-browser|chromium|firefox|thorium|zen)$, tag +web

# File managers
windowrule = match:class ^($fileManager|Pcmanfm|thunar|qBittorrent|Caja)$, tag +file

# Code editors
windowrule = match:class ^(code|code-url-handler|cursor-url-handler|code-oss|Code - OSS|install4j-burp-StartBurp|burp-StartBurp|Unity|jetbrains-pycharm-ce|Postman|jetbrains-clion|.*\.zed\.Zed-.*)$, tag +code

# Office applications
windowrule = match:class ^(LibreOffice.*|libreoffice.*|Typora|obsidian|figma-linux|anytype|craft-nativefier-e0958b|evince|org.gnome.Evince|ClickUp)$, tag +office

# Communication apps
windowrule = match:class ^(discord|vesktop|VencordDesktop|Chat-gpt|Whatsapp-for-linux|Chatbox)$, tag +communication

# Media applications
windowrule = match:class ^(Audacity|Music|MPlayer|Lxmusic|Inkscape|Gimp|Blender|obs|zoom|Zoom|Pitivi|kdenlive|openshot|vlc|cider|Cider|shotwell|Shotwell|fr.handbrake.ghb|Spotify)$, tag +media

# Games
windowrule = match:class ^(Minecraft|Badlion|War|steam_proton|steam|csgo_linux64|cs2|minecraft-launcher|lutris|genshinimpact.exe|moe.launcher.an-anime-game-launcher|lunarclient|Lunar Client.*|zenlesszonezero.exe|moe.launcher.sleepy-launcher|org.vinegarhq.Sober|War Thunder.*|steam_app_.*)$, tag +games
windowrule = match:title .*\.exe, tag +games
windowrule = match:title ^(War Thunder.*)$, tag +games
windowrule = match:content 3, tag +games

# System/Settings applications
windowrule = match:class ^(virt-manager|blueman-adapters|blueman-manager|GParted|Xdm-app|timeshift-gtk|com.nextcloud.desktopclient.nextcloud|gearlever|Lxappearance|Lxtask|Lxrandr|Arandr|System-config-printer.py|Pavucontrol|Exo-helper-1|Protonvpn|Xfce4-power-manager-settings|Mysql-workbench-bin|Grub-customizer|Nitrogen|archlinux-tweak-tool.py|pamac-manager|helvum|Vmware|btrfs-assistant|Bitwarden|wootility-lekker|nwg-look|com.github.wwmm.easyeffects|kvantummanager)$, tag +system

# Miscellaneous applications
windowrule = match:class ^(os_server|Os_server)$, tag +misc

# floating applications
windowrule = match:class ^(zoom|sxiv|Sxiv|[Vv]iewnior|feh|nm-connection-editor|install4j-burp-StartBurp|thorium-app.shortwave.com__-Default|thorium-mdpkiolbdkhdjpekfbkbmhigcaggjagi-Profile_1|thorium-lnachpgegbbmnnlgpokibfjlmppeciah-Default|BeeperTexts|electron|com.github.rafostar.Clapper|io.github.celluloid_player.Celluloid|qimgv)$, float on
windowrule = match:title ^(Steam Settings|Sign in – Google accounts)$, float on

# pin apps
windowrule = match:title ^(zoom_linux_float_video_window)$, pin on

# specificly sized
# windowrule = size 40% 40%, class:^(alacritty-float)$

# Sticky applicationsp

# App that have menu on top for stayfocused, without this, menus will dissappear when you move ur mouse
windowrule = match:title (menu window), stay_focused on

# GUI Utils applications
windowrule = match:class ^(thorium-app.shortwave.com__-Default|thorium-mdpkiolbdkhdjpekfbkbmhigcaggjagi-Profile_1|thorium-lnachpgegbbmnnlgpokibfjlmppeciah-Default|BeeperTexts)$, tag +gui-utils
windowrule = match:tag gui-utils, animation slide right top

# bitwarden chrome extension popup
windowrule = match:class ^(thorium-nngceckbapebfimnlniiiahkandclblb-Default)$, pin on
windowrule = match:class ^(thorium-nngceckbapebfimnlniiiahkandclblb-Default)$, float on
windowrule = match:class ^(thorium-nngceckbapebfimnlniiiahkandclblb-Default)$, stay_focused on

# firefox
windowrule = match:title ^Extension, float on

# for media contents
windowrule = match:class ^(blobdrop|dragon|dragon-drop)$, tag +media-contents
# PIP
windowrule = match:title ^(Picture-in-Picture)$, tag +media-contents
windowrule = match:title ^(Picture-in-Picture)$, size (monitor_w*0.25) (monitor_h*0.25)
windowrule = match:title ^(Picture-in-Picture)$, move (monitor_w-window_w-$outer_gaps) 0

# removes title/border
windowrule = match:class ^(thorium-mdpkiolbdkhdjpekfbkbmhigcaggjagi-Profile_1|thorium-lnachpgegbbmnnlgpokibfjlmppeciah-Default)$, tag +fakefullscreen

# Full screen applications
# time-sensitive app rules
windowrule = match:class ^(polkit-gnome-authentication-agent-1|hyprland-share-picker.*|gcr-prompter|io.missioncenter.MissionCenter|hyprpolkitagent|hyprland-dialog|.*pinentry.*)$, tag +time-sensitive
windowrule = match:title ^(Open File|Open|Select a File|Choose wallpaper|Open Folder|Save As|Save File|Open Files|File Operation Progress|Library|File Upload|.*- Properties|Enter name of file to save to.*)$, tag +popup
windowrule = match:class ^(xdg-desktop-portal.*|.*\.portal..*)$, tag +popup
windowrule = match:class ^thunar$, match:title ^Rename.*, tag +popup
windowrule = match:class ^zenity$, match:title ^Protontricks$, tag +popup
windowrule = match:class ^zen$, match:title ^Extension:.*, tag +popup

windowrule = match:tag time-sensitive, dim_around on

# rofi
# windowrule = float, class:^(Rofi)
# windowrule = pin, class:^(Rofi)
# windowrule = dimaround, class:^(Rofi)
# util apps
windowrule = match:title ^(nmd|cliphist|pulsemixer|ranger|btop)$, tag +cli-utils
windowrule = match:tag cli-utils, dim_around on
windowrule = match:title ^(btop)$, stay_focused on

# windowrule = stayfocused, title:^(rofi - Command|rofi - Confirmation|rofi - ArchLinux (hyprland))

# No shadow for tiled window
windowrule = match:float 0, no_shadow on
# no border for unfocused window
# windowrulev2 = noborder, focus:0
# windowrulev2 = noshadow, focus:0

# Opacity rules
# windowrule = opacity 0.89 override 0.89 override, .* set in decoration
# windowrule = opacity 0.95 0.90, class:.+
# windowrule = opacity 0.85 0.75, class:^code-oss$
# windowrule = opacity 0.85 0.75, class:^code$
# windowrule = opacity 0.85 0.75, class:^code-url-handler$
windowrule = match:class ^cursor-url-handler$, opacity 0.85 0.75
windowrule = match:title ^Myass$, opacity 0 0
windowrule = match:class ^TelegramDesktop$, opacity 1.00 0.90
windowrule = match:class ^Spotify$, opacity 0.90 0.80
windowrule = match:class ^Cider$, opacity 0.90 0.80
windowrule = match:class ^Brave-browser$, opacity 0.90 0.80
windowrule = match:class ^thunar$, opacity 0.90 0.80
windowrule = match:class ^discord$, opacity 0.85 0.75
windowrule = match:class ^Caja$, opacity 0.90 0.80
windowrule = match:class ^polkit-gnome-authentication-agent-1$, opacity 0.80 0.70
windowrule = match:title ^Open$, opacity 0.80 0.70
windowrule = match:title ^New Tab - Thorium$, opacity 0.8 0.5
# windowrule = ignorezero, title:Annotation - Zoom

# Full screen no idle
windowrule = match:class .*, idle_inhibit fullscreen

# no blurs
windowrule = match:title ^(Annotation - Zoom)$, no_blur on

# Layer rules/blur
layerrule = match:namespace .*, blur_popups on

layerrule = match:namespace ^rofi$, blur on
layerrule = match:namespace ^rofi$, ignore_alpha 0
layerrule = match:namespace ^rofi$, dim_around on
layerrule = match:namespace ^rofi$, animation popin 45%

layerrule = match:namespace ^quickshell::launcher.*$, blur on
layerrule = match:namespace ^quickshell::launcher.*$, ignore_alpha 0
layerrule = match:namespace ^quickshell::launcher.*$, dim_around on
layerrule = match:namespace ^quickshell::launcher.*$, animation popin 45%

layerrule = match:namespace ^notifications$, blur on
layerrule = match:namespace ^notifications$, ignore_alpha 0
layerrule = match:namespace ^swaync-notification-window$, blur on
layerrule = match:namespace ^swaync-notification-window$, ignore_alpha 0
layerrule = match:namespace ^swaync-control-center$, blur on
layerrule = match:namespace ^swaync-notification-window$, animation slide right
layerrule = match:namespace ^swaync-control-center$, animation slide right
layerrule = match:namespace ^swaync-control-center$, ignore_alpha 0

layerrule = match:namespace ^logout_dialog$, blur on

layerrule = match:namespace ^waybar$, blur on
layerrule = match:namespace ^waybar$, ignore_alpha 0

layerrule = match:namespace ^quickshell::bar$, blur on
layerrule = match:namespace ^quickshell::bar$, ignore_alpha 0
layerrule = match:namespace ^quickshell::CC$, blur on
layerrule = match:namespace ^quickshell::CC$, ignore_alpha 0
layerrule = match:namespace ^quickshell::CC$, dim_around on

layerrule = match:namespace ^syshud$, blur on
layerrule = match:namespace ^syshud$, ignore_alpha 0
# layerrule = blur,$browser

layerrule = match:namespace ^selection$, animation none

layerrule = match:namespace ^mpvpaper$, animation gnome 0%

# Misc

# xwaylandvideobridge
windowrule = match:class ^(xwaylandvideobridge)$, opacity 0.0 override
windowrule = match:class ^(xwaylandvideobridge)$, no_anim on
windowrule = match:class ^(xwaylandvideobridge)$, no_initial_focus on
windowrule = match:class ^(xwaylandvideobridge)$, max_size 1 1
windowrule = match:class ^(xwaylandvideobridge)$, no_blur on

# Roblox join private server
windowrule = match:class ^(org.vinegarhq.Sober)$, match:title ^(Join Friends)$, float on

# No transparency for fullscreen windows
windowrule = match:fullscreen 0, plugin:chromakey

# suppressevent
# Ignore maximize requests from apps. You'll probably like this.
# windowrule = suppressevent maximize, class:.*
windowrule = match:class ^Spotify$, suppress_event activatefocus activate

# Fix some dragging issues with XWayland
windowrule = match:class ^$, match:title ^$, match:xwayland 1, match:float 1, match:fullscreen 0, match:pin 0, no_focus on

# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
# windowrule = bordersize 0, floating:0, onworkspace:f[1]
# windowrule = rounding 0, floating:0, onworkspace:f[1]

# permissions
permission = /usr/bin/grim, screencopy, allow
permission = /usr/bin/hyprlock, screencopy, allow
permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow

permission = /var/cache/hyprpm/system/dynamic-cursors/dynamic-cursors.so, plugin, allow
permission = /var/cache/hyprpm/system/hyprscroller/hyprscroller.so, plugin, allow

permission = ^wooting-wooting-two-he-\(arm\)$, keyboard, allow
permission = ^power-button$, keyboard, allow
permission = ^video-bus$, keyboard, allow
permission = ^power-button-1$, keyboard, allow
permission = ^sleep-button$, keyboard, allow
# permission = ^wooting-wooting-two-he-\(arm\)$, keyboard, allow
permission = ^wooting-wooting-two-he-\(arm\)-system-control$, keyboard, allow
permission = ^wooting-wooting-two-he-\(arm\)-consumer-control$, keyboard, allow
permission = ^company--usb-device-$, keyboard, allow
permission = ^company--usb-device--keyboard$, keyboard, allow
permission = ^logitech-brio-consumer-control$, keyboard, allow
permission = ^hp-wmi-hotkeys$, keyboard, allow
permission = ^hl-virtual-keyboard$, keyboard, allow
permission = ^hl-virtual-keyboard-fcitx5$, keyboard, allow
permission = .*, keyboard, ask