The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

Is this command correct? [closed]

asked Jul 29 '14

tigrezno gravatar image

i3-msg "[class='Firefox'] move position center"

I'm calling this from a floating xterm, and it's the xterm window the one going to the center and not the floating firefox.

Closed for the following reason question is not relevant or outdated by TonyC
close date 2014-07-31 20:37:51.596344

Comments

This bug has been fixed in the development version and will be included in the next release (after 4.8)

TonyC gravatar imageTonyC (Jul 31 '14)edit

1 answer

Sort by » oldest newest most voted
1

answered Jul 30 '14

Adaephon gravatar image

There are two problems here:

  1. Not every command supports the usage of criteria. move position is on of them.
  2. i3 only understands double-quotes. So you have to use single-quotes to quote the whole command and double-quotes for the criteria

If you only have one Firefox window than this should work:

i3-msg '[class="Firefox"] focus; move position center'

If you have multiple Firefox windows, i3 will just try to move one of them, not necessarily the one you want (multiple calls will always select the same window).

In that case you could go by title or con_mark instead of class to select a specific Firefox window.

Comments

thank you!

tigrezno gravatar imagetigrezno (Jul 30 '14)edit

Question Tools

Stats

Asked: Jul 29 '14

Seen: 175 times

Last updated: Jul 30 '14