add ranger prompt; see #171

pull/186/head
romkatv 5 years ago
parent 33e1dd7790
commit 49063ee757

@ -58,6 +58,7 @@ fi
kubecontext # current kubernetes context (https://kubernetes.io/) kubecontext # current kubernetes context (https://kubernetes.io/)
context # user@host context # user@host
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
# =========================[ Line #2 ]========================= # =========================[ Line #2 ]=========================
newline newline
# public_ip # public IP address # public_ip # public IP address
@ -420,6 +421,12 @@ fi
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'
#################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################
# Ranger shell color.
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=221
# Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
####################################[ context: user@host ]#################################### ####################################[ context: user@host ]####################################
# Default context color. # Default context color.
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180

@ -58,6 +58,7 @@ fi
kubecontext # current kubernetes context (https://kubernetes.io/) kubecontext # current kubernetes context (https://kubernetes.io/)
context # user@host context # user@host
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
# =========================[ Line #2 ]========================= # =========================[ Line #2 ]=========================
newline newline
# public_ip # public IP address # public_ip # public IP address
@ -403,6 +404,12 @@ fi
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'
#################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################
# Ranger shell color.
typeset -g POWERLEVEL9K_RANGER_FOREGROUND=221
# Custom icon.
# typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
####################################[ context: user@host ]#################################### ####################################[ context: user@host ]####################################
# Default context color. # Default context color.
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180

@ -108,6 +108,7 @@ function _p9k_init_icons() {
TIME_ICON '\uE12E' #  TIME_ICON '\uE12E' # 
JAVA_ICON '\U2615' # ☕︎ JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
) )
;; ;;
'awesome-fontconfig') 'awesome-fontconfig')
@ -205,6 +206,7 @@ function _p9k_init_icons() {
TIME_ICON '\uF017 ' #  TIME_ICON '\uF017 ' # 
JAVA_ICON '\U2615' # ☕︎ JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
) )
;; ;;
'awesome-mapped-fontconfig') 'awesome-mapped-fontconfig')
@ -306,6 +308,7 @@ function _p9k_init_icons() {
TIME_ICON '\uF017 ' #  TIME_ICON '\uF017 ' # 
JAVA_ICON '\U2615' # ☕︎ JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
) )
;; ;;
'nerdfont-complete'|'nerdfont-fontconfig') 'nerdfont-complete'|'nerdfont-fontconfig')
@ -404,6 +407,7 @@ function _p9k_init_icons() {
TIME_ICON '\uF017 ' #  TIME_ICON '\uF017 ' # 
JAVA_ICON '\U2615' # ☕︎ JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON '\ue73f ' #  LARAVEL_ICON '\ue73f ' # 
RANGER_ICON '\u2B50' # ⭐
) )
;; ;;
*) *)
@ -501,6 +505,7 @@ function _p9k_init_icons() {
TIME_ICON '' TIME_ICON ''
JAVA_ICON '\U2615' # ☕︎ JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON '' LARAVEL_ICON ''
RANGER_ICON '\u2B50' # ⭐
) )
;; ;;
esac esac

@ -3034,6 +3034,11 @@ function prompt_nordvpn() {
esac esac
} }
function prompt_ranger() {
[[ -n $RANGER_LEVEL ]] || return
_p9k_prompt_segment $0 $_p9k_color1 yellow RANGER_ICON 0 '' $RANGER_LEVEL
}
_p9k_preexec() { _p9k_preexec() {
if (( $+_p9k_real_zle_rprompt_indent )); then if (( $+_p9k_real_zle_rprompt_indent )); then
if [[ -n $_p9k_real_zle_rprompt_indent ]]; then if [[ -n $_p9k_real_zle_rprompt_indent ]]; then

Loading…
Cancel
Save