Open martylamoureux opened 8 years ago
Hey Marty, thanks for the issue. Thanks to @rnewton and https://github.com/jamesob/desk/pull/14, this is pretty easy -- just include ${DESK_NAME}
somewhere in your prompt.
For example (using oh-my-zsh
), I do
PROMPT=' [%w %T] %B%{$fg[blue]%}%3d%{$reset_color%} $(git_prompt_info) $(git_prompt_status)$(git_prompt_ahead)%{$reset_color%}${DESK_NAME}
$ '
Does that help?
Maybe we should update the README with some of this info.
Okay ! it works ! I'm using iTerm + zsh + oh-my-zsh + Agnoster, and I found a way to add a "segment" in the prompt when we are in a desk.
If anybody is interested in it, I can give the instructions to get it.
Nice @martylamoureux! Maybe we can spin up a wiki page or something.
This is great @martylamoureux! Please share the instructions for this.
If anybody need this, here is my Agnoster modified theme with Desk integration (and some more goodies)
I also played around with this today and made a simple zsh theme (based on robbyrussell
), you can see it here: https://github.com/mosic/dotfiles/blob/master/zsh/themes/mosic.zsh-theme
It looks like this:
Using ◲ in the prompt looks great, thanks for the idea.
@mosic beautiful, thanks.
For anyone using powerline9k this is the correct way to use it:
# DESK INTEGRATION
prompt_desk() {
if [ ! -z "${DESK_NAME// }" ]; then
"$1_prompt_segment" "$0" "$2" "red" "grey" "$POWERLEVEL9K_DESK_ICON $DESK_NAME" "#"
fi
}
POWERLEVEL9K_DESK_BACKGROUND="black"
POWERLEVEL9K_DESK_FOREGROUND="white"
POWERLEVEL9K_DESK_ICON='\uf1d8'
Hi ! Desk is great, but it would be even better if it's possible to show the current desk into the zsh (for instance) prompt, in order to know where we are.
I see in the demo gif in the readme that you have a "(venv)" prepending your prompt, is there anyway to have the something but with the name of the current desk ?