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 2013-01-30 23:24:06 +0000

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,

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-01-31 10:27:27 +0000

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.

edit flag offensive delete link more

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 ( 2013-01-31 12:26:18 +0000 )edit

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

dkeg gravatar imagedkeg ( 2013-02-18 05:00:04 +0000 )edit

Question Tools

Stats

Asked: 2013-01-30 23:24:06 +0000

Seen: 735 times

Last updated: Jan 31 '13