Improve the interactive jamesob/desk experience by showing the current desk in the prompt when one is active

This commit is contained in:
Danielle McLean 2018-08-16 15:06:45 +10:00
parent f4594b4563
commit e7224f763d
Signed by: 00dani
GPG key ID: 8EB789DDF3ABD240

View file

@ -1,4 +1,13 @@
#! zsh #! zsh
alias d=desk
alias d.='desk .'
# Conveniently, the current desk never changes within a single shell session,
# so we can safely just set this once during shell startup.
psvar[1]=$DESK_NAME
# Extend the prompt with desk name display.
PROMPT="%(V.%F{242}%v%f .)$PROMPT"
export DESK_DIR=$XDG_CONFIG_HOME/desk export DESK_DIR=$XDG_CONFIG_HOME/desk
if [[ -n $DESK_ENV ]]; then if [[ -n $DESK_ENV ]]; then
source $DESK_ENV source $DESK_ENV