hyprland-community / awesome-hyprland

Awesome list for Hyprland [maintainer=@yavko]
Creative Commons Zero v1.0 Universal
2.1k stars 50 forks source link

Window rule collection area #26

Open yavko opened 9 months ago

yavko commented 9 months ago

I've decided to also add window rules due to popular request, so if you want ur sick window rules added share them here. Don't forget about #22 too, I will be adding these both at the same time, so I'd also like fore everyone to share their shader plz.

BackHDLP commented 6 months ago

I have 2 groups and a single one

# Float some windows by default
windowrulev2 = float, class:pavucontrol(-qt)? 
windowrulev2 = float, title:cava
windowrulev2 = float, title:File Upload — Portal
windowrulev2 = float, class:^nm-.* # any network manager
windowrulev2 = float, title:Firefox( Developer Edition)? - Choose User Profile 
windowrulev2 = float, title:Library, class:firefox(developeredition)?
windowrulev2 = float, title:Olympus # Celeste mod manager
windowrulev2 = float, title:Picture-in-Picture

# PiP window improvements
#windowrulev2 = float, title:Picture-in-Picture # no need to repeat this
windowrulev2 = pin, title:Picture-in-Picture
windowrulev2 = opacity 0.9 override 0.5 override, title:Picture-in-Picture

# workspace special:term always has a terminal
#$term = kitty # or just replace it
workspace = special:term, on-created-empty:$term, gapsout:75

(btw is there something better for hypr conf syntax highlighting than perl?)

yavko commented 6 months ago

I have 2 groups and a single one

# Float some windows by default
windowrulev2 = float, class:pavucontrol(-qt)? 
windowrulev2 = float, title:cava
windowrulev2 = float, title:File Upload — Portal
windowrulev2 = float, class:^nm-.* # any network manager
windowrulev2 = float, title:Firefox( Developer Edition)? - Choose User Profile 
windowrulev2 = float, title:Library, class:firefox(developeredition)?
windowrulev2 = float, title:Olympus # Celeste mod manager
windowrulev2 = float, title:Picture-in-Picture

# PiP window improvements
#windowrulev2 = float, title:Picture-in-Picture # no need to repeat this
windowrulev2 = pin, title:Picture-in-Picture
windowrulev2 = opacity 0.9 override 0.5 override, title:Picture-in-Picture

# workspace special:term always has a terminal
#$term = kitty # or just replace it
workspace = special:term, on-created-empty:$term, gapsout:75

(btw is there something better for hypr conf syntax highlighting than perl?)

yeah if ur using helix or neovim, there is a treesitter grammar

BackHDLP commented 6 months ago

yeah if ur using helix or neovim, there is a treesitter grammar

Should've been more specific, I meant in Markdown code blocks on here GitHub.

yavko commented 6 months ago

I have 2 groups and a single one

# Float some windows by default
windowrulev2 = float, class:pavucontrol(-qt)? 
windowrulev2 = float, title:cava
windowrulev2 = float, title:File Upload — Portal
windowrulev2 = float, class:^nm-.* # any network manager
windowrulev2 = float, title:Firefox( Developer Edition)? - Choose User Profile 
windowrulev2 = float, title:Library, class:firefox(developeredition)?
windowrulev2 = float, title:Olympus # Celeste mod manager
windowrulev2 = float, title:Picture-in-Picture

# PiP window improvements
#windowrulev2 = float, title:Picture-in-Picture # no need to repeat this
windowrulev2 = pin, title:Picture-in-Picture
windowrulev2 = opacity 0.9 override 0.5 override, title:Picture-in-Picture

# workspace special:term always has a terminal
#$term = kitty # or just replace it
workspace = special:term, on-created-empty:$term, gapsout:75

(btw is there something better for hypr conf syntax highlighting than perl?)

This has given me an idea, maybe we can organize a project to create a file of window rules and maybe other stuff too for different applications, which improves support. (ex. to make PiP actually float kinda) Like https://github.com/LGUG2Z/komorebi-application-specific-configuration

BackHDLP commented 6 months ago

That sounds neat, I would definitely contribute whatever I have.

(Also today I learned TWMs for Windows are a thing.)

yavko commented 6 months ago

yeah if ur using helix or neovim, there is a treesitter grammar

Should've been more specific, I meant in Markdown code blocks on here GitHub.

Maybe shell?

source test.conf
# comments too
bind=super,x,exec,kitty
conf:value=69420
yavko commented 6 months ago

lol even python works

source=test.conf
# comments too
bind=super,x,exec,kitty
conf:value=69420
BackHDLP commented 6 months ago

lol even python works

source=test.conf
# comments too
bind=super,x,exec,kitty
conf:value=69420

My problem with other languages was that the colouring doesn't work so well. Python works mostly, but doesn't look great with window rules.

BackHDLP commented 6 months ago

Oh heck it's even inconsistent

windowrulev2 = float, class:pavucontrol(-qt)? 
windowrulev2 = float, title:Library, class:firefox(developeredition)?
windowrulev2 = opacity 0.9 override 0.5 override, class:firefox(developeredition)?
jncsotk30 commented 2 months ago

Hello @yavko

With the more recent Zoom client update (6.0.0 / 6.0.2), it looks like they added some client titles to some of their windows. The class also changed to "Zoom Workplace". I did some testing this morning and came up with a fairly comprehensive list of rules for various issues I had with Zoom.

