[openbox] openbox focus wish list

Robert Upshall rupshall at psasoft.com
Wed Oct 8 13:51:26 EDT 2003


On Tue, 2003-10-07 at 11:25, Brett Campbell wrote:
> > While this is good, is there a way to make the terminal title dynamic? 
> 
> I make my aterms dynamic by including this in my .zshrc:
> 
> # set titlebar and icon_name text if we're in X11
> chpwd() {
>     [[ -t 1 ]] || return
> 	[ -n "$DISPLAY" ] && print -Pn "\e]0;%~\a"
> }
> chpwd

does anybody have a bash version of this?



> 
> Now, everytime i change directories or source my ~/.zshrc, the titlebar
> is updated with the CWD.  I'm no guru, only a work-aroundist, and so
> i've written several scripts as wrappers for commonly used applications
> that change the titlebar text as needed. Here's an interesting one i use
> when i login to my mail server:
> 
> #!/usr/bin/perl -w
> 
> $|++;   # piping-hot, bitch.
> 
> chomp ($host = `hostname`);
> chomp ($user = `whoami`);
> 
> while (1) {
>         open (LOAD, "/proc/loadavg") || die "Couldn't open " .
> 											"/proc/loadavg: $!\n";
>         @load = split (/ /, <LOAD>);
>         close LOAD;
> 
>         print "\e]0;$user\@$host  -  LoadAvg: $load[0] $load[1] $load[2] at  ";
>         print scalar(localtime), "\a";
> 
>         sleep 2;
> }
> 
> Many may find this silly, but it keeps the loadavg updating every two
> seconds in the titlebar *shrug*
> 
> > AAhh, this is what PROMPT_COMMAND is for.   never mind.
> Hmmm... never heard of this :-)  Interesting.
> 
> Have fun!
-- 

Robert Upshall
Professional Software of Amarillo
(806) 358-8928
rupshall at psasoft.com





More information about the openbox mailing list