After switching to i3, I always forgot the selected layout of my current window. As such I kept changing layouts and/or spawning new windows a few times, before I got the intended result.
i3helper will use i3-ipc and dbus, in order to dynamically update and show the current layout in an i3status-rs block.
You can install with:
go install github.com/cirrusj/i3helper@latest
Add this in your i3status-rs configuration (config.toml
):
[[block]]
block = "custom_dbus"
path = "/LayoutMode"
You can verify the block is defined and working with something like:
gdbus introspect --session --dest rs.i3status --object-path /LayoutMode
Don't forget to exec
from your i3 config (or run manually).
exec --no-startup-id i3helper
i3helper
can also be used to bind a shortcut to switch focus to the previously focused window.
You need to bind nop last_focus
to the shortcut you want. For example:
bindsym Mod1+Tab nop last_focus
You can use -debug
to print messages on what i3helper
is doing.