Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
title_examples [2010-01-21 23:44]
asciiphil Page moved from titles to man:titles
title_examples [2016-11-11 12:49]
131.188.78.95 added tcsh example for non-Linux systems
Line 1: Line 1:
-===== Titles (naming windows) =====+====== Title Examples ======
  
-Each screen window has a title.  The title is visible in the window display (from the ''windows'' command or ''C-a w'') and you can use titles as well as numbers to specify windows for many screen commands.+Each screen window has a title.  The title is visible in the window display (from the ''[[commands:windows]]'' command or ''[[commands:windows|C-a w]]'') and you can use titles as well as numbers to specify windows for many screen commands.
  
-You can set the default title for your windows with the ''shelltitle'' command in your .screenrc.  That may be overridden by the ''-t'' option of the ''screen'' command, the title-string escape sequence (''<esc>k//<new-title>//<esc>\''), and the ''title'' command (bound to ''C-a A'').+You can set the default title for your windows with the ''[[commands:shelltitle]]'' command in your .screenrc.  That may be overridden by the ''-t'' option of the ''[[commands:screen]]'' command, the title-string escape sequence (''<esc>k//<new-title>//<esc>\''), and the ''[[commands:title]]'' command (bound to ''[[commands:title|C-a A]]'').
  
-==== Simple examples ====+===== Simple examples =====
  
 In .screenrc, set the default title of all windows to "cardamom": In .screenrc, set the default title of all windows to "cardamom":
Line 38: Line 38:
  
  
-==== Setting the title to the host you ssh'd into ====+===== Setting the title to the host you ssh'd into =====
  
 A nice solution may be found at http://www.tenshu.net/screen_ssh/ A nice solution may be found at http://www.tenshu.net/screen_ssh/
Line 45: Line 45:
  
  
-==== Setting the title to the name of the running program ====+===== Setting the title to the name of the running program =====
  
 A common desire is to name one's windows after the programs running in them.  A window sitting at a shell prompt might be named "bash", while one running pine from a shell would be named "pine". A common desire is to name one's windows after the programs running in them.  A window sitting at a shell prompt might be named "bash", while one running pine from a shell would be named "pine".
Line 53: Line 53:
 <code> <code>
 alias postcmd 'echo -ne "^[k\!#:0^[\\"' alias postcmd 'echo -ne "^[k\!#:0^[\\"'
 +</code>
 +
 +On non-Linux systems like (Free)BSD or Solaris you may use the POSIX version with printf:
 +<code>
 +alias postcmd 'printf "\033k\!#\033\\"'
 </code> </code>
  

User Tools