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

Maintain floating window position after inplace restart

asked Jan 30 '13

dkeg gravatar image

If I set a defined placement for a new floating window, for example

for_window [class="Mousepad"] floating enable move right 332px,move up 213px
for_window [class="Thunar"] floating enable move right 332px,move down 80px

Then if I restart i3 using $MOD+Shift+r, the layout gets a bit diplaced. It seems to happen when I have say both above open (not specific to those apps, just using them in my example), but if I only have one floating window open it does not get displaced.

For instance I have a terminal window open with specific size and plaement in autostart on the left. That window is not affected. Only the positioned floating windows on the right using the code above.

Is there a way to lock down the positions? Its really not a huge deal, curious though if there is a way or syntax i can add.

Thanks,

1 answer

Sort by » oldest newest most voted
1

answered Jan 31 '13

Michael gravatar image

Since you are running a new i3 session after restarting, i3 will execute the for_window statements again. You are also moving windows with relative coordinates, so it is to be expected that they will end up in a different position than before the restart.

Comments

okay, that makes sense now. I thought it was relative to center, but now I see it is relative to the windows original position which was center, so when when the for_window runs again, it moves that specified amt again. So my next question; is there a way to make that positioning absolute?

dkeg gravatar imagedkeg (Jan 31 '13)edit

accepting answer. Curious about absolute positioning but that's technically a separate question

dkeg gravatar imagedkeg (Feb 18 '13)edit

Question Tools

Stats

Asked: Jan 30 '13

Seen: 735 times

Last updated: Jan 31 '13