The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

how to set window width by window

asked 2014-10-20 15:04:44 +0000

UNera gravatar image

for example:

rxvt -g 80:25

I understand that tile manager resizes windows by its rules, but I want have 80-column (exactly) terminal(s). So I want have windows 'class=URxvt' that have always width 80 symbols (at start).

If there is a way to set window (frame) width by window?

As I understand:

These windows (like terminals) count its width (and height) and do request to WM to set the size as window size.

i3wm could store these sizes and use width if a user uses horisontal splitting and use height if a uses uses vertical splitting.

Sorry for my bad English :)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-10-21 11:19:48 +0000

UNera gravatar image

ok, I understand it.

But (for example fluxbox) is able to detect window size in its dimensions (for terminal in symbols).

So if there is a way to resize window by it width/height step?

if Yu resize window in fluxbox it showes real window width (or height) divided by WM_SIZE_HINTS

for example xprop on my rxvt showes:

apache:[~]$ xprop 
        window state: Normal
        icon window: 0x0
_NET_STARTUP_ID(UTF8_STRING) = "i3/rxvt/6026-9-apache_TIME391675894"
WM_CLASS(STRING) = "rxvt", "URxvt"
        Client accepts input or input focus: True
        Initial state is Normal State.
        window id # of group leader: 0x260000a
        program specified minimum size: 13 by 19
        program specified resize increment: 9 by 15
        program specified base size: 4 by 4
        window gravity: NorthWest
WM_COMMAND(STRING) = { "rxvt" }
_NET_WM_ICON_NAME(UTF8_STRING) = " xprop [/home/unera]"
WM_ICON_NAME(STRING) = " xprop [/home/unera]"
_NET_WM_NAME(UTF8_STRING) = " xprop [/home/unera]"
WM_NAME(STRING) = " xprop [/home/unera]"

So it would be nice to have 'resize' command in i3 that will resize by WM_NORMAL_HINTS.

edit flag offensive delete link more


This should be a comment to my answer or an edit to your question (or both) and not an answer as it does not answer your original question. I added to my answer, explaining why *i3* probably never will follow `WM_NORMAL_HINTS`

Adaephon gravatar imageAdaephon ( 2014-10-21 11:45:25 +0000 )edit

i3 is a tiling window manager. Fluxbox is a floating window manager. What you're asking is for a tiling window manager not to tile windows. Not gonna happen.

ANOKNUSA gravatar imageANOKNUSA ( 2014-10-21 13:41:56 +0000 )edit

> i3 is a tiling window manager. Fluxbox is a floating window manager Right, but if fluxbox is able to, then the other WM could use these variables to change window size

UNera gravatar imageUNera ( 2014-10-21 18:29:46 +0000 )edit

Fluxbox is not i3, nor is i3 Fluxbox. Different WMs exist because they are different. Q.E.D. Again, what you're asking for is for i3 to work in a manner opposite that which it was designed for. If what Fluxbox does is important to you, use Fluxbox.

ANOKNUSA gravatar imageANOKNUSA ( 2014-10-21 19:37:01 +0000 )edit

answered 2014-10-21 09:46:38 +0000

Adaephon gravatar image

updated 2014-10-21 11:56:53 +0000

Short answer:

This is not possible in i3.

Long answer:

i3 does not allow programs to resize their tiled windows, so there is really no way for the terminal emulator to resize itself according to a desired column count.

There is also no way using i3 configuration to resize windows of class=URxvt automatically to the correct size. The sizes of tiled windows can not be predefined in any way; new tiled windows always take 1/(1+n) of the space in a container, where n is the number of pre-existing windows in that container (That also means that a single window always covers 100% of the available space). And resizing (with the resize command) only happens relatively to the current window size and the size of the surrounding container.

You could open a feature request (here) for i3 to honor WM_NORMAL_HINTS. But I think it unlikely to ever happen.

These hints are quite useful (and easy to implement) for floating window managers where windows are independend of each other and starting sizes are not well defined. But in i3 (and most other tiling window managers) resizing one window automatically resizes at least one other and so there may be conflicting hints. What should happen if the container does not fit exactly or if there are multiple windows with conflicting hints? Of course you could resize the current window correctly, but in the process you would "break" the sizing of the other windows in the same container. So not bothering about these hints is the easier and probably the only way to do this.

edit flag offensive delete link more

Question Tools


Asked: 2014-10-20 15:04:44 +0000

Seen: 484 times

Last updated: Oct 21 '14