* [gentoo-user] How to extend the tmux status 'title' for each pane or window
@ 2014-05-31 15:22 Mick
2014-06-02 14:17 ` Stroller
0 siblings, 1 reply; 7+ messages in thread
From: Mick @ 2014-05-31 15:22 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 355 bytes --]
Hi All,
I am using tmux and find it convenient especially for managing remote
sessions, but I have noticed that the commands running in a session shown at
the bottom right hand side, within the status line, are too short. Can I
extend the number of characters to be able to see more of the command being
run at any time?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] How to extend the tmux status 'title' for each pane or window
2014-05-31 15:22 [gentoo-user] How to extend the tmux status 'title' for each pane or window Mick
@ 2014-06-02 14:17 ` Stroller
2014-06-03 5:59 ` Mick
0 siblings, 1 reply; 7+ messages in thread
From: Stroller @ 2014-06-02 14:17 UTC (permalink / raw
To: gentoo-user
On Sat, 31 May 2014, at 4:22 pm, Mick <michaelkintzios@gmail.com> wrote:
>
> I am using tmux and find it convenient especially for managing remote
> sessions, but I have noticed that the commands running in a session shown at
> the bottom right hand side, within the status line, are too short. Can I
> extend the number of characters to be able to see more of the command being
> run at any time?
I only see a *maximum* length option in the manpage - presumably because tmux allocates as much space as possible to the left and right statuses, but space must be consumed by the window titles in the middle.
Is it possible you can give the right hand side more room by reducing the maximum of the left?
I'm interested to know what you're displaying on the right - it's been so long since I set up tmux, I can't remember what the defaults are. Could you possibly post the output of `tmux show -g status-right`, please?
I have:
$ tmux show -g | grep -E 'status-[lr]'
status-left "#[fg=blue]#T"
status-left-attr none
status-left-bg default
status-left-fg default
status-left-length 20
status-right "#[fg=blue][#S]"
status-right-attr none
status-right-bg default
status-right-fg default
status-right-length 40
$
Stroller.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] How to extend the tmux status 'title' for each pane or window
2014-06-02 14:17 ` Stroller
@ 2014-06-03 5:59 ` Mick
2014-06-03 14:16 ` Stroller
0 siblings, 1 reply; 7+ messages in thread
From: Mick @ 2014-06-03 5:59 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 2149 bytes --]
On Monday 02 Jun 2014 15:17:10 Stroller wrote:
> On Sat, 31 May 2014, at 4:22 pm, Mick <michaelkintzios@gmail.com> wrote:
> > I am using tmux and find it convenient especially for managing remote
> > sessions, but I have noticed that the commands running in a session shown
> > at the bottom right hand side, within the status line, are too short.
> > Can I extend the number of characters to be able to see more of the
> > command being run at any time?
>
> I only see a *maximum* length option in the manpage - presumably because
> tmux allocates as much space as possible to the left and right statuses,
> but space must be consumed by the window titles in the middle.
>
> Is it possible you can give the right hand side more room by reducing the
> maximum of the left?
>
> I'm interested to know what you're displaying on the right - it's been so
> long since I set up tmux, I can't remember what the defaults are. Could
> you possibly post the output of `tmux show -g status-right`, please?
>
> I have:
>
> $ tmux show -g | grep -E 'status-[lr]'
> status-left "#[fg=blue]#T"
> status-left-attr none
> status-left-bg default
> status-left-fg default
> status-left-length 20
> status-right "#[fg=blue][#S]"
> status-right-attr none
> status-right-bg default
> status-right-fg default
> status-right-length 40
> $
>
Thanks Stroller,
On the left status bar I see this:
[0] 0:bash*
with one window open. As I create more windows it adds to it like so:
[0] 0:bash 1:bash- 2:bash*
The right hand side shows the prompt, or command being run, but not all of it
if it is too long.
This is the output you requested:
$ tmux show -g status-right
status-right ""#22T" %H:%M %d-%b-%y"
and this are the equivalent settings to yours:
$ tmux show -g | grep -E 'status-[lr]'
status-left "[#S]"
status-left-attr none
status-left-bg default
status-left-fg default
status-left-length 10
status-right ""#22T" %H:%M %d-%b-%y"
status-right-attr none
status-right-bg default
status-right-fg default
status-right-length 40
I don't have a ~/.tmux.conf yet.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] How to extend the tmux status 'title' for each pane or window
2014-06-03 5:59 ` Mick
@ 2014-06-03 14:16 ` Stroller
2014-06-07 10:33 ` Mick
0 siblings, 1 reply; 7+ messages in thread
From: Stroller @ 2014-06-03 14:16 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3257 bytes --]
On Tue, 3 June 2014, at 6:59 am, Mick <michaelkintzios@gmail.com> wrote:
>> …
>> I have:
>>
>> …
>> status-left "#[fg=blue]#T"
>> …
>> status-right "#[fg=blue][#S]"
>> …
>>
> Thanks Stroller,
>
> On the left status bar I see this:
>
> [0] 0:bash*
>
> with one window open. As I create more windows it adds to it like so:
>
> [0] 0:bash 1:bash- 2:bash*
>
>
> The right hand side shows the prompt, or command being run, but not all of it
> if it is too long.
>
> …
> status-left "[#S]"
> …
> status-right ""#22T" %H:%M %d-%b-%y"
It looks to me like I've merely swapped left and right panes because, presumably, I thought it looked better that way.
And I've removed the clock - that's one way you could reclaim some screen space.
I seem to be a little tired, and not fully functional, right now, but you could do this (for example), like this:
tmux set -g status-right "#22T"
The relevant section of the man page is:
status-left string
Display string to the left of the status bar. string
will be passed through strftime(3) before being used. By
default, the session name is shown. string may contain
any of the following special character sequences:
Character pair Replaced with
#(shell-command) First line of the command's
output
#[attributes] Colour or attribute change
#H Hostname of local host
#h Hostname of local host without
the domain name
#F Current window flag
#I Current window index
#D Current pane unique identifier
#P Current pane index
#S Session name
#T Current pane title
#W Current window name
## A literal ‘#’
As I say, I don't seem to be firing on all cylinders right now, but it doesn't look to me like the "commands being run" are shown where you say they are, not on the far right, at least.
I think they're shown in the *middle* section of the status bar.
Where above you have said your display shows:
[0] 0:bash 1:bash- 2:bash*
Then the first "0", in square brackets, indicates the name of the current session. Try this by opening a new terminal and running `tmux new-s -s test_sess`.
I think that "bash" is the name of the command being run in each of your sessions.
You might like to try running the attached countdown.pl script and see how "the command being run" is displayed.
HTH,
Stroller.
[-- Attachment #2: countdown.pl --]
[-- Type: text/x-perl-script, Size: 159 bytes --]
#!/usr/bin/perl
use 5.010 ;
my $i = 5 ; while ($i > 0) {
say $i-- ; sleep 1;
}
$i=5 ; while ($i > 0) {
$0="The_coundown_of_doom_$i" ; sleep 1 ; $i-- ;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] How to extend the tmux status 'title' for each pane or window
2014-06-03 14:16 ` Stroller
@ 2014-06-07 10:33 ` Mick
2014-06-10 15:44 ` [gentoo-user] " Jonathan Callen
0 siblings, 1 reply; 7+ messages in thread
From: Mick @ 2014-06-07 10:33 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1.1: Type: Text/Plain, Size: 1805 bytes --]
On Tuesday 03 Jun 2014 15:16:56 Stroller wrote:
> On Tue, 3 June 2014, at 6:59 am, Mick <michaelkintzios@gmail.com> wrote:
> >> …
> >> I have:
> >>
> >> …
> >> status-left "#[fg=blue]#T"
> >> …
> >> status-right "#[fg=blue][#S]"
> >> …
> >
> > Thanks Stroller,
> >
> > On the left status bar I see this:
> >
> > [0] 0:bash*
> >
> > with one window open. As I create more windows it adds to it like so:
> >
> > [0] 0:bash 1:bash- 2:bash*
> >
> >
> > The right hand side shows the prompt, or command being run, but not all
> > of it if it is too long.
> >
> > …
> > status-left "[#S]"
> > …
> > status-right ""#22T" %H:%M %d-%b-%y"
>
> It looks to me like I've merely swapped left and right panes because,
> presumably, I thought it looked better that way.
>
> And I've removed the clock - that's one way you could reclaim some screen
> space.
Right, on my default setup the clock is on the right, the number of windows on
the left and the title in the middle.
As is the title shows:
"root@compaq:/usr/src/l"
instead of "root@compaq:/usr/src/linux". This is what I mean of it being cut
short.
[snip ...]
> As I say, I don't seem to be firing on all cylinders right now, but it
> doesn't look to me like the "commands being run" are shown where you say
> they are, not on the far right, at least.
>
> I think they're shown in the *middle* section of the status bar.
Yes, they are shown in the middle, but on a 82x25 pixel terminal the title is
displayed about 2/3 towards the right of the status bar, right against the
clock. See attached screenshot.
Running tmux set -g status-right "#32T" removed the clock and increased the
real estate for the title bar.
Thanks again Stroller.
--
Regards,
Mick
[-- Attachment #1.2: tmux.png --]
[-- Type: image/png, Size: 12576 bytes --]
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-user] Re: How to extend the tmux status 'title' for each pane or window
2014-06-07 10:33 ` Mick
@ 2014-06-10 15:44 ` Jonathan Callen
2014-06-14 20:27 ` Mick
0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Callen @ 2014-06-10 15:44 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On 06/07/2014 06:33 AM, Mick wrote:
> On Tuesday 03 Jun 2014 15:16:56 Stroller wrote:
>> On Tue, 3 June 2014, at 6:59 am, Mick <michaelkintzios@gmail.com>
>> wrote:
>>>> … I have:
>>>>
>>>> … status-left "#[fg=blue]#T" … status-right "#[fg=blue][#S]"
>>>> …
>>>
>>> Thanks Stroller,
>>>
>>> On the left status bar I see this:
>>>
>>> [0] 0:bash*
>>>
>>> with one window open. As I create more windows it adds to it
>>> like so:
>>>
>>> [0] 0:bash 1:bash- 2:bash*
>>>
>>>
>>> The right hand side shows the prompt, or command being run, but
>>> not all of it if it is too long.
>>>
>>> … status-left "[#S]" … status-right ""#22T" %H:%M %d-%b-%y"
>>
>> It looks to me like I've merely swapped left and right panes
>> because, presumably, I thought it looked better that way.
>>
>> And I've removed the clock - that's one way you could reclaim
>> some screen space.
>
> Right, on my default setup the clock is on the right, the number of
> windows on the left and the title in the middle.
>
> As is the title shows:
>
> "root@compaq:/usr/src/l"
>
> instead of "root@compaq:/usr/src/linux". This is what I mean of it
> being cut short.
>
>
> [snip ...]
>> As I say, I don't seem to be firing on all cylinders right now,
>> but it doesn't look to me like the "commands being run" are shown
>> where you say they are, not on the far right, at least.
>>
>> I think they're shown in the *middle* section of the status bar.
>
> Yes, they are shown in the middle, but on a 82x25 pixel terminal
> the title is displayed about 2/3 towards the right of the status
> bar, right against the clock. See attached screenshot.
>
> Running tmux set -g status-right "#32T" removed the clock and
> increased the real estate for the title bar.
>
> Thanks again Stroller.
>
The "#22T" means (I think) to show the *first 22 characters* of the
title, cutting it off if it is too long. You may just want to
increase that number to something that matches the room you have
available.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBCgAGBQJTlyfpAAoJELHSF2kinlg49csP/1XsKO/l2RGUfMd7/VlKV7Iq
z6FdY/9qMepDvk4fZgkGB4wvsA45H8i2Dgj6Ua8PwsMW0NOo11McHGkBTwWzlZln
bJKGX4+on+vu24omf7amTpRddiDNXIfyE1jn0E0kgcpLGOqAGf8yf3YLWLCHe2Ao
MVariiSq3d3+QtUzf9NSXtCVZTsBmZAS63aYa9IRNikNfjVgiMIBUuhyrMZzaRCQ
/cwEH2xhiZLcuiSkJ7299r9OoFipSYg2gzgjz5EBpimxpxnWPPazlr2qQH10kGXX
VL4B3YX3RFpFzRJ1lyvBEyninCx9+aJcyx+WlkF3g8NpymwvRRJrlYMpwqQkEuhD
2ckNQLQBGdvv/XRpGPZqMedsW3Zk6tFWp8r4OrSrRRI+jBZhqqV8/edEQAqW8Zw2
S+qjO8jviWrahEXjcbMSuVVrsy0Dr9muYIwY1wLRR3fgpQwFA4VztwCTPTft2/40
rh0A3PoVdHO/6Z8eI08pQsno+DrxCuDNQAq6CtULGMLmiur9U5iT9xReNQgnz6YV
QGvmSw141fp6kzvi1zPpby/O88d2XJR44ovTcbJBOH3JtRGb8aOLBJeenQDwk3Wu
O6DhgvqdW8/K8yChvZWbWEECJ9GItINungrXEKa+HQbrqxi2AB7ccxJfJTqinwUd
oqGlxGJod38/7IhGX2MX
=RisW
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: How to extend the tmux status 'title' for each pane or window
2014-06-10 15:44 ` [gentoo-user] " Jonathan Callen
@ 2014-06-14 20:27 ` Mick
0 siblings, 0 replies; 7+ messages in thread
From: Mick @ 2014-06-14 20:27 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1927 bytes --]
On Tuesday 10 Jun 2014 16:44:41 Jonathan Callen wrote:
> On 06/07/2014 06:33 AM, Mick wrote:
> > On Tuesday 03 Jun 2014 15:16:56 Stroller wrote:
> >> On Tue, 3 June 2014, at 6:59 am, Mick <michaelkintzios@gmail.com>
> >>> … status-left "[#S]" … status-right ""#22T" %H:%M %d-%b-%y"
> >>
> >> It looks to me like I've merely swapped left and right panes
> >> because, presumably, I thought it looked better that way.
> >>
> >> And I've removed the clock - that's one way you could reclaim
> >> some screen space.
> >
> > Right, on my default setup the clock is on the right, the number of
> > windows on the left and the title in the middle.
> >
> > As is the title shows:
> >
> > "root@compaq:/usr/src/l"
> >
> > instead of "root@compaq:/usr/src/linux". This is what I mean of it
> > being cut short.
> >
> >
> > [snip ...]
> >
> >> As I say, I don't seem to be firing on all cylinders right now,
> >> but it doesn't look to me like the "commands being run" are shown
> >> where you say they are, not on the far right, at least.
> >>
> >> I think they're shown in the *middle* section of the status bar.
> >
> > Yes, they are shown in the middle, but on a 82x25 pixel terminal
> > the title is displayed about 2/3 towards the right of the status
> > bar, right against the clock. See attached screenshot.
> >
> > Running tmux set -g status-right "#32T" removed the clock and
> > increased the real estate for the title bar.
> >
> > Thanks again Stroller.
>
> The "#22T" means (I think) to show the *first 22 characters* of the
> title, cutting it off if it is too long. You may just want to
> increase that number to something that matches the room you have
> available.
Yes, increasing the number extends the title in the middle, but I would
ideally like a setting that extends it automatically to cover available space
if needed.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-06-14 20:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-31 15:22 [gentoo-user] How to extend the tmux status 'title' for each pane or window Mick
2014-06-02 14:17 ` Stroller
2014-06-03 5:59 ` Mick
2014-06-03 14:16 ` Stroller
2014-06-07 10:33 ` Mick
2014-06-10 15:44 ` [gentoo-user] " Jonathan Callen
2014-06-14 20:27 ` Mick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox