aboutsummaryrefslogtreecommitdiff
path: root/modules/profile/terminal
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-13 15:49:12 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-13 15:49:12 -0200
commita86446df9ba5ffb86d99c511217d704736803f3f (patch)
tree165a4ebbe08c3d1519f13696ab659e8af4814939 /modules/profile/terminal
downloaddotfiles-a86446df9ba5ffb86d99c511217d704736803f3f.tar.gz
dotfiles-a86446df9ba5ffb86d99c511217d704736803f3f.tar.bz2
Initial import
Diffstat (limited to 'modules/profile/terminal')
-rw-r--r--modules/profile/terminal38
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/profile/terminal b/modules/profile/terminal
new file mode 100644
index 0000000..e496cbe
--- /dev/null
+++ b/modules/profile/terminal
@@ -0,0 +1,38 @@
+#!/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"
+
+# export PS1="\[\033[1;32m\]\332\304\[\033[0;32m\]\304(\[\033[0;32m\]\$(w | head -n 1) \[\033[0;32m\])\304\304( \[\033[0;36m\]\u\[\033[1;36m\]@\[\033[0;36m\]\h\[\033[0;32m\] )\304\304( \[\033[0;33m\]\w\[\033[0;32m\] )\n\[\033[1;32m\]\300\304\[\033[0;32m\]\304( \[\033[1;32m\]\\$\[\033[0;32m\] >\[\033[00m\] "
+
+# export PS1="\[\033[1;33m\]\332\304\[\033[0;33m\]\304(\[\033[0;32m\]\$(w | head -n 1) \[\033[0;33m\])\304\304( \[\033[0;36m\]\u\[\033[1;36m\]@\[\033[0;36m\]\h\[\033[0;33m\] )\304\304( \[\033[0;32m\]\w\[\033[0;33m\] )\n\[\033[1;33m\]\300\304\[\033[0;33m\]\304( \[\033[1;33m\]\\$\[\033[0;33m\] >\[\033[00m\] "
+
+# export PS1="\[\033[1;33m\]\332\304\[\033[0;33m\]\304(\[\033[0;33m\]\$(w | head -n 1) \[\033[0;33m\])\304\304( \[\033[0;36m\]\u\[\033[1;36m\]@\[\033[0;36m\]\h\[\033[0;33m\] )\304\304( \[\033[0;32m\]\w\[\033[0;33m\] )\n\[\033[1;33m\]\300\304\[\033[0;33m\]\304( \[\033[1;33m\]\\$\[\033[0;33m\] >\[\033[00m\] "
+
+#export PS1="\[\033[1;33m\]\332\304\[\033[0;33m\]\304(\[\033[0;33m\] $( date +%H:%M:%S ) \[\033[0;33m\])\304\304( \[\033[0;36m\]\u\[\033[1;36m\]@\[\033[0;36m\]\h\[\033[0;33m\] )\304\304( \[\033[0;32m\]\w\[\033[0;33m\] )\n\[\033[1;33m\]\300\304\[\033[0;33m\]\304( \[\033[1;33m\]\\$\[\033[0;33m\] >\[\033[00m\] "
+
+# 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