aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-06-01 18:19:22 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-06-01 18:19:22 -0300
commit6e2e3b1c2ec7a3276a7bb5dfe20744ea94e7c062 (patch)
tree4366a59f32b3cde09e7e4ff04ce70643938b12ce
parentaac9ed023d7ca852f9339e3a143b1b40b3045961 (diff)
downloadscripts-6e2e3b1c2ec7a3276a7bb5dfe20744ea94e7c062.tar.gz
scripts-6e2e3b1c2ec7a3276a7bb5dfe20744ea94e7c062.tar.bz2
Terminal: support for title env variable
-rwxr-xr-xterminal16
1 files changed, 10 insertions, 6 deletions
diff --git a/terminal b/terminal
index 47441e7..a694aa1 100755
--- a/terminal
+++ b/terminal
@@ -5,26 +5,30 @@
source ~/.geometry || exit 1
+if [ -z "$TITLE" ]; then
+ TITLE="terminal"
+fi
+
if [ "$TERM" == "rxvt" ]; then
if [ ! -z "$1" ]; then
- rxvt-unicode -bg black +sb -fg white -fn $FONT -g $GEOMETRY -title terminal \
+ rxvt-unicode -bg black +sb -fg white -fn $FONT -g $GEOMETRY -title $TITLE \
-e bash -rcfile $HOME/.terminal -c "$*"
else
- rxvt-unicode -bg black +sb -fg white -fn $FONT -g $GEOMETRY -title terminal \
+ rxvt-unicode -bg black +sb -fg white -fn $FONT -g $GEOMETRY -title $TITLE \
-e bash -rcfile $HOME/.terminal
fi
elif [ "$TERM" == "Eterm" ]; then
if [ ! -z "$1" ]; then
Eterm --background-pixmap 0 --scrollbar 0 +sb -b black -f white -F $FONT --borderless no \
- --buttonbar 0 -g $GEOMETRY -nterminal -e bash -rcfile $HOME/.terminal -c "$*"
+ --buttonbar 0 -g $GEOMETRY -n$TITLE -e bash -rcfile $HOME/.terminal -c "$*"
else
Eterm --background-pixmap 0 --scrollbar 0 +sb -b black -f white -F $FONT --borderless no \
- --buttonbar 0 -g $GEOMETRY -nterminal -e bash -rcfile $HOME/.terminal
+ --buttonbar 0 -g $GEOMETRY -n$TITLE -e bash -rcfile $HOME/.terminal
fi
elif [ "$TERM" == "xterm" ]; then
if [ ! -z "$1" ]; then
- xterm -u8 -fn $FONT -geometry $GEOMETRY -title terminal -e bash -c "$*"
+ xterm -u8 -fn $FONT -geometry $GEOMETRY -title $TITLE -e bash -c "$*"
else
- xterm -u8 -fn $FONT -geometry $GEOMETRY -title terminal -e bash
+ xterm -u8 -fn $FONT -geometry $GEOMETRY -title $TITLE -e bash
fi
fi