swayhide
swayhide copied to clipboard
Terminal jumps to another display on multi-monitor setup
I think the title of this issue is pretty self-explanatory.
When I run swayhide somethingsomething
, after I close the program I just ran, the terminal from which the program was originally spawned jumps to a different monitor than the one I'm focused on. This happens on either monitor, i.e. it will jump to the second one.
I'm not sure what would happen on a three-monitor setup.
Ok, I built the program myself, but after testing both the master and AUR versions, they both don't have this bug. Strange... Will see if I can reproduce consistently.
Unfortunately this is a limitation of the current implementation. I'm experimenting with alternative solutions, but nothing successful so far.
It might be possible to add a secondary swallowing method, utilizing tabs instead of moving the window to the scratchpad. I think that that solution would keep the window from moving, but might come with other drawbacks. Do you think this could be useful to you?
I assume the same limitations also cause the terminal to show up again in the wrong workspace, at least that is what I observe on my setup:
https://user-images.githubusercontent.com/7107523/199852259-83ccf77c-5e94-494a-8c32-440b5c59d521.mov
If not already the case, perhaps swayhide
could mark the hidden window not only with a unique identifier but also with the workspace number it came from, so that it can be returned to it later with a move container to workspace xx
? I use this in my Sway config to set keybindings to (1) mark a window and move it to the scratchpad, and (2) bring just that window back to the current workspace (I have 10 different marks, the below example is just for the 1
-key). If a more complex mark could be set, I suppose we could use extra swaymsg
commands to make sure the window is returned to its original state.
bindsym $mod+Ctrl+1 mark "scratch1", move scratchpad
bindsym $mod+mod1+1 [con_mark="scratch1"] scratchpad show
Could we use the same system to mark not only windows indentifiers but also which is the active workspace when swayhide
is invoked?