Please see the messages in Discord channel to understand the issues experienced and the progression of fixes implemented...

Note, the move rule on the sharing toolbar will need to either be removed or adjusted for your own screen. Also, if you're not using licensed zoom account, the starting window section titles will likely change.

Also, the menu windows (audio settings, video settings) were glitching and I was unable to use without the rules below. They are setup to stay focused and in center of screen. Trying to position them to wherever the click originated wasn't going to work so I just threw them in the center.

I did explicitly set the size of the mini reactions popup as well as the meeting info popup.

# Zoom Workplace Screen Sharing
# Sharing Toolbar
windowrulev2 = float,class:^(Zoom Workplace)$,title:^(as_toolbar)$
windowrulev2 = noborder,class:^(Zoom Workplace)$,title:^(as_toolbar)$
windowrulev2 = noshadow,class:^(Zoom Workplace)$,title:^(as_toolbar)$
windowrulev2 = move 930 85,class:^(Zoom Workplace)$,title:^(as_toolbar)$

# Zoom Workplace Screen Sharing
# Green Border Selection
windowrulev2 = float,title:^(cpt_frame_xcb_window)$
windowrulev2 = noborder,title:^(cpt_frame_xcb_window)$

# Zoom Workplace
# Main Zoom Landing Window
windowrulev2 = float,class:^(Zoom Workplace)$,title:^(Zoom Workplace - Licensed account)$
windowrulev2 = size 660 530,class:^(Zoom Workplace)$,title:^(Zoom Workplace - Licensed account)$
windowrulev2 = center,class:^(Zoom Workplace)$,title:^(Zoom Workplace - Licensed account)$

# Zoom Workplace Settings
windowrulev2 = float,class:^(Zoom Workplace)$,title:^(Settings)$

# Zoom Workplace Menu Windows
# Audio Settings, Video Settings, Gallery View etc..
windowrulev2 = float,class:^(Zoom Workplace)$,title:^(menu window)$
windowrulev2 = size 300 600,class:^(Zoom Workplace)$,title:^(menu window)$
windowrulev2 = stayfocused,class:^(Zoom Workplace)$,title:^(menu window)$
windowrulev2 = center,class:^(Zoom Workplace)$,title:^(menu window)$

# Zoom Workplace Top Bar Popups
# Zoom Meeting Info Window
windowrulev2 = float,class:^(Zoom Workplace)$,title:^(meeting topbar popup)$
windowrulev2 = noborder,class:^(Zoom Workplace)$,title:^(meeting topbar popup)$
windowrulev2 = noshadow,class:^(Zoom Workplace)$,title:^(meeting topbar popup)$
windowrulev2 = center,class:^(Zoom Workplace)$,title:^(meeting topbar popup)$
windowrulev2 = stayfocused,class:^(Zoom Workplace)$,title:^(meeting topbar popup)$
windowrulev2 = size 485 442,class:^(Zoom Workplace)$,title:^(meeting topbar popup)$

# Zoom Workplace Bottom Bar Popups
# Zoom Reactions
windowrulev2 = float,class:^(Zoom Workplace)$,title:^(meeting bottombar popup)$
windowrulev2 = noborder,class:^(Zoom Workplace)$,title:^(meeting bottombar popup)$
windowrulev2 = noshadow,class:^(Zoom Workplace)$,title:^(meeting bottombar popup)$
windowrulev2 = center,class:^(Zoom Workplace)$,title:^(meeting bottombar popup)$
windowrulev2 = stayfocused,class:^(Zoom Workplace)$,title:^(meeting bottombar popup)$
windowrulev2 = size 285 90,class:^(Zoom Workplace)$,title:^(meeting bottombar popup)$

# Zoom Workplace Misc
# Captions Window, Breakout Room Creation, etc
windowrulev2 = float,class:^(Zoom Workplace)$,title:^(zoom)$
windowrulev2 = noborder,class:^(Zoom Workplace)$,title:^(zoom)$
windowrulev2 = noshadow,class:^(Zoom Workplace)$,title:^(zoom)$
windowrulev2 = center,class:^(Zoom Workplace)$,title:^(zoom)$

# Zoom Workplace
# Participants Window (Detached)
windowrulev2 = float,class:^(Zoom Workplace)$,title:^(Participants)(.*)$
windowrulev2 = size 490 550,class:^(Zoom Workplace)$,title:^(Participants)(.*)$
windowrulev2 = center,class:^(Zoom Workplace)$,title:^(Participants)(.*)$

# Zoom Workplace
# Chat Window (Detached)
windowrulev2 = float,class:^(Zoom Workplace)$,title:^(Meeting chat)$
windowrulev2 = size 490 550,class:^(Zoom Workplace)$,title:^(Meeting chat)$
windowrulev2 = center,class:^(Zoom Workplace)$,title:^(Meeting chat)$
Fxzzi commented 1 month ago
# Sets fullscreen for common Minecraft legacy windows
windowrulev2 = fullscreen, class:^(Minecraft 1.8.9)$
windowrulev2 = fullscreen, class:^(org-prismlauncher-EntryPoint)$

# Set fullscreen for all steam games
windowrulev2 = fullscreen, class:^(steam_app_.*)$

# Fix everest (celeste) splash screen
windowrulev2 = float, class:^(EverestSplash-l

a few of my gaming related envvars, if anyone needs.