[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hardstatus line / startup foo
From: |
Mikael Schönenberg |
Subject: |
Re: hardstatus line / startup foo |
Date: |
Thu, 18 Nov 2004 22:36:20 +0100 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
On Thu, Nov 18, 2004 at 02:08:51PM -0600, Tony Perrie wrote:
> Is there a way to make different color'd status lines and/or source
> different .bashrc files when I create a new screen?
>
> Like screen 0 has a white status line, screen 1 is blue and screen0
> sources .bashrc0, etc...
I can't comment on your first question - I've never managed to assemble
enough interest to actually look all that much at what can be done with
the hardstatus line.
However, when it comes to sourcing different .bashrc files, having a
very simple test in your .bashrc making use of the WINDOW environment
variable will probably do the trick:
----- .bashrc -------------
# This will source ~/.bashrc_1 for window 1, ~/.bashrc_2 for window 2 etc.
# If no window specific .bashrc exists, pick a default one.
if [ -e $HOME/.bashrc_$WINDOW ]; then
. $HOME/.bashrc_$WINDOW
else
. $HOME/.bashrc_default
fi
------------------------EOF
I use a similar piece in my own .bashrc for keeping different bash
histories in different windows:
----- my .bashrc ----------
_HIST_DIR=$HOME/storage/log/bash
if [ "$WINDOW" != "" ]; then
export HISTFILE=$_HIST_DIR/history_screen$WINDOW
else
export HISTFILE=$_HIST_DIR/history
fi
------------------------EOF
Hope this helps :)
--
Mikael Schönenberg <address@hidden>