aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-09-14 00:55:21 +1200
committerTom Ryder <tom@sanctum.geek.nz>2012-09-14 00:55:21 +1200
commit2a42dadb73b0fcc6776ad02d8d514e65b11f28a6 (patch)
tree172685ff65a76bf72ca21bf4e1a883b806c95f24 /bash
parentChanged tags a bit (diff)
downloaddotfiles-2a42dadb73b0fcc6776ad02d8d514e65b11f28a6.tar.gz
dotfiles-2a42dadb73b0fcc6776ad02d8d514e65b11f28a6.zip
Generate alerts for window manager
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc7
1 files changed, 6 insertions, 1 deletions
diff --git a/bash/bashrc b/bash/bashrc
index f504139f..5a1f098c 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -151,6 +151,11 @@ alias gdb='gdb -q'
# I always want a unified diff.
alias diff='diff -u'
+# Function to send an alert character.
+function alert {
+ echo -ne '\a'
+}
+
# Attach to existing tmux session rather than create a new one if possible.
function tmux {
if [[ -n "$*" ]]; then
@@ -176,7 +181,7 @@ function prompt {
# Turn complex coloured prompt on.
on)
PROMPT_COMMAND='history -a'
- PS1='[\u@\h:\w]$(prompt return)$(prompt vcs)$(prompt jobs)\$'
+ PS1='[\u@\h:\w]$(alert)$(prompt return)$(prompt vcs)$(prompt jobs)\$'
PS1="${color_prompt}${PS1}${color_norm} "
case "$TERM" in
screen*) PS1='\[\ek\h\e\\\]'${PS1};;