1

I'm on Manjaro with i3. I'm trying to make certain key bindings launch stuff in floating, while others don't. I've tried several things so far:

1. Straight up floating toggle with bindsym

# in i3/config
bindsym $mod+p          exec $term -e python
bindsym $mod+Shift+p            exec $term -e python; floating toggle

Unfortunately, this launches Python in normal (split/tabbed/stacking) mode and whatever I was focused on before launching Python.

2. Put every Python launched by bindsym in floating

# in i3/config
for_window [title="python"] floating toggle
bindsym $mod+p          exec $term -e python

This actually works to automatically launch Python in floating mode! However, any and every Python window launched with bindsym in floating mode...

3. Custom window title

# in i3/config
for_window [title="[.*]_floating"] floating toggle
bindsym $mod+p          exec --title "python_floating" $term -e python

Unfortunately, exec doesn't seem to have the --title flag so the bindsym doesn't work at all.

I've tried reading the documentation and man i3 but haven't found anything that helps so far. This doesn't seem to have been solved. The 3 similar posts I've found googling [1] [2] [3] look like my solution #2;

Given my suggested solutions which haven't totally solved this problem, how can I launch stuff where only certain bindsyms launch in floating mode?

1 Answer 1

0

Your third option was very close. As mentioned in the i3 FAQ here with both urxvt and xterm you can use the -name parameter. You can then define whether it is floating based on instance.

For example your floating/not floating python could be done like this:

set $term urxvt

# floating python
for_window  [class="URxvt" instance="floating"] floating toggle resize set 1500 1000, move position 100 200
bindsym $mod+Shift+P exec $term -name 'floating' -e python

# not floating
bindsym $mod+Shift+O exec $term -name 'not' -e python

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .