WayfireWM / wayfire

A modular and extensible wayland compositor

Home Page:https://wayfire.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch to tile by key

Nosirus opened this issue · 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

do you mean that:

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

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

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 :)