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 2014-07-29 22:18:58 +0000

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.

edit retag flag offensive reopen merge delete

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 ( 2014-07-31 20:38:27 +0000 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-07-30 06:30:22 +0000

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.

edit flag offensive delete link more

Comments

thank you!

tigrezno gravatar imagetigrezno ( 2014-07-30 08:45:20 +0000 )edit

Question Tools

Stats

Asked: 2014-07-29 22:18:58 +0000

Seen: 175 times

Last updated: Jul 30 '14