From e7224f763d8d14e2383549dc40324481fc2d4507 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Thu, 16 Aug 2018 15:06:45 +1000 Subject: [PATCH] Improve the interactive jamesob/desk experience by showing the current desk in the prompt when one is active --- config/zsh/interactive/desk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/zsh/interactive/desk b/config/zsh/interactive/desk index 12136e4..348f294 100644 --- a/config/zsh/interactive/desk +++ b/config/zsh/interactive/desk @@ -1,4 +1,13 @@ #! 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 if [[ -n $DESK_ENV ]]; then source $DESK_ENV