The i3 FAQ has migrated to https://www.reddit.com/r/i3wm/. All content here is read-only.
Ask Your Question
0

Is it possible to match criteria on floating state?

asked 2015-06-01 06:08:57 +0000

neochrome gravatar image

I'd like to configure key binds that are only active for windows that are in floating mode, but I can't seem to find any good way to write something like:

bindsym Mod4+x [floating=true] kill

Am I missing some other way of achieving this, or would it be possible to add such a critera option?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-06-03 03:19:52 +0000

i3convert gravatar image

You could use

bindsym Mod4+x exec --no-startup-id your_script.sh

where your_script.sh parses the output of i3-msg -t get_tree to find out what state the focused window is. It then issues a specific command depending on whether the window is floating.

edit flag offensive delete link more
0

answered 2015-06-01 06:45:03 +0000

Airblader gravatar image

Command criteria don't support this, but you can subscribe to the window event and then trigger a command. For this you can use, for example, i3subscribe.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2015-06-01 06:08:57 +0000

Seen: 65 times

Last updated: Jun 03