This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
man:string_escapes [2004-10-19 17:26] 209.251.43.194 |
man:string_escapes [2021-02-19 20:07] asciiphil old revision restored (2010-01-25 13:48) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== String Escapes ===== | ||
+ | |||
+ | Screen provides an escape mechanism to insert information like the current | ||
+ | time into messages or file names. | ||
+ | exception: inside of a window' | ||
+ | |||
+ | Here is the full list of supported escapes: | ||
+ | |||
+ | | % | the escape character itself | | ||
+ | | a | either ' | ||
+ | | A | either ' | ||
+ | | c | current time HH:MM in 24h format | | ||
+ | | C | current time HH:MM in 12h format | | ||
+ | | d | day number | | ||
+ | | D | weekday name | | ||
+ | | f | flags of the window (see [[:Window Flags]]) | | ||
+ | | F | sets %? to true if the window has the focus | | ||
+ | | h | hardstatus of the window | | ||
+ | | H | hostname of the system | | ||
+ | | l | current load of the system | | ||
+ | | m | month number | | ||
+ | | M | month name | | ||
+ | | n | window number | | ||
+ | | s | seconds | | ||
+ | | t | window title | | ||
+ | | u | all other users on this window | | ||
+ | | w | all window numbers and names. | ||
+ | | W | all window numbers and names except the current one | | ||
+ | | y | last two digits of the year number | | ||
+ | | Y | full year number | | ||
+ | | ? | the part to the next ' | ||
+ | | : | else part of ' | ||
+ | | = | pad the string to the display' | ||
+ | | < | same as ' | ||
+ | | > | mark the current text position for the next truncation. | ||
+ | | { | attribute/ | ||
+ | | ` | Substitute | ||
+ | |||
+ | The ' | ||
+ | instead of space as fill character. | ||
+ | escape use absolute positions. | ||
+ | qualifier (e.g. ' | ||
+ | long names, ' | ||
+ | |||
+ | <box 80% blue | :!: See also> | ||
+ | [[: | ||
+ | </ | ||
+ | |||
+ | An attribute/ | ||
+ | color settings. | ||
+ | The attribute modifier must be prefixed by a change type indicator if it | ||
+ | can be confused with a color desciption. | ||
+ | known: | ||
+ | |||
+ | | + | add the specified set to the current attributes | | ||
+ | | - | remove the set from the current attributes | | ||
+ | | ! | invert the set in the current attributes | | ||
+ | | = | change the current attributes to the specified set | | ||
+ | |||
+ | The attribute set can either be specified as a hexadecimal number or a | ||
+ | combination of the following letters: | ||
+ | |||
+ | | d | dim | | ||
+ | | u | underline | | ||
+ | | b | bold | | ||
+ | | r | reverse | | ||
+ | | s | standout | | ||
+ | | B | blinking | | ||
+ | |||
+ | Colors are coded either as a hexadecimal number or two letters specifying | ||
+ | the desired background and foreground color (in that order). | ||
+ | following colors are known: | ||
+ | |||
+ | | k | black | | ||
+ | | r | red | | ||
+ | | g | green | | ||
+ | | y | yellow | | ||
+ | | b | blue | | ||
+ | | m | magenta | | ||
+ | | c | cyan | | ||
+ | | w | white | | ||
+ | | d | default color | | ||
+ | | . | leave color unchanged | | ||
+ | |||
+ | The capitalized versions of the letter specify bright colors. | ||
+ | also use the pseudo-color ' | ||
+ | color unchanged. | ||
+ | foreground or background color dependant on the current attributes: if | ||
+ | reverse mode is set, the background color is changed instead of the | ||
+ | foreground color. | ||
+ | If you want the same behaviour for two-letter color descriptions, | ||
+ | prefix them with a ' | ||
+ | and colors that were set before the last change was made (i.e. pops one | ||
+ | level of the color-change stack). | ||
+ | |||
+ | Examples: | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | background. | ||
+ | |||
+ | < | ||
+ | The available windows centered at the current window and truncated to the | ||
+ | available width. | ||
+ | be used with ' | ||
+ | |||
+ | < | ||
+ | The window number and title and the windows hardstatus, if one is set. | ||
+ | Also use a red background if this is the active focus. | ||
+ | ' | ||