hyprwm / Hypr

Hypr is a tiling window manager written in modern C++.
BSD 3-Clause "New" or "Revised" License
1.06k stars 32 forks source link

A few features I'd like to see in Hypr #47

Open ghost opened 2 years ago

ghost commented 2 years ago

Loving the WM so far but coming from bspwm and dwm there are a few features I'm missing. If these are implemented and I've missed them in the documentation do let me know.

  1. Define workspaces in window rules i.e. open x on workspace y
  2. Define window rule to launch app in fullscreen mode. Games for example launch in tiled mode at the moment but do not function well i.e. resolution is off and in-app mouse movement is broken.
  3. Mouse support for movewindow. In particular on a desktop it is very useful to be able to drag a window to a new position.
  4. Scratchpad i.e. send a window to a hidden state and be able to retrieve it with a binding. Dwm has this and bspc can achieve it with a small script:
    
    hidden=$(bspc query -N -n .hidden -d focused)

if [ -z "$hidden" ]; then bspc node focused -g hidden=on else bspc node "$hidden" -g hidden=off fi

6. Automatically focus a window when it requires your attention. Doesn't exist out of the box in the other WMs but can be achieved with a simple script for bspc:

pull=$1 while read -r d n f s; do [[ "$f" = urgent && "$s" = on ]] && bspc node "$n" ${pull:+-d focused} -f done < <(bspc subscribe node_flag)


This is borderline essential for certain applications when you're on a different workspace. An example being League of Legends which require interaction within 5~ seconds when your queue pops. 

Love the WM - thank you for sharing it. 
vaxerski commented 2 years ago

Fullscreen and workspace rules added in 894a9b0e3e359347172acc4f035a79f3ea4e16da

Scratchpads - please demo link, I've never understood those.

vaxerski commented 2 years ago

mouse support for dragging tiled windows added in 0b9a33228b789ff2c9f07ee85a54bddcb776ee97

ghost commented 2 years ago

Thanks for implementing them! I've build Hypr with the void-template which seems to pull the releases so I'll have to wait until 1.1.2 to test them (perhaps I'll replace it with a manual build if I'm too impatient) but I'll report back once I have.

The scratchpad feature is similar to the drop-down terminal which most DEs have. It is in its essence a tool which can send an application/terminal to an invisible workspace where it remains in its current state until the user pulls it back to focus. Here's a video demonstration of the Scratchpad patch in Dwm. Think of it like a literal scratchpad - perhaps you're watching a lecture and you need to note something down now and then but don't want it to take up space - send the app to the scratchpad where it is out of view but remains in the state you left it in; like putting a notepad in your pocket - and when it's time to write something you can pull it back to the front with a quick button press and the file is still open in the state you left it in.

If it is still unclear and you're still interested to know more you could spin up a VM with bspwm and try the snippet above to see it in action. Regardless, thanks again for implementing the other features. Looking forward to testing them.

vaxerski commented 2 years ago

ok got it how scratchpads work. sure.

vaxerski commented 2 years ago

made a release and added scratchpads.

Urgent will do later.

ghost commented 2 years ago

Thank you for implementing these features so quickly. I've updated and the drag support is fantastic. Scratchpad is excellent too.

Since Scratchpad is limited to one application, it is perhaps worth considering whether it is possible to have it bound to one key rather than requiring two? E.g: If scratchpad is empty > send app to scratchpad If scratchpad is occupied > retrieve app from scratchpad

Just a thought. It is excellent as is, as well.

Having a bit more trouble with the workspace rules. What is the correct format for defining rules for classes which have spaces in their names, for example:

windowrule=workspace 3,role:Jellyfin Media Player windowrule=workspace 3,role:'Jellyfin Media Player' windowrule=workspace 3,role:"Jellyfin Media Player"

None of these work.

vaxerski commented 2 years ago

try class: role is an Xorg internal value.

edit: scratchpad isnt limited to one application in hypr

ghost commented 2 years ago

class: works, thanks.

BartolomeyKant commented 2 years ago

I am also missing for focus by click feature. I nether use focus by hover since sometimes mouse may be moved by accident, so it would be great to focus windows by explicit click.

I also love this WM!

Zxmon-code commented 2 years ago

I am also missing for focus by click feature. I nether use focus by hover since sometimes mouse may be moved by accident, so it would be great to focus windows by explicit click.

I also love this WM!

You could make a new issue for new suggestions.