Friday, January 28, 2011

How to get GNU screen to dynamically set gnome-terminal's title everytime I switch to different windows of a screen session?

Question title says it all.

I am not able to tell which window of my screen session I am in, to find that out I am having to view ^aw (window list) and look at the where the * is to tell which window I am in. WOuld be nice if gnome terminal's title changed everytime I switch windows with in my screen session.

There are quite a few questions in serverfault around this subject but I haven't been able to find an answer to my specific question.

[btw, for future visitors, based on HUB's answer

hardstatus alwayslastline "Terminal Win: %n - [%t]"
hardstatus ignore

don't know how, but it simply did the trick in updating gnome-terminal window's title bar with current screen window.]

  • Add these lines to your screenrc:

    caption always
    caption string "%{kg}%-w%{wb}|%n %t|%{-}%+w"
    hardstatus alwayslastline "You are on: %H  | Now is:  %C%a  %d %M %Y |"
    

    I hope this will help you.

    Murali : Thanks, though it doesn't change the gnome-terminal's title bar, I can live with this since it puts a permanent status bar at the bottom showing which window I am in.
    Murali : Btw, hardstatus alwayslastline "Terminal Win: %n - [%t]" hardstatus ignore don't know how but it simply did the trick in updating gnome-terminal window's title bar with current screen window.
    From HUB

0 comments:

Post a Comment