Add syncthing service and updates to fish for titan
This commit is contained in:
@ -1 +0,0 @@
|
||||
fisher copy-user-key-bindings
|
||||
@ -1,4 +1,3 @@
|
||||
thefuck --alias | source
|
||||
source ~/.asdf/asdf.fish
|
||||
set PATH ~/.fzf/bin $PATH
|
||||
fzf_key_bindings
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
# set -g theme_display_user ssh
|
||||
# set -g theme_display_hostname ssh
|
||||
# set -g theme_display_vi no
|
||||
# set -g theme_display_nvm yes
|
||||
# set -g theme_avoid_ambiguous_glyphs yes
|
||||
# set -g theme_powerline_fonts no
|
||||
# set -g theme_nerd_fonts yes
|
||||
@ -578,10 +579,7 @@ function __bobthefish_prompt_docker -S -d 'Display Docker machine name'
|
||||
echo -ns $DOCKER_MACHINE_NAME ' '
|
||||
end
|
||||
|
||||
function __bobthefish_prompt_k8s_context -S -d 'Show current Kubernetes context'
|
||||
[ "$theme_display_k8s_context" = 'yes' ]
|
||||
or return
|
||||
|
||||
function __bobthefish_k8s_context -S -d 'Get the current k8s context'
|
||||
set -l config_paths "$HOME/.kube/config"
|
||||
[ -n "$KUBECONFIG" ]
|
||||
and set config_paths (string split ':' "$KUBECONFIG") $config_paths
|
||||
@ -594,14 +592,36 @@ function __bobthefish_prompt_k8s_context -S -d 'Show current Kubernetes context'
|
||||
if [ "$key" = 'current-context:' ]
|
||||
set -l context (string trim -c '"\' ' -- $val)
|
||||
[ -z "$context" ]
|
||||
and return
|
||||
and return 1
|
||||
|
||||
__bobthefish_start_segment $color_k8s
|
||||
echo -ns $context ' '
|
||||
echo $context
|
||||
return
|
||||
end
|
||||
end <$file
|
||||
end
|
||||
|
||||
return 1
|
||||
end
|
||||
|
||||
function __bobthefish_k8s_namespace -S -d 'Get the current k8s namespace'
|
||||
kubectl config view --minify --output "jsonpath={..namespace}"
|
||||
end
|
||||
|
||||
function __bobthefish_prompt_k8s_context -S -d 'Show current Kubernetes context'
|
||||
[ "$theme_display_k8s_context" = 'yes' ]
|
||||
or return
|
||||
|
||||
set -l context (__bobthefish_k8s_context)
|
||||
or return
|
||||
|
||||
set -l namespace (__bobthefish_k8s_namespace)
|
||||
|
||||
set -l segment $k8s_glyph " " $context
|
||||
[ -n "$namespace" ]
|
||||
and set segment $segment ":" $namespace
|
||||
|
||||
__bobthefish_start_segment $color_k8s
|
||||
echo -ns $segment " "
|
||||
end
|
||||
|
||||
|
||||
@ -801,6 +821,20 @@ function __bobthefish_prompt_desk -S -d 'Display current desk environment'
|
||||
set_color normal
|
||||
end
|
||||
|
||||
function __bobthefish_prompt_nvm -S -d 'Display current node version through NVM'
|
||||
[ "$theme_display_nvm" = 'yes' -a -n "$NVM_DIR" ]
|
||||
or return
|
||||
|
||||
set -l node_version (nvm current 2> /dev/null)
|
||||
|
||||
[ -z $node_version -o "$node_version" = 'none' -o "$node_version" = 'system' ]
|
||||
and return
|
||||
|
||||
__bobthefish_start_segment $color_nvm
|
||||
echo -ns $node_glyph $node_version ' '
|
||||
set_color normal
|
||||
end
|
||||
|
||||
|
||||
# ==============================
|
||||
# VCS segments
|
||||
@ -1004,6 +1038,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
||||
__bobthefish_prompt_rubies
|
||||
__bobthefish_prompt_virtualfish
|
||||
__bobthefish_prompt_virtualgo
|
||||
__bobthefish_prompt_nvm
|
||||
|
||||
set -l real_pwd (__bobthefish_pwd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user