On Tue, 3 June 2014, at 6:59 am, Mick <[email protected]> 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.

#!/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-- ;
}

Reply via email to