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

Setting up floating pop up window

asked 2014-03-13 02:28:43 +0000

anonymous user

Anonymous

I'm trying to set up a key binding to run a command to spawn a terminal with a media player as a floating window. I've tried both urxvt -e mocp && i3-msg floating toggle and urxvt -e mocp & i3-msg floating toggle; the former waits until the window is closed to cause my previously focused window to start floating, the latter causes my focused window to start floating while the terminal spawns in behind it.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-03-13 07:15:28 +0000

joepd gravatar image

updated 2014-03-13 07:16:02 +0000

One way of fixing this is the following:

You can launch urxvt with the following option: -title text. This sets the window title to text. Then you can match this title with a for_window matcher in your i3-config.

When this window is active, the normal shortcuts for toggling a float are valid. If you want to be able to toggle this property if also the window is not active, to my knowledge, you should get into an i3 scripting library to select the window and define an action on it.

edit flag offensive delete link more

Comments

Thanks a ton! I think the `for_window` bit solved the problem, though the `-title $string` option to urxvt caused the terminaly to only flash on the screen and disappear immediately(Could be a version thing, Arch does that sometimes).

Artifix gravatar imageArtifix ( 2014-03-13 07:32:56 +0000 )edit

Question Tools

Stats

Asked: 2014-03-13 02:28:43 +0000

Seen: 495 times

Last updated: Mar 13 '14