aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUtkarsh Verma <utkarshverma@protonmail.com>2022-12-16 17:25:25 +0300
committerUtkarsh Verma <utkarshverma@protonmail.com>2022-12-16 17:25:25 +0300
commit07b5a607d46672e88167608414cace36e134f971 (patch)
treead9c9d309a375686e49844c46aa20388b2dfc420
parent7f2950f9cc6d7ae805b4e9f365cc3340afc955a6 (diff)
Add lf segment
-rw-r--r--README.md1
-rw-r--r--config/p10k-classic.zsh7
-rw-r--r--config/p10k-lean-8colors.zsh7
-rw-r--r--config/p10k-lean.zsh6
-rw-r--r--config/p10k-rainbow.zsh8
-rw-r--r--internal/icons.zsh6
-rw-r--r--internal/p10k.zsh12
7 files changed, 47 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4b92bf7f..c98df091 100644
--- a/README.md
+++ b/README.md
@@ -338,6 +338,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `midnight_commander` | [midnight commander](https://midnight-commander.org/) shell |
| `nix_shell` | [nix shell](https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) indicator |
| `nnn` | [nnn](https://github.com/jarun/nnn) shell |
+| `lf` | [lf](https://github.com/gokcehan/lf) shell |
| `nodeenv` | node.js environment from [nodeenv](https://github.com/ekalinin/nodeenv) |
| `nodenv` | node.js environment from [nodenv](https://github.com/nodenv/nodenv) |
| `node_version` | [node.js](https://nodejs.org/) version |
diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh
index 24c4022b..5a040cd0 100644
--- a/config/p10k-classic.zsh
+++ b/config/p10k-classic.zsh
@@ -82,6 +82,7 @@
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
nnn # nnn shell (https://github.com/jarun/nnn)
+ lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
@@ -723,6 +724,12 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
+ # lf shell color.
+ typeset -g POWERLEVEL9K_LF_FOREGROUND=72
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
# xplr shell color.
typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72
diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh
index 1d2962a0..8852c094 100644
--- a/config/p10k-lean-8colors.zsh
+++ b/config/p10k-lean-8colors.zsh
@@ -82,6 +82,7 @@
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
nnn # nnn shell (https://github.com/jarun/nnn)
+ lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
@@ -721,6 +722,12 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
+ # lf shell color.
+ typeset -g POWERLEVEL9K_LF_FOREGROUND=3
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
# xplr shell color.
typeset -g POWERLEVEL9K_XPLR_FOREGROUND=3
diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh
index 98bb8145..8519e03c 100644
--- a/config/p10k-lean.zsh
+++ b/config/p10k-lean.zsh
@@ -82,6 +82,7 @@
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
nnn # nnn shell (https://github.com/jarun/nnn)
+ lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
@@ -717,6 +718,11 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # lf shell color.
+ typeset -g POWERLEVEL9K_LF_FOREGROUND=72
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
# xplr shell color.
typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72
diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh
index c12c286c..f314498a 100644
--- a/config/p10k-rainbow.zsh
+++ b/config/p10k-rainbow.zsh
@@ -82,6 +82,7 @@
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
nnn # nnn shell (https://github.com/jarun/nnn)
+ lf # lf shell (https://github.com/gokcehan/lf)
xplr # xplr shell (https://github.com/sayanarijit/xplr)
vim_shell # vim shell indicator (:sh)
midnight_commander # midnight commander shell (https://midnight-commander.org/)
@@ -743,6 +744,13 @@
# Custom icon.
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
+ # lf shell color.
+ typeset -g POWERLEVEL9K_LF_FOREGROUND=0
+ typeset -g POWERLEVEL9K_LF_BACKGROUND=6
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
# xplr shell color.
typeset -g POWERLEVEL9K_XPLR_FOREGROUND=0
diff --git a/internal/icons.zsh b/internal/icons.zsh
index d38cf7bd..95620b7d 100644
--- a/internal/icons.zsh
+++ b/internal/icons.zsh
@@ -134,6 +134,7 @@ function _p9k_init_icons() {
LUA_ICON 'lua'
PERL_ICON 'perl'
NNN_ICON 'nnn'
+ LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON 'tw'
TASKWARRIOR_ICON 'task'
@@ -267,6 +268,7 @@ function _p9k_init_icons() {
LUA_ICON 'lua'
PERL_ICON 'perl'
NNN_ICON 'nnn'
+ LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON 'tw'
TASKWARRIOR_ICON 'task'
@@ -403,6 +405,7 @@ function _p9k_init_icons() {
LUA_ICON 'lua'
PERL_ICON 'perl'
NNN_ICON 'nnn'
+ LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON 'tw'
TASKWARRIOR_ICON 'task'
@@ -537,6 +540,7 @@ function _p9k_init_icons() {
LUA_ICON '\uE620' # 
PERL_ICON '\uE769' # 
NNN_ICON 'nnn'
+ LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON '\uF49B' # 
TASKWARRIOR_ICON '\uF4A0 ' # 
@@ -668,6 +672,7 @@ function _p9k_init_icons() {
LUA_ICON 'lua'
PERL_ICON 'perl'
NNN_ICON 'nnn'
+ LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON 'tw'
TASKWARRIOR_ICON 'task'
@@ -801,6 +806,7 @@ function _p9k_init_icons() {
LUA_ICON 'lua'
PERL_ICON 'perl'
NNN_ICON 'nnn'
+ LF_ICON 'lf'
XPLR_ICON 'xplr'
TIMEWARRIOR_ICON 'tw'
TASKWARRIOR_ICON 'task'
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index b90b747e..3f6da4fd 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -4921,6 +4921,18 @@ function instant_prompt_nnn() {
_p9k_prompt_segment prompt_nnn 6 $_p9k_color1 NNN_ICON 1 '${NNNLVL:#0}' '$NNNLVL'
}
+function prompt_lf() {
+ _p9k_prompt_segment $0 6 $_p9k_color1 LF_ICON 0 '' $LF_LEVEL
+}
+
+_p9k_prompt_lf_init() {
+ typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${LF_LEVEL:#0}'
+}
+
+function instant_prompt_lf() {
+ _p9k_prompt_segment prompt_lf 6 $_p9k_color1 LF_ICON 1 '${LF_LEVEL:#0}' '$LF_LEVEL'
+}
+
function prompt_xplr() {
local -i len=$#_p9k__prompt _p9k__has_upglob
_p9k_prompt_segment $0 6 $_p9k_color1 XPLR_ICON 0 '' ''