| Share |
Updated: June 20th, 2011
Introduction
Screen is awesome. Once you become comfortable navigating around it, you start using it ALL the time. No more dropped sessions, no having 10 Putty windows open at the same time, no more nohup.
However, with default screen settings I've always felt a bit lost and out of place, mostly because there was no "taskbar" with a bird's eye view of all windows. Pressing ctrl-a, " really does get annoying fast (that's the command that brings up the window selector – screenshot below).
![]()
So instead I modded my screen to have a "taskbar" which sits at the bottom of screen and adds:
- the name of each window
- a clear marking of window states, such as
- the currently active window (* and different background)
- last used window (-)
- if you're sharing the current window with someone else (&)
- the current incoming/outgoing bandwidth in bytes/sec, updating every 5 seconds
- the current time
- the load on the server, as reported by the uptime or w commands
Of course, all of the above is customizable to your liking, but this is what I picked for myself.
Without further ado, here's a screenshot:
Doesn't that make you feel much more homey?
Now using a shared screen session for pair programming, as suggested in a recent article posted on Hacker News, suddenly sounds even more appealing.
Installation
Here's what you need to get this bar on your screen:
- download my .screenrc (0 B, downloaded 1149 times) and put it in your home directory. Make sure the location of wormulon (installed in the next step) is correct. Also, specify the right network interface (eth0 in most cases).
Here is the file, for reference:
1 2 3 4 5 6 7 8 9 10 11 | # Monitor eth0 bandwidth and update every 5 s
# Assign the output of this cmd to '%1`' and use it in the below hardstatus line:
backtick 1 0 0 /usr/local/bin/wormulon -d 5 -i eth0
hardstatus alwayslastline "%{bw}[%H] [%?%-Lw%?%{wb}%n*%f %t%{bw}%?%+Lw%?]%=%{bw} [%1`] [%c:%s] [%l]" # modified from http://lists.gnu.org/archive/html/screen-users/2007-08/msg00008.html
# Set the scrollback length:
defscrollback 10000
# Select whether you want to see the copyright notice during startup:
startup_message off |
- download and compile wormulon (wormulon-0.1.4.tar.gz 0 B, downloaded 548 times or from a mirror) – a nifty little program that shows incoming and outgoing bandwidth and is perfect for integrating with screen. You can omit this step if you don't want the bandwidth monitor. I know the name is a bit odd but it's a legit little open source utility – feel free to check out the code.
tar xvzf wormulon-0.1.4.tar.gz
cd wormulon-0.1.4/
./configure && make
sudo make install # this installs into /usr/local/bin/;
# alternatively, copy the wormulon binary wherever you
# want and update the path in .screenrcNow restart screen and you're good to go.
Artem Russakovskii is a San Francisco programmer, blogger, and future millionaire (that last part is in the works). Follow Artem on Twitter (@ArtemR) or subscribe to the RSS feed.
In the meantime, if you found this article useful, feel free to buy me a cup of coffee below.
beer planet is a blog about technology, programming, computers, and geek life. It is run by Artem Russakovskii - a local San Francisco geek who is currently pursuing his own projects and regularly enjoys hacking Android, PHP, CSS, Javascript, AJAX, Perl, and regular expressions, working on Wordpress plugins and tools, tweaking MySQL queries and server settings, administering Linux machines, blogging, learning new things, and other geeky stuff.
You don't need manually rename each window, your bash prompt can do that, showing currently executed command or current dir:
http://volnitsky.com/project/git-prompt
hey there and thank you for your information – I have certainly picked up anything new
from right here. I did however expertise a few technical points using this website,
as I experienced to reload the website lots of times previous to I
could get it to load properly. I had been wondering if your web host is OK?
Not that I'm complaining, but slow loading instances times will often affect your placement in google and can damage your high-quality score if ads and marketing with Adwords. Anyway I'm
adding this RSS to my e-mail and can look out for a lot
more of your respective exciting content. Make sure
you update this again soon.
Also visit my blog; mouse click the up coming internet site