| 1 |
NAME |
| 2 |
Term::Title - Portable API to set the terminal titlebar |
| 3 |
|
| 4 |
VERSION |
| 5 |
version 0.09 |
| 6 |
|
| 7 |
SYNOPSIS |
| 8 |
use Term::Title 'set_titlebar', 'set_tab_title'; |
| 9 |
|
| 10 |
set_titlebar("This goes into the title"); |
| 11 |
|
| 12 |
set_titlebar("Title", "And also print this to the terminal"); |
| 13 |
|
| 14 |
set_tab_title("This goes into the tab title"); |
| 15 |
|
| 16 |
set_tab_title("Tab Title", "And also print this to the terminal"); |
| 17 |
|
| 18 |
DESCRIPTION |
| 19 |
Term::Title provides an abstraction for setting the titlebar or the tab |
| 20 |
title across different types of terminals. For *nix terminals, it prints |
| 21 |
the appropriate escape sequences to set the terminal or tab title based |
| 22 |
on the value of $ENV{TERM}. On Windows, it uses Win32::Console to set |
| 23 |
the title directly. |
| 24 |
|
| 25 |
Currently, changing the titlebar is supported in these terminals: |
| 26 |
|
| 27 |
* xterm |
| 28 |
|
| 29 |
* rxvt |
| 30 |
|
| 31 |
* screen |
| 32 |
|
| 33 |
* iTerm2.app |
| 34 |
|
| 35 |
* Win32 console |
| 36 |
|
| 37 |
The terminals that support changing the tab title include: |
| 38 |
|
| 39 |
* iTerm2.app |
| 40 |
|
| 41 |
USAGE |
| 42 |
set_titlebar |
| 43 |
set_titlebar( $title, @optional_text ); |
| 44 |
|
| 45 |
Sets the titlebar to $title or clears the titlebar if $title is |
| 46 |
undefined. |
| 47 |
|
| 48 |
On terminals that require printing escape codes to the terminal, a |
| 49 |
newline character is also printed to the terminal. If @optional_text is |
| 50 |
given, it will be printed to the terminal prior to the newline. Thus, to |
| 51 |
keep terminal output cleaner, use "set_titlebar()" in place of a |
| 52 |
"print()" statement to set the titlebar and print at the same time. |
| 53 |
|
| 54 |
If the terminal is not supported, set_titlebar silently continues, |
| 55 |
printing @optional_text if any. |
| 56 |
|
| 57 |
set_tab_title |
| 58 |
set_tab_title( $title, @optional_text ); |
| 59 |
|
| 60 |
Has the exact same semantics as the "set_titlebar" but changes the tab |
| 61 |
title. |
| 62 |
|
| 63 |
SEE ALSO |
| 64 |
* Win32::Console |
| 65 |
|
| 66 |
* <http://www.ibiblio.org/pub/Linux/docs/HOWTO/Xterm-Title> |
| 67 |
|
| 68 |
SUPPORT |
| 69 |
Bugs / Feature Requests |
| 70 |
Please report any bugs or feature requests through the issue tracker at |
| 71 |
<https://github.com/dagolden/Term-Title/issues>. You will be notified |
| 72 |
automatically of any progress on your issue. |
| 73 |
|
| 74 |
Source Code |
| 75 |
This is open source software. The code repository is available for |
| 76 |
public review and contribution under the terms of the license. |
| 77 |
|
| 78 |
<https://github.com/dagolden/Term-Title> |
| 79 |
|
| 80 |
git clone https://github.com/dagolden/Term-Title.git |
| 81 |
|
| 82 |
AUTHOR |
| 83 |
David Golden <[email protected]> |
| 84 |
|
| 85 |
CONTRIBUTORS |
| 86 |
* Alexandr Ciornii <[email protected]> |
| 87 |
|
| 88 |
* Pedro Melo <[email protected]> |
| 89 |
|
| 90 |
* Slobodan Mišković <[email protected]> |
| 91 |
|
| 92 |
COPYRIGHT AND LICENSE |
| 93 |
This software is Copyright (c) 2008 by David Golden. |
| 94 |
|
| 95 |
This is free software, licensed under: |
| 96 |
|
| 97 |
The Apache License, Version 2.0, January 2004 |
| 98 |
|