Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.linux > #60958 > unrolled thread

tmux cannot handle high resolution momitors

Started byCecil Westerhof <Cecil@decebal.nl>
First post2019-11-13 22:09 +0100
Last post2019-11-14 15:24 +0100
Articles 5 — 2 participants

Back to article view | Back to alt.os.linux


Contents

  tmux cannot handle high resolution momitors Cecil Westerhof <Cecil@decebal.nl> - 2019-11-13 22:09 +0100
    Re: tmux cannot handle high resolution momitors marrgol <marrgol@address.invalid> - 2019-11-14 03:27 +0100
      Re: tmux cannot handle high resolution momitors Cecil Westerhof <Cecil@decebal.nl> - 2019-11-14 08:17 +0100
        Re: tmux cannot handle high resolution momitors marrgol <marrgol@address.invalid> - 2019-11-14 14:50 +0100
          Re: tmux cannot handle high resolution momitors Cecil Westerhof <Cecil@decebal.nl> - 2019-11-14 15:24 +0100

#60958 — tmux cannot handle high resolution momitors

FromCecil Westerhof <Cecil@decebal.nl>
Date2019-11-13 22:09 +0100
Subjecttmux cannot handle high resolution momitors
Message-ID<8736ermqji.fsf@munus.decebal.nl>
It seems that tmux has problem with high resolution monitors. I have
the following script:
    #!/usr/bin/env bash

    # An error should terminate the script
    set -o errexit
    set -o nounset


    tmux new-session  -d
    tmux split-window -h -l 60
    tmux split-window -h -l 60
    tmux set          pane-border-status       bottom
    tmux a

With a full-screen xfce4-terminal I get:
    1 windows (created Wed Nov 13 16:22:41 2019) [272x67] (attached)

    1: [83x66] [history 0/2000, 0 bytes] %163
    2: [65x66] [history 0/2000, 0 bytes] %164
    3: [122x66] [history 0/2000, 0 bytes] %165 (active)

With 'half' a window the results are even more strange:
    1 windows (created Wed Nov 13 21:19:14 2019) [135x67] (attached)

    1: [38x66] [history 0/2000, 0 bytes] %219
    2: [19x66] [history 0/2000, 0 bytes] %220
    3: [76x66] [history 0/2000, 0 bytes] %221 (active)

Is this a bug, or do I use tmux in the wrong way?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [next] | [standalone]


#60976

Frommarrgol <marrgol@address.invalid>
Date2019-11-14 03:27 +0100
Message-ID<5dccbba0$0$547$65785112@news.neostrada.pl>
In reply to#60958
On 2019-11-13 at 22:09, Cecil Westerhof wrote:
> It seems that tmux has problem with high resolution monitors. I have
> the following script:
>     #!/usr/bin/env bash
> 
>     # An error should terminate the script
>     set -o errexit
>     set -o nounset
> 
> 
>     tmux new-session  -d
>     tmux split-window -h -l 60
>     tmux split-window -h -l 60
>     tmux set          pane-border-status       bottom
>     tmux a
> 
> With a full-screen xfce4-terminal I get:
>     1 windows (created Wed Nov 13 16:22:41 2019) [272x67] (attached)
> 
>     1: [83x66] [history 0/2000, 0 bytes] %163
>     2: [65x66] [history 0/2000, 0 bytes] %164
>     3: [122x66] [history 0/2000, 0 bytes] %165 (active)
> 
> With 'half' a window the results are even more strange:
>     1 windows (created Wed Nov 13 21:19:14 2019) [135x67] (attached)
> 
>     1: [38x66] [history 0/2000, 0 bytes] %219
>     2: [19x66] [history 0/2000, 0 bytes] %220
>     3: [76x66] [history 0/2000, 0 bytes] %221 (active)
> 
> Is this a bug, or do I use tmux in the wrong way?

Maybe it is a bug but you seem to be doing it wrong anyway. ;-)
New panes are split off the active one and made current active by
default, so in your script you first split a 60-column pane from
the whole screen and then you try to split the second 60-column pane
off the previously created 60-column pane -- probably not what you
intended.  Try adding '-d' option to the 'split-window' commands
to keep the initial pane active.


-- 
mrg

[toc] | [prev] | [next] | [standalone]


#60980

FromCecil Westerhof <Cecil@decebal.nl>
Date2019-11-14 08:17 +0100
Message-ID<87y2wjkjuf.fsf@munus.decebal.nl>
In reply to#60976
marrgol <marrgol@address.invalid> writes:

> On 2019-11-13 at 22:09, Cecil Westerhof wrote:
>> It seems that tmux has problem with high resolution monitors. I have
>> the following script:
>>     #!/usr/bin/env bash
>> 
>>     # An error should terminate the script
>>     set -o errexit
>>     set -o nounset
>> 
>> 
>>     tmux new-session  -d
>>     tmux split-window -h -l 60
>>     tmux split-window -h -l 60
>>     tmux set          pane-border-status       bottom
>>     tmux a
>> 
>> With a full-screen xfce4-terminal I get:
>>     1 windows (created Wed Nov 13 16:22:41 2019) [272x67] (attached)
>> 
>>     1: [83x66] [history 0/2000, 0 bytes] %163
>>     2: [65x66] [history 0/2000, 0 bytes] %164
>>     3: [122x66] [history 0/2000, 0 bytes] %165 (active)
>> 
>> With 'half' a window the results are even more strange:
>>     1 windows (created Wed Nov 13 21:19:14 2019) [135x67] (attached)
>> 
>>     1: [38x66] [history 0/2000, 0 bytes] %219
>>     2: [19x66] [history 0/2000, 0 bytes] %220
>>     3: [76x66] [history 0/2000, 0 bytes] %221 (active)
>> 
>> Is this a bug, or do I use tmux in the wrong way?
>
> Maybe it is a bug but you seem to be doing it wrong anyway. ;-)
> New panes are split off the active one and made current active by
> default, so in your script you first split a 60-column pane from
> the whole screen and then you try to split the second 60-column pane
> off the previously created 60-column pane -- probably not what you
> intended.  Try adding '-d' option to the 'split-window' commands
> to keep the initial pane active.

I added the -d to the split-window commands, but that does not make
things better. In full-screen the panes become:
    1: [65x66] [history 0/2000, 0 bytes] %225 (active)
    2: [81x66] [history 0/2000, 0 bytes] %227
    3: [124x66] [history 0/2000, 0 bytes] %226

and in 'half' screen:
    1: [20x66] [history 0/2000, 0 bytes] %228 (active)
    2: [35x66] [history 0/2000, 0 bytes] %230
    3: [78x66] [history 0/2000, 0 bytes] %229

So in both cases worse.


Then I realised that in the 'half' screen there where not enough
columns. So I hanged it to:
    tmux new-session  -d
    tmux split-window -d -h -l 60
    tmux set          pane-border-status       bottom
    tmux a

The 'half' screen then becomes:
    1: [47x66] [history 0/2000, 0 bytes] %231 (active)
    2: [87x66] [history 0/2000, 0 bytes] %232

and the full-screen:
    1: [115x66] [history 0/2000, 0 bytes] %233 (active)
    2: [156x66] [history 0/2000, 0 bytes] %234

So it keeps being strange.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [prev] | [next] | [standalone]


#60983

Frommarrgol <marrgol@address.invalid>
Date2019-11-14 14:50 +0100
Message-ID<5dcd5ba4$0$521$65785112@news.neostrada.pl>
In reply to#60980
On 2019-11-14 at 08:17, Cecil Westerhof wrote:
> I added the -d to the split-window commands, but that does not make
> things better. In full-screen the panes become:
>     1: [65x66] [history 0/2000, 0 bytes] %225 (active)
>     2: [81x66] [history 0/2000, 0 bytes] %227
>     3: [124x66] [history 0/2000, 0 bytes] %226
> […]
> So it keeps being strange.

Strange indeed.  I'm using an oldish version of tmux, 2.2, and it
works fine with your script with the 'split-window -d'.  So I tried
the latest, 2.9, and got results similar to yours.  I fixed it by
adding '-x 190' to the 'new-session -d' line (190 is the number of
columns shown by xfce-terminal in full-screen mode, with the currently
selected font, on my monitor) because tmux 2.9 seems to be defaulting
to 80x24 screen when started detached.  Splitting twice 60-column panes
results here in three panes of widths 1-, 17- and 60-column, then
attaching causes to recalculate these widths to adjust to the monitor
width and this apparently kind of messes things up.


-- 
mrg

[toc] | [prev] | [next] | [standalone]


#60984

FromCecil Westerhof <Cecil@decebal.nl>
Date2019-11-14 15:24 +0100
Message-ID<87h836leng.fsf@munus.decebal.nl>
In reply to#60983
marrgol <marrgol@address.invalid> writes:

> On 2019-11-14 at 08:17, Cecil Westerhof wrote:
>> I added the -d to the split-window commands, but that does not make
>> things better. In full-screen the panes become:
>>     1: [65x66] [history 0/2000, 0 bytes] %225 (active)
>>     2: [81x66] [history 0/2000, 0 bytes] %227
>>     3: [124x66] [history 0/2000, 0 bytes] %226
>> […]
>> So it keeps being strange.
>
> Strange indeed.  I'm using an oldish version of tmux, 2.2, and it
> works fine with your script with the 'split-window -d'.  So I tried
> the latest, 2.9, and got results similar to yours.  I fixed it by
> adding '-x 190' to the 'new-session -d' line (190 is the number of
> columns shown by xfce-terminal in full-screen mode, with the currently
> selected font, on my monitor) because tmux 2.9 seems to be defaulting
> to 80x24 screen when started detached.  Splitting twice 60-column panes
> results here in three panes of widths 1-, 17- and 60-column, then
> attaching causes to recalculate these widths to adjust to the monitor
> width and this apparently kind of messes things up.

I have 2.8 and I need -x 272 (because of my screen).

I removed the -d, because I want 50%, 25% and 25%: I started with -l
because -p did not work.

I now have:
    split-window -h -p 50
    split-window -h -p 50

And it does what I want and expect.


Where should this be reported?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [prev] | [standalone]


Back to top | Article view | alt.os.linux


csiph-web