Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support to resize floating container in percentage #2816
Again, that's a description of the feature and not a usecase. A Usecase would explain why you would want to resize the window in relation to the size of the screen.
We don't even have this for tiled windows. Floating windows are intentionally kept simple in i3 and resizing dependent of the screen size is a trivial task to do with a script or a number of tools which are independent of the window manager. Therefore I don't see a compelling reason to implement this in i3.
I think that is not as trivial as you suggest.
for_window [floating] exec i3-msg resize set $(get-monitor-size -window <id> -format '<x> * 0.3' | bc) $(get-monitor-size -window <id> -format '<y> * 0.9' | bc), move position center
Still, I don’t know how to get the window ID (or any info) of a matched container.
Could command criteria benefit from string formatting to access info?
OK, giving it more thought I think this is OK provided the implementation effort is reasonable (which I expect it to be). Of course the command should integrate with the existing one, so it should probably look like this: