With xterm
, roxterm
and probably most other gtk-based terminal emulators you can change the class of the window with --class CLASSNAME
. Use this to separate between floating and tiled windows:
for_window [class="FXTerm"] floating enable
bindsym $mod+Mod4 exec xterm
bindsym $mod+Shift+Mod4 exec xterm --class FXTerm
(This may also work with some other terminal emulators, but probably not with rxvt
)
In i3 floating is an attribute that can be attributed to a window only after it has been created. It cannot be passed as parameter to exec
and chaining exec
and floating enable
in a single command is unreliable because of timing issues.
for_window
can be used execute commands for a certain windows (depending on their title, class or a few other parameters). Aside from changing the class, you could set a title, but many shell configurations try to change the terminal title, so there could be some timing issues there.
Changing the class has the possible drawback (advantage?) that some X Resources (usually defined in ~/.Xresources
or ~/.Xdefaults
) may have to be changed to work with the new class.