# hyprlang noerror true

# Default floating rules to stop windows being too large or small
windowrulev2 = size <80% <80%,floating:1
windowrulev2 = size >50% >75%, class:(^org.kde.kdenlive$)
windowrule = float, class:(^xdg-desktop-portal-gtk$)
windowrule = size <80% <80%, class:(^xdg-desktop-portal-gtk$)
# windowrulev2 = size >50% >50%,floating:1


# windowrulev2 = float,class:(clipse)
# windowrulev2 = size 622 652,class:(clipse)
# windowrulev2 = opacity 1 override 1 override,class:(clipse)

windowrulev2 = float,class:(float)
windowrule = size <80% <80%,class:(float)
windowrulev2 = float,class:(float-80)
windowrule = size 80% 80%,class:(float-80)

windowrulev2 = float,class:(swayimg)
windowrulev2 = size 80%,class:(swayimg)
windowrule = noblur 1 noanim 1 noshadow 1, class:(^$)
windowrule = noblur 1 noanim 0 noshadow 1, title:(^$)
windowrule = nofocus 1, title:(^$)
windowrulev2 = float,class:(mpv)
windowrulev2 = float,class:^(brave-)(.*)(-.*)$
windowrulev2 = move onscreen cursor,class:^(brave-)(.*)(-.*)$

windowrulev2 = move onscreen cursor -50% 0,class:^(com.nextcloud.desktopclient.nextcloud)$
windowrulev2 = float,class:^(com.nextcloud.desktopclient.nextcloud)$
windowrulev2 = size 800px, 500px,class:^(com.nextcloud.desktopclient.nextcloud)$

# # Start windows
stickyrule = class:discord,5
stickyrule = class:vesktop,5
stickyrule = class:org.telegram.desktop,5
stickyrule = class:Slack,5


workspace = special:gromit, gapsin:0, gapsout:0, shadow:0, on-created-empty: gromit-mpx -a
windowrule = noblur, class:^(Gromit-mpx)$
windowrule = opacity 1 override, 1 override, class:^(Gromit-mpx)$
windowrule = noshadow, class:^(Gromit-mpx)$
windowrule = size 100% 100%, class:^(Gromit-mpx)$


# Floating broken windows
windowrule = opacity 1 override 1 override class:^(xdg-desktop-portal-gtk)$
windowrule = stayfocused, class:^(xdg-desktop-portal-gtk)$
windowrule = stayfocused, class:^(soffice)$
windowrule = stayfocused, class:^(virt-manager)$, title:^$
#windowrule = float 1, class:^(xdg-desktop-portal-gtk)$

windowrulev2 = stayfocused,        class:^(Sparrow)$, title:^$, xwayland:1
windowrulev2 = focusonactivate 1,  class:^(Sparrow)$, title:^$, xwayland:1
windowrulev2 = allowsinput 1,      class:^(Sparrow)$, title:^$, xwayland:1
windowrulev2 = stayfocused,        class:^(Sparrow)$, title:^$, xwayland:1




# No Opacity windowrules
windowrule = opacity 1 override 1 override class:brave-browser
windowrule = opacity 1 override 1 override class:mpv
windowrule = opacity 1 override 1 override class:virt-manager
windowrule = opacity 1 override 1 override class:^(Bootstrap Studio)$
windowrule = opacity 1 override 1 override class:^(Minecraft)(.*)$
windowrule = opacity 1 override 1 override class:^(gimp)$
windowrule = opacity 1 override 1 override class:^(com.obsproject.Studio)$
windowrule = opacity 1 override 1 override class:^$


# Disable opacity for Alacritty (as it already has a transparent background)
windowrule = opacity 1 override 0.75 override class:^(Alacritty)$

workspace = special:terminal, on-created-empty: alacritty

# hyprlang noerror false

# Tags for opacity
windowrule = opacity 0.1 override 0.1 override, tag:opacity:0.1
windowrule = opacity 0.2 override 0.2 override, tag:opacity:0.2
windowrule = opacity 0.3 override 0.3 override, tag:opacity:0.3
windowrule = opacity 0.4 override 0.4 override, tag:opacity:0.4
windowrule = opacity 0.5 override 0.5 override, tag:opacity:0.5
windowrule = opacity 0.6 override 0.6 override, tag:opacity:0.6
windowrule = opacity 0.7 override 0.7 override, tag:opacity:0.7
windowrule = opacity 0.8 override 0.8 override, tag:opacity:0.8
windowrule = opacity 0.9 override 0.9 override, tag:opacity:0.9
windowrule = opacity 1 override 1 override, tag:opacity:1


# freeRDP - Remote Desktop Protocol Client
windowrulev2 = float, xclass:xfreerdp
# match by X11 WM_CLASS you set in xfreerdp
windowrulev2 = float, xclass:Autodesk Fusion
windowrulev2 = center, xclass:Autodesk Fusion
# prevent tiling / auto-fullscreen for these windows
#windowrulev2 = disableautotile, xclass:Autodesk Fusion
windowrule = float, xclass:Autodesk Fusion
# optionally force borderless (if you prefer)
windowrulev2 = noborder, xclass:Autodesk Fusion




#! (Still doesn't work) Add org.kde.kdeconnect.daemon for KDE connect pointer
windowrule = noblur, class:^(org.kde.kdeconnect.daemon)$ #As it is transparent it will prevent it blurring so you can see what you are ponting at
windowrule = nofocus,class:^(org.kde.kdeconnect.daemon)$ # Disables focus so if you have the option to dim on focus it will not dim the window behind it
windowrule = nodim,class:^(org.kde.kdeconnect.daemon)$ # As it is out of focus it will prevent it from diming, so its brighter if you have window dimming on
windowrule = noshadow,class:^(org.kde.kdeconnect.daemon)$ # Preents it having a shadow if you have window shadows on 
windowrule = idleinhibit,class:^(org.kde.kdeconnect.daemon)$ # Will prevent your computer from idling if this is in use 
windowrule = float,class:^(org.kde.kdeconnect.daemon)$
# windowrule = maximize,class:^(org.kde.kdeconnect.daemon)$
# windowrule = move 0 0,class:^(org.kde.kdeconnect.daemon)$

