diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-02-17 13:21:02 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2020-02-17 13:21:02 +0100 |
commit | 8979b768965109f39730ed2a431fbf2e4d369502 (patch) | |
tree | 593abd9df9b6e169c5bcc2964ec9c81c87d48a0e /.config | |
parent | 7d3e27b4ffa9973bed54fde7a46880231713e190 (diff) |
Update bash PS1
This should bring the prompt for interactive Bash usage in line with the
prompt for zsh. The colors are slightly different, but the information
is the same.
Diffstat (limited to '.config')
-rw-r--r-- | .config/shell/env | 5 | ||||
-rw-r--r-- | .config/shell/init | 6 | ||||
-rw-r--r-- | .config/shell/sources | 9 |
3 files changed, 12 insertions, 8 deletions
diff --git a/.config/shell/env b/.config/shell/env index 05505a8..b04d6b9 100644 --- a/.config/shell/env +++ b/.config/shell/env @@ -65,16 +65,13 @@ export QT_STYLE_OVERRIDE=GTK+ # Set tabsize in the TTY #setterm -regtabs 4 -tabs -4 > /dev/null +tabs -8 > /dev/null # note to self: remove when rtorrent becomes sane or gets replaced # double note to self: enable whenever you consider using rtorrent again #stty start undef #stty stop undef -# enable interactive comments in zsh -set -k - ### setting up the tty # alter the colors echo -en "\e]P0000000" #black diff --git a/.config/shell/init b/.config/shell/init index 379d889..717e0c9 100644 --- a/.config/shell/init +++ b/.config/shell/init @@ -1,8 +1,8 @@ #! /usr/bin/env sh +export SHORTSHELL=$(ps -p $$ | tail -n 1 | awk '{ print $NF }') + if [ -z "${SHELLSTORE}" ] then - SHELLSTORE=$(mktemp -d -t "shellstore_XXXXX") - - export SHELLSTORE + export SHELLSTORE=$(mktemp -d -t "shellstore_XXXXX") fi diff --git a/.config/shell/sources b/.config/shell/sources index 5573d62..aa3e273 100644 --- a/.config/shell/sources +++ b/.config/shell/sources @@ -33,6 +33,13 @@ PATH="${PATH}:/usr/local/sbin" PATH="${PATH}:/usr/games/bin" PATH="${PATH}:/opt/bin" +# Load color definitions if they exist +if [ -f "$HOME/.config/shell/colors/$SHORTSHELL" ] +then + [ "$DEBUG_DOTFILES" ] && printf " Loading color definitions\n" + . "$HOME/.config/shell/colors/$SHORTSHELL" +fi + # Nix package manager if [ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ] then @@ -67,7 +74,7 @@ then if [ -d "$GEMDIR" ] then - [ "$DEBUG_DOTFILES" ] && echo "Extending PATH with $GEMDIR" + [ "$DEBUG_DOTFILES" ] && echo " Extending PATH with $GEMDIR" PATH="$GEMDIR:$PATH" fi fi |