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

Resize with px and not ppt

asked 2014-03-30 20:01:05 +0000

construidor gravatar image

updated 2014-03-30 20:05:22 +0000

Sorry my bad English, isn't my native language. My problem is the use of de command resize: resize grow|shrink <direction> [<px> px] [or <ppt> ppt]

In my case, I am trying to use a command to resize one pixel by time, like this "resize grow height 1 px". But they ignore the px value and use just the ppt value (10 ppt, the default value in this case).

Doing a fast search in the source code, in the function cmd_resize (commands.c:767), I see, he just use the value of px when its applied to a floating window or floating container, else they use the ppt value. This is a bug or misinterpretation of the documentation?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-04-17 12:44:44 +0000

Michael gravatar image

The feature is working as designed.

Pixels are meaningful when you are dealing with floating windows, because they are not part of the tiling layout.

Percentage points (ppt) are meaningful when you are dealing with tiling windows, since for them, i3 actually stores/works with ppts, not pixels.

If you really really want to use pixels, you need a custom script using the ipc interface (see http://i3wm.org/docs/ipc.html) that converts percentage points into pixels, does the calculation, converts back to percentage points, and issues a resize.

edit flag offensive delete link more

Comments

Is there a reason i3 doesn't support fractional resize PPT values? You can use the method you describe above but since values get rounded to the nearest int you can only resize to approximately the value you wanted. Example: say I have 3 containers split evenly. it's impossible to resize one to 50%.

joek1010 gravatar imagejoek1010 ( 2014-05-18 22:50:29 +0000 )edit

Question Tools

Stats

Asked: 2014-03-30 20:01:05 +0000

Seen: 199 times

Last updated: Apr 17 '14