summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-08-17 11:01:06 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-08-17 11:01:06 +0300
commit49063ee757c2339c2a0cde14e886896373cd6a54 (patch)
tree4c0d389e8d7557260bc2542bb92fc7509746aac9
parent33e1dd77908c0ae9a12b07b8e88f4ae16a9e53bd (diff)
add ranger prompt; see #171
-rw-r--r--config/p10k-classic.zsh7
-rw-r--r--config/p10k-lean.zsh7
-rwxr-xr-xinternal/icons.zsh5
-rwxr-xr-xinternal/p10k.zsh5
4 files changed, 24 insertions, 0 deletions
diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh
index 7d73e965..24b73abb 100644
--- a/config/p10k-classic.zsh
+++ b/config/p10k-classic.zsh
@@ -58,6 +58,7 @@ fi
kubecontext # current kubernetes context (https://kubernetes.io/)
context # user@host
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
+ ranger # ranger shell (https://github.com/ranger/ranger)
# =========================[ Line #2 ]=========================
newline
# public_ip # public IP address
@@ -420,6 +421,12 @@ fi
# Custom icon.
# 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 ]####################################
# Default context color.
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180
diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh
index 2a9f8f2a..420ef42c 100644
--- a/config/p10k-lean.zsh
+++ b/config/p10k-lean.zsh
@@ -58,6 +58,7 @@ fi
kubecontext # current kubernetes context (https://kubernetes.io/)
context # user@host
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
+ ranger # ranger shell (https://github.com/ranger/ranger)
# =========================[ Line #2 ]=========================
newline
# public_ip # public IP address
@@ -403,6 +404,12 @@ fi
# Custom icon.
# 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 ]####################################
# Default context color.
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180
diff --git a/internal/icons.zsh b/internal/icons.zsh
index 2b47339d..3693bfb3 100755
--- a/internal/icons.zsh
+++ b/internal/icons.zsh
@@ -108,6 +108,7 @@ function _p9k_init_icons() {
TIME_ICON '\uE12E' # 
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
+ RANGER_ICON '\u2B50' # ⭐
)
;;
'awesome-fontconfig')
@@ -205,6 +206,7 @@ function _p9k_init_icons() {
TIME_ICON '\uF017 ' # 
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
+ RANGER_ICON '\u2B50' # ⭐
)
;;
'awesome-mapped-fontconfig')
@@ -306,6 +308,7 @@ function _p9k_init_icons() {
TIME_ICON '\uF017 ' # 
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
+ RANGER_ICON '\u2B50' # ⭐
)
;;
'nerdfont-complete'|'nerdfont-fontconfig')
@@ -404,6 +407,7 @@ function _p9k_init_icons() {
TIME_ICON '\uF017 ' # 
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON '\ue73f ' # 
+ RANGER_ICON '\u2B50' # ⭐
)
;;
*)
@@ -501,6 +505,7 @@ function _p9k_init_icons() {
TIME_ICON ''
JAVA_ICON '\U2615' # ☕︎
LARAVEL_ICON ''
+ RANGER_ICON '\u2B50' # ⭐
)
;;
esac
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 16f2452c..3b7897ca 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3034,6 +3034,11 @@ function prompt_nordvpn() {
esac
}
+function prompt_ranger() {
+ [[ -n $RANGER_LEVEL ]] || return
+ _p9k_prompt_segment $0 $_p9k_color1 yellow RANGER_ICON 0 '' $RANGER_LEVEL
+}
+
_p9k_preexec() {
if (( $+_p9k_real_zle_rprompt_indent )); then
if [[ -n $_p9k_real_zle_rprompt_indent ]]; then