Compare commits
No commits in common. "7a1c3fe32fe50f68121e58d2eec423a160dd3500" and "1bc2b49e3f64b4d36b939e3795ed18875f604b4c" have entirely different histories.
7a1c3fe32f
...
1bc2b49e3f
7 changed files with 62 additions and 2 deletions
27
dot-config/zsh/functions/prompt_pure_set_title
Normal file
27
dot-config/zsh/functions/prompt_pure_set_title
Normal file
|
@ -0,0 +1,27 @@
|
|||
#! zsh
|
||||
# copied from https://github.com/sindresorhus/pure/blob/43aafe0b4dc05174c57ee623c03c64400e832ece/pure.zsh#L56
|
||||
setopt localoptions noshwordsplit
|
||||
|
||||
# Emacs terminal does not support settings the title.
|
||||
(( ${+EMACS} || ${+INSIDE_EMACS} )) && return
|
||||
|
||||
case $TTY in
|
||||
# Don't set title over serial console.
|
||||
/dev/ttyS[0-9]*) return;;
|
||||
esac
|
||||
|
||||
# Show hostname if connected via SSH.
|
||||
local hostname=
|
||||
if [[ -n $prompt_pure_state[username] ]]; then
|
||||
# Expand in-place in case ignore-escape is used.
|
||||
hostname="${(%):-(%m) }"
|
||||
fi
|
||||
|
||||
local -a opts
|
||||
case $1 in
|
||||
expand-prompt) opts=(-P);;
|
||||
ignore-escape) opts=(-r);;
|
||||
esac
|
||||
|
||||
# Set title atomically in one print statement so that it works when XTRACE is enabled.
|
||||
print -n $opts $'\e]0;'${hostname}${2}$'\a'
|
3
dot-config/zsh/functions/starship_pure_title_precmd
Normal file
3
dot-config/zsh/functions/starship_pure_title_precmd
Normal file
|
@ -0,0 +1,3 @@
|
|||
#! zsh
|
||||
autoload prompt_pure_set_title
|
||||
prompt_pure_set_title 'expand-prompt' '%~'
|
3
dot-config/zsh/functions/starship_pure_title_preexec
Normal file
3
dot-config/zsh/functions/starship_pure_title_preexec
Normal file
|
@ -0,0 +1,3 @@
|
|||
#! zsh
|
||||
autoload prompt_pure_set_title
|
||||
prompt_pure_set_title 'ignore-escape' "$PWD:t: $2"
|
14
dot-config/zsh/interactive/desk
Normal file
14
dot-config/zsh/interactive/desk
Normal file
|
@ -0,0 +1,14 @@
|
|||
#! 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
|
||||
fi
|
14
dot-config/zsh/login/tiny-care-terminal
Normal file
14
dot-config/zsh/login/tiny-care-terminal
Normal file
|
@ -0,0 +1,14 @@
|
|||
#! zsh
|
||||
export TTC_WEATHER='Sydney, NSW'
|
||||
export -UT TTC_REPOS ttc_repos ,
|
||||
ttc_repos=(~/projects)
|
||||
|
||||
if [[ -r $XDG_DATA_HOME/twitter/api.zsh ]]; then
|
||||
source $XDG_DATA_HOME/twitter/api.zsh
|
||||
export TTC_CONSUMER_KEY=$twitter[consumer_key]
|
||||
export TTC_CONSUMER_SECRET=$twitter[consumer_secret]
|
||||
export TTC_ACCESS_TOKEN=$twitter[access_token]
|
||||
export TTC_ACCESS_TOKEN_SECRET=$twitter[access_secret]
|
||||
else
|
||||
export TTC_APIKEYS=false
|
||||
fi
|
|
@ -23,7 +23,6 @@ else
|
|||
fi
|
||||
|
||||
zinit wait lucid light-mode for \
|
||||
hlissner/zsh-autopair \
|
||||
mollifier/cd-gitroot \
|
||||
atinit"dot-zsh-compinit" \
|
||||
zdharma-continuum/fast-syntax-highlighting \
|
|
@ -20,7 +20,7 @@ dot-zsh-compinit() {
|
|||
return 0
|
||||
}
|
||||
|
||||
source $ZDOTDIR/plugins.zsh
|
||||
source $ZDOTDIR/zinit
|
||||
for f in $ZDOTDIR/interactive/^*.zwc(N); source $f
|
||||
|
||||
[[ -o login ]] && for f in $ZDOTDIR/interactive+login/^*.zwc(N); source $f
|
||||
|
|
Loading…
Reference in a new issue