##############################
### WINDOWS AND WORKSPACES ###
##############################

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

# Example windowrule v1
# windowrule = float, ^(kitty)$

# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$

# Ignore maximize requests from apps. You'll probably like this.
windowrulev2 = suppressevent maximize, class:.*

# Fix some dragging issues with XWayland
windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0

windowrulev2 = float, class:qt6ct
windowrulev2 = float, size 2560 1440, class:^(org.kde.gwenview)$
windowrulev2 = float, size 50%, center, class:^(org.kde.konsole)$


windowrulev2 = float, class:^(steam)$

# Browser Extension Popup
windowrulev2 = float, title:^(Bitwarden - )(.*)$

# Picture-in-Picture
windowrulev2 = float, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrulev2 = keepaspectratio, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrulev2 = move 73% 72%, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrulev2 = size 25%, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrulev2 = float, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrulev2 = pin, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrulev2 = float, title:^(画中画)(.*)$
windowrulev2 = keepaspectratio, title:^(画中画)(.*)$
windowrulev2 = move 73% 72%, title:^(画中画)(.*)$
windowrulev2 = size 25%, title:^(画中画)(.*)$
windowrulev2 = float, title:^(画中画)(.*)$
windowrulev2 = pin, title:^(画中画)(.*)$

# Dialog windows – float+center these windows.
windowrulev2 = center, title:^(Open File)(.*)$
windowrulev2 = center, title:^(打开文件)(.*)$
windowrulev2 = center, title:^(Select a File)(.*)$
windowrulev2 = center, title:^(选择文件)(.*)$
windowrulev2 = center, title:^(Choose wallpaper)(.*)$
windowrulev2 = center, title:^(Open Folder)(.*)$
windowrulev2 = center, title:^(Save As)(.*)$
windowrulev2 = center, title:^(保存)(.*)$
windowrulev2 = center, title:^(Library)(.*)$
windowrulev2 = center, title:^(File Upload)(.*)$
windowrulev2 = float, title:^(Open File)(.*)$
windowrulev2 = center, title:^(打开文件)(.*)$
windowrulev2 = float, title:^(Select a File)(.*)$
windowrulev2 = center, title:^(选择文件)(.*)$
windowrulev2 = float, title:^(Choose wallpaper)(.*)$
windowrulev2 = float, title:^(Open Folder)(.*)$
windowrulev2 = float, title:^(Save As)(.*)$
windowrulev2 = center, title:^(保存)(.*)$
windowrulev2 = float, title:^(Library)(.*)$
windowrulev2 = float, title:^(File Upload)(.*)$

# Centering pictures preview windows
# Telegram
windowrulev2 = center, title:^(Media viewer)(.*)$
windowrulev2 = float, title:^(Media viewer)(.*)$
windowrulev2 = size 50%, title:^(Media viewer)(.*)$
# WeChat
windowrulev2 = center, title:^(预览)(.*)$
windowrulev2 = float, title:^(预览)(.*)$
windowrulev2 = size 50%, title:^(预览)(.*)$
# QQ
windowrulev2 = center, title:^(图片查看器)(.*)$
windowrulev2 = float, title:^(图片查看器)(.*)$
windowrulev2 = size 50%, title:^(图片查看器)(.*)$

# Pin: Rofi will display in all wsps
windowrulev2 = pin, class:^(Rofi)$
windowrulev2 = stayfocused, class:^(Rofi)$

windowrulev2 = float, class:^(org.pulseaudio.pavucontrol)$
windowrulev2 = move 73% 5%, class:^(org.pulseaudio.pavucontrol)$
windowrulev2 = size 25%, class:^(org.pulseaudio.pavucontrol)$
windowrulev2 = float, class:^(org.pulseaudio.pavucontrol)$
windowrulev2 = pin, class:^(org.pulseaudio.pavucontrol)$
