Skip to content

cirrusj/i3helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

i3helper

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.

screenshot1 screenshot2

You can install with:

go install github.com/cirrusj/i3helper@latest

i3status-rs configuration

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

i3 configuration

Don't forget to exec from your i3 config (or run manually).

exec --no-startup-id i3helper

Switch to previously focused window

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

Command line parameters

You can use -debug to print messages on what i3helper is doing.