After wanting to request a string substitution for the session name, I decided to hack it myself. The attached patch (to screen-4.0.2) allows you to replace %S with the session name for the purpose of displaying in the status line, for example:
hardstatus lastline "%-Lw%{= BW}%48>%n%f* %t%{-}%+Lw%< %S/%c" I found this particularly useful for those who give their sessions specific meaningful names. I work on several projects, having one screen session for each project. Each one look the same (emac, code repository operations, ssh here, ssh there, etc) so it's not instantly clear which session I'm looking at. So having the session name in the status line is helpful. I see that there window groups in development, but using window groups for my multiple projects in a single screen session would not work as smoothly as having multiple sessions. Thanks for developing this awesome tool! -- Brian T.N. Gunney
diff -ru orig.screen-4.0.2/doc/screen.texinfo screen-4.0.2/doc/screen.texinfo --- orig.screen-4.0.2/doc/screen.texinfo 2003-12-05 05:51:46.000000000 -0800 +++ screen-4.0.2/doc/screen.texinfo 2007-02-01 08:59:45.000000000 -0800 @@ -4754,6 +4754,8 @@ window number @item s seconds [EMAIL PROTECTED] S +session name (@pxref{Session Name}) @item t window title @item u Only in screen-4.0.2/doc: screen.texinfo~ diff -ru orig.screen-4.0.2/process.c screen-4.0.2/process.c --- orig.screen-4.0.2/process.c 2003-09-18 05:53:54.000000000 -0700 +++ screen-4.0.2/process.c 2007-02-01 09:05:07.000000000 -0800 @@ -2889,6 +2889,7 @@ debug2("rename(%s, %s) done\n", SockPath, buf); strcpy(SockPath, buf); MakeNewEnv(); + RefreshHStatus(); } break; case RC_SETENV: diff -ru orig.screen-4.0.2/screen.c screen-4.0.2/screen.c --- orig.screen-4.0.2/screen.c 2003-09-08 07:26:41.000000000 -0700 +++ screen-4.0.2/screen.c 2007-02-01 08:47:36.000000000 -0800 @@ -2601,6 +2601,18 @@ } p += strlen(p) - 1; break; + case 'S': + *p = 0; + if ((int)strlen(SockName) < l) + { + strcpy(p, SockName); + if (*p) + qmflag = 1; + } + p += strlen(p) - 1; + if (!tick || tick > 5) + tick = 5; + break; case 'F': p--; /* small hack */
_______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users