I'm using multiple screen windows and am wondering if it's possible to add a tabbed interface to it, with tab names and keyboard shortcuts for moving between the tabs.
1 Answer
Add this to your .screenrc file:
caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= @%H - %LD %d %LM - %c"
After you restart your screen, there's a status bar below showing the current tab name, and as a bonus your current host name and time -- modify them away at will if you so wish.
To rename a tab, press ctrl+a A and give it a new name.
You can move between tabs (well, windows but think of them as tabs) with ctrl+a tabnumber or ctrl+a n (go to next tab) / ctrl+a p (go to previous tab).
-
1I have something like this but use
hardstatus
instead ofcaption
. The man page is vague about what the difference is. Anybody know? Aug 26, 2010 at 18:32 -
1@Doug: Hardstatus is usually for the messages thrown by screen for alerting you about different events. Caption is usually used if there are more than one window open. That's all I know -- both really seem to accomplish the same thing. Aug 26, 2010 at 18:36
-
I had
hardstatus alwayslastline
and a format string similar to yourcaption
string so that it always shows interesting info. I've addedcaption string
so that when I split the window, it's slightly different from what I show in thehardstatus
line on the bottom. Aug 26, 2010 at 19:04