hyprland-community/pyprland

Rofi can't bring `pyprland`-managed `scratchpads` back into focus

Closed this issue · 1 comments

Hello! Hope you're doing well. Sorry it's me again. I'm migrating from Sway and so new to Hyprland, apologies in advance if this is not the right place for this question.

How to reproduce

Please see the following video:

scratchpad-demo.mp4
  1. rofi -show window
  2. choose kitty_music, which is managed by pyprland's scratchpads
  3. The following happens:
    • kitty_music is not brought into focus (I expect it'll be brought into focus)
    • my current window is dimmed; I can't focus back to it and it "freezes"; it doesn't respond to any keystrokes and clicks
  4. I have to run rofi -show window and choose kitty_music again in order to unfreeze my current window

pyprland.toml:

[pyprland]
plugins = [ "scratchpads" ]

[scratchpads.kitty_top]
command = "kitty --class kitty_dropterm --execute tmux attach-session -t misc"
animation = "fromTop"
class = "kitty_dropterm"
size = "50% 45%"
margin = 40

[scratchpads.kitty_right]
command = "kitty --class kitty_music --execute ncmpcpp"
animation = "fromRight"
class = "kitty_music"
size = "20% 60%"
margin = 10

What I have tried

I know (hopefully) how to built-in scratchpad works in hyprland:

bind =    $mod,          s,        movetoworkspacesilent, special

When I press $mod, s, it'll move the current focused window to the special workspace called special.
When I run rofi -show window, and move the scratchpad back to focus.

But pyprland-managed scratchpads doesn't seem to work this way?

Any help is much appreciated. Thank you!

You describe a problem you have with rofi, I also wonder why you use rofi for that while this is built-in feature of the scratchpads.
I don't fully understand what you are trying to do but maybe https://github.com/hyprland-community/pyprland/wiki/toggle_special is what you are looking for.

For general discussions I would suggest trying your luck with Discord or in the discussions

I'll reject since I don't plan to add support for scratchpads on every single opensource app available.