mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-12 19:18:28 +02:00
Added dropbox segment
This commit is contained in:
parent
e9e60324cd
commit
81cbd65142
@ -140,6 +140,7 @@ The segments that are currently available are:
|
|||||||
* `aws_eb_env` - The current Elastic Beanstalk Environment.
|
* `aws_eb_env` - The current Elastic Beanstalk Environment.
|
||||||
* `docker_machine` - The current Docker Machine.
|
* `docker_machine` - The current Docker Machine.
|
||||||
* `kubecontext` - The current context of your `kubectl` configuration.
|
* `kubecontext` - The current context of your `kubectl` configuration.
|
||||||
|
* `dropbox` - Indicates Dropbox directory and syncing status using `dropbox-cli`
|
||||||
|
|
||||||
**Other:**
|
**Other:**
|
||||||
* [`custom_command`](#custom_command) - Create a custom segment to display the
|
* [`custom_command`](#custom_command) - Create a custom segment to display the
|
||||||
|
@ -87,6 +87,7 @@ case $POWERLEVEL9K_MODE in
|
|||||||
SSH_ICON '(ssh)'
|
SSH_ICON '(ssh)'
|
||||||
VPN_ICON '(vpn)'
|
VPN_ICON '(vpn)'
|
||||||
KUBERNETES_ICON $'\U2388' # ⎈
|
KUBERNETES_ICON $'\U2388' # ⎈
|
||||||
|
DROPBOX_ICON $'\UF16B' #
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
'awesome-fontconfig')
|
'awesome-fontconfig')
|
||||||
@ -158,6 +159,7 @@ case $POWERLEVEL9K_MODE in
|
|||||||
SSH_ICON '(ssh)'
|
SSH_ICON '(ssh)'
|
||||||
VPN_ICON $'\uF023'
|
VPN_ICON $'\uF023'
|
||||||
KUBERNETES_ICON $'\U2388' # ⎈
|
KUBERNETES_ICON $'\U2388' # ⎈
|
||||||
|
DROPBOX_ICON $'\UF16B' #
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
'awesome-mapped-fontconfig')
|
'awesome-mapped-fontconfig')
|
||||||
@ -303,6 +305,7 @@ case $POWERLEVEL9K_MODE in
|
|||||||
SSH_ICON $'\uF489' #
|
SSH_ICON $'\uF489' #
|
||||||
VPN_ICON '(vpn)'
|
VPN_ICON '(vpn)'
|
||||||
KUBERNETES_ICON $'\U2388' # ⎈
|
KUBERNETES_ICON $'\U2388' # ⎈
|
||||||
|
DROPBOX_ICON $'\UF16B' #
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -374,6 +377,7 @@ case $POWERLEVEL9K_MODE in
|
|||||||
SSH_ICON '(ssh)'
|
SSH_ICON '(ssh)'
|
||||||
VPN_ICON '(vpn)'
|
VPN_ICON '(vpn)'
|
||||||
KUBERNETES_ICON $'\U2388' # ⎈
|
KUBERNETES_ICON $'\U2388' # ⎈
|
||||||
|
DROPBOX_ICON $'\UF16B' #
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -1423,6 +1423,23 @@ prompt_kubecontext() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Dropbox status
|
||||||
|
prompt_dropbox() {
|
||||||
|
# The first column is just the directory, so cut it
|
||||||
|
local dropbox_status="$(dropbox-cli filestatus . | cut -d\ -f2-)"
|
||||||
|
|
||||||
|
# Only show if the folder is tracked
|
||||||
|
if [[ "$dropbox_status" != 'unwatched' ]]; then
|
||||||
|
# If "up to date", only show the icon
|
||||||
|
if [[ "$dropbox_status" =~ 'up to date' ]]; then
|
||||||
|
dropbox_status=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
"$1_prompt_segment" "$0" "$2" "white" "blue" "$dropbox_status" "DROPBOX_ICON"
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
# Prompt processing and drawing
|
# Prompt processing and drawing
|
||||||
|
Loading…
Reference in New Issue
Block a user