wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Switch to tile by key

Open Nosirus opened this issue 10 months ago • 3 comments

I wonder if it was possible with IPC to switch to tile mode or vice versa by pressing a key?

for example being able to switch between the two modes or even remove the tile window decoration

Nosirus avatar Apr 06 '24 21:04 Nosirus

do you mean that:

from wayfire.ipc import sock
sock.press_key("W-KEY_T")

killown avatar Apr 06 '24 22:04 killown

@Nosirus Yes you can do that:

  • First call simple-tile/get-layout and window-rules/get-focused-view . If focused view is in the layout, you can set a new tiling layout which doesn't contain the focused view, and it will be untiled.
  • If the view is not in the tiled layout, then you can set a new tiled layout with the view added, this will tile it.

Of course we could also make the binding itself ipc activatable, but this is much more flexible because you can also say exactly how the view should be added to the tiled layout.

ammen99 avatar Apr 07 '24 03:04 ammen99

I think someone other than me might be interested in switching easily. At the moment I haven't yet understood how the plugins really work but I will try when I have more time.

Thanks for your help :)

Nosirus avatar Apr 07 '24 12:04 Nosirus