aboutsummaryrefslogtreecommitdiff
path: root/terminal.dot.link
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-12-27 15:32:30 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-12-27 15:32:30 -0200
commit0dda694086411cc1da1b472e42516d31208e240e (patch)
tree5daf5409eec865c54c35a535690fde1b20456a8d /terminal.dot.link
downloadprofile-0dda694086411cc1da1b472e42516d31208e240e.tar.gz
profile-0dda694086411cc1da1b472e42516d31208e240e.tar.bz2
Initial import
Diffstat (limited to 'terminal.dot.link')
-rw-r--r--terminal.dot.link30
1 files changed, 30 insertions, 0 deletions
diff --git a/terminal.dot.link b/terminal.dot.link
new file mode 100644
index 0000000..ada0ceb
--- /dev/null
+++ b/terminal.dot.link
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# .terminal: sets default behaviour for a X11 console
+#
+
+# Load ANSI Art
+#cat $HOME/themes/ans/slack.ans
+
+# Make sure to load the profile
+source $HOME/.profile
+
+# Default window title
+TITLE="terminal"
+
+# Set window title, standard version
+#trap 'echo -ne "\e]0;terminal: ${TITLE:-$BASH_COMMAND}\007"' DEBUG
+#trap 'xtitle ${TITLE:-$BASH_COMMAND}' DEBUG
+
+# Set window title, special version
+#
+# In the standard version, $_ stops to keep the parameter of the last command.
+# The sollution is to save the value of $_ and issue a pointless command with
+# it after changing the title so $_ retain it's intended value.
+#
+#trap 'last="$_" ; echo -ne "\e]0;terminal: ${TITLE:-$BASH_COMMAND}\007"; true $last' DEBUG
+#trap 'last="$_" ; xtitle ${TITLE:-$BASH_COMMAND}; true $last' DEBUG
+trap '_last="$_" ; _command=${BASH_COMMAND#command_prompt} ; xtitle ${_command:-$TITLE}; true $_last' DEBUG
+
+# Fortune :)
+#fortune