yay better proompt

This commit is contained in:
Solomon Laing 2025-06-02 16:52:39 +09:30
parent ffe5476c80
commit 0babfadb24
2 changed files with 13 additions and 1 deletions

View File

@ -77,8 +77,14 @@ set_prompt() {
PS1_BAT="$(bash-status-bat)"
PS1_GIT="$(bash-status-git)"
if [ "$PS1_GIT" == "" ]; then
PS1_GIT=""
else
PS1_GIT="$PS1_GIT "
fi
if [[ -n $(find . -user "$(id -u)" -print -prune -o -prune) ]]; then
dir="\[\033[00;36m\]\w"
dir="\[\033[00;36m\]$(pwd | sed -E -e "s|^$HOME|~|" -e 's|^([^/]*/[^/]*/).*(/[^/]*)|\1..\2|')"
else
dir="\[\033[00;31m\]\w"
fi

View File

@ -49,6 +49,12 @@ bind-key r source-file /home/solomon/.config/tmux/tmux.conf \; display-message "
bind-key b split-window -v
bind-key v split-window -h
# Navigate panes.
bind-key -r h select-pane -L
bind-key -r j select-pane -D
bind-key -r k select-pane -U
bind-key -r l select-pane -R
# -----------------------------------------------------------------------------
# Plugin Manager - https://github.com/tmux-plugins/tpm
# Step 1) git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm