Hi

On Fri, Oct 16, 2009 at 11:18:45AM -0700, Thayer Williams wrote:
> Could someone explain the correct syntax for the new if-shell command?  I
> would like to implement a condition where the tmux statusbar is adjusted
> based on whether I am starting tmux from the Linux console or from within X. 
> 
> I'm hoping for something like this:
> 
>     if [ -z "$DISPLAY" ]; then set -g status-right with extended system info
> 
> Everything I've I've tried ends up with this message:
> 
>     usage: if-shell shell-command command at line 78
> 
> I'd appreciate any advice at this point.

If you put it in the configuration file it will only run when you start the
tmux server, but if that is what you want, this should work:

        if '[ -z "$DISPLAY" ]' 'set -g status-right "blah"'

If you want it to do specific commands depending on where you attach, the best
bet is to write a wrapper script and use an alias.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to