Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue Apr 3, 2022 · 10 comments
Open

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

ghost opened this issue Apr 3, 2022 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Apr 3, 2022

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
  1. 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.

@ghost ghost added the enhancement New feature or request label Apr 3, 2022
@ghost ghost assigned vaxerski Apr 3, 2022
@vaxerski
Copy link
Member

vaxerski commented Apr 3, 2022

Fullscreen and workspace rules added in 894a9b0

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

@vaxerski
Copy link
Member

vaxerski commented Apr 3, 2022

mouse support for dragging tiled windows added in 0b9a332

@ghost
Copy link
Author

ghost commented Apr 3, 2022

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
Copy link
Member

vaxerski commented Apr 3, 2022

ok got it how scratchpads work. sure.

@vaxerski
Copy link
Member

vaxerski commented Apr 3, 2022

made a release and added scratchpads.

Urgent will do later.

@ghost
Copy link
Author

ghost commented Apr 3, 2022

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
Copy link
Member

vaxerski commented Apr 4, 2022

try class:
role is an Xorg internal value.

edit: scratchpad isnt limited to one application in hypr

@ghost
Copy link
Author

ghost commented Apr 4, 2022

class: works, thanks.

@BartolomeyKant
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants