projects
/
dotfiles-public.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6d0dcb
)
Add X-terminal title setting with .bashrc.d/70title from Gentoo's /etc/bash/bashrc.
author
W. Trevor King
<wking@drexel.edu>
Thu, 1 Dec 2011 12:06:26 +0000
(07:06 -0500)
committer
W. Trevor King
<wking@drexel.edu>
Thu, 1 Dec 2011 12:06:26 +0000
(07:06 -0500)
src/.bashrc.d/70title
[new file with mode: 0644]
patch
|
blob
diff --git a/src/.bashrc.d/70title
b/src/.bashrc.d/70title
new file mode 100644
(file)
index 0000000..
b6f5814
--- /dev/null
+++ b/
src/.bashrc.d/70title
@@ -0,0
+1,11
@@
+if [ "${OS}" != 'Gentoo' ] && [ "${OS}" != 'Gentoo Prefix' ]; then
+ # Change the window title of X terminals
+ case ${TERM} in
+ xterm*|rxvt*|Eterm|aterm|kterm|gnome*|interix)
+ PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
+ ;;
+ screen)
+ PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"'
+ ;;
+ esac
+fi