repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PMbwmon bandwidth monitor: can specify which interfaces to watch, also supporting...
[hband-tools.git]
/
user-tools
/
terminaltitle
blob
5d90797e9c0e63b050a34974675e7c24b376fe38
1
#!/bin/bash
2
3
true
<<EOF
4
=pod
5
6
=head1 NAME
7
8
terminaltitle - Set the current terminal's title string
9
10
=cut
11
12
EOF
13
14
15
title
=
$
*
16
title_esc
=
${title//\\/\\\\}
17
18
case
"
$TERM
"
in
19
(
xterm
*
|rxvt
*
|urxvt
*)
20
echo -ne
"
\033
]0;
$title_esc
\007
"
21
;;
22
(
screen
*)
23
echo -ne
"
\033
k
$title_esc
\033\\
"
24
;;
25
(*)
26
echo
"
$0
: not supported terminal
$TERM
"
>&
2
27
;;
28
esac