From 0f58a4950cd3e938662b8aa2131caf1acea08915 Mon Sep 17 00:00:00 2001 From: Paul Frybarger Date: Sun, 13 Aug 2017 01:25:29 +0200 Subject: similar to PR #472, fixing for awesome font mappings --- functions/icons.zsh | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) (limited to 'functions/icons.zsh') diff --git a/functions/icons.zsh b/functions/icons.zsh index ab4d2bac..10db97ac 100644 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -152,6 +152,77 @@ case $POWERLEVEL9K_MODE in SSH_ICON '(ssh)' ) ;; + 'awesome-mapped-fontconfig') + # mapped fontconfig with awesome-font required! See + # https://github.com/gabrielelana/awesome-terminal-fonts + # don't forget to source the font maps in your startup script + # Set the right locale to protect special characters + local LC_ALL="" LC_CTYPE="en_US.UTF-8" + + if [ -z "$AWESOME_GLYPHS_LOADED" ]; then + echo "powerlevel9k warning: awesome font mappings have not been loaded, source during shell startup"; + fi + + icons=( + LEFT_SEGMENT_SEPARATOR $'\uE0B0' #  + RIGHT_SEGMENT_SEPARATOR $'\uE0B2' #  + LEFT_SEGMENT_END_SEPARATOR ' ' # Whitespace + LEFT_SUBSEGMENT_SEPARATOR $'\uE0B1' #  + RIGHT_SUBSEGMENT_SEPARATOR $'\uE0B3' #  + CARRIAGE_RETURN_ICON $'\u21B5' # ↵ + ROOT_ICON '\u'$CODEPOINT_OF_OCTICONS_ZAP #  + RUBY_ICON '\u'$CODEPOINT_OF_OCTICONS_RUBY' ' #  + AWS_ICON '\u'$CODEPOINT_OF_AWESOME_SERVER #  + AWS_EB_ICON $'\U1F331 ' # 🌱 + BACKGROUND_JOBS_ICON '\u'$CODEPOINT_OF_AWESOME_COG' ' #  + TEST_ICON '\u'$CODEPOINT_OF_AWESOME_BUG #  + TODO_ICON '\u'$CODEPOINT_OF_AWESOME_CHECK_SQUARE_O #  + BATTERY_ICON '\U'$CODEPOINT_OF_AWESOME_BATTERY_FULL #  + DISK_ICON '\u'$CODEPOINT_OF_AWESOME_HDD_O' ' #  + OK_ICON '\u'$CODEPOINT_OF_AWESOME_CHECK #  + FAIL_ICON '\u'$CODEPOINT_OF_AWESOME_TIMES #  + SYMFONY_ICON 'SF' + NODE_ICON $'\u2B22' # ⬢ + MULTILINE_FIRST_PROMPT_PREFIX $'\u256D'$'\U2500' # ╭─ + MULTILINE_SECOND_PROMPT_PREFIX $'\u2570'$'\U2500 ' # ╰─ + APPLE_ICON '\u'$CODEPOINT_OF_AWESOME_APPLE #  + FREEBSD_ICON $'\U1F608 ' # 😈 + LINUX_ICON '\u'$CODEPOINT_OF_AWESOME_LINUX #  + SUNOS_ICON '\u'$CODEPOINT_OF_AWESOME_SUN_O' ' #  + HOME_ICON '\u'$CODEPOINT_OF_AWESOME_HOME #  + HOME_SUB_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_OPEN #  + FOLDER_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_O #  + NETWORK_ICON '\u'$CODEPOINT_OF_AWESOME_RSS #  + LOAD_ICON '\u'$CODEPOINT_OF_AWESOME_BAR_CHART' ' #  + SWAP_ICON '\u'$CODEPOINT_OF_AWESOME_DASHBOARD #  + RAM_ICON '\u'$CODEPOINT_OF_AWESOME_DASHBOARD #  + SERVER_ICON '\u'$CODEPOINT_OF_AWESOME_SERVER #  + VCS_UNTRACKED_ICON '\u'$CODEPOINT_OF_AWESOME_QUESTION_CIRCLE #  + VCS_UNSTAGED_ICON '\u'$CODEPOINT_OF_AWESOME_EXCLAMATION_CIRCLE #  + VCS_STAGED_ICON '\u'$CODEPOINT_OF_AWESOME_PLUS_CIRCLE #  + VCS_STASH_ICON '\u'$CODEPOINT_OF_AWESOME_INBOX' ' #  + VCS_INCOMING_CHANGES_ICON '\u'$CODEPOINT_OF_AWESOME_ARROW_CIRCLE_DOWN' ' #  + VCS_OUTGOING_CHANGES_ICON '\u'$CODEPOINT_OF_AWESOME_ARROW_CIRCLE_UP' ' #  + VCS_TAG_ICON '\u'$CODEPOINT_OF_AWESOME_TAG' ' #  + VCS_BOOKMARK_ICON '\u'$CODEPOINT_OF_OCTICONS_BOOKMARK #  + VCS_COMMIT_ICON '\u'$CODEPOINT_OF_OCTICONS_GIT_COMMIT' ' #  + VCS_BRANCH_ICON '\u'$CODEPOINT_OF_OCTICONS_GIT_BRANCH' ' #  + VCS_REMOTE_BRANCH_ICON '\u'$CODEPOINT_OF_OCTICONS_REPO_PUSH #  + VCS_GIT_ICON '\u'$CODEPOINT_OF_AWESOME_GIT' ' #  + VCS_GIT_GITHUB_ICON '\u'$CODEPOINT_OF_AWESOME_GITHUB_ALT' ' #  + VCS_GIT_BITBUCKET_ICON '\u'$CODEPOINT_OF_AWESOME_BITBUCKET' ' #  + VCS_GIT_GITLAB_ICON '\u'$CODEPOINT_OF_AWESOME_GITLAB' ' #  + VCS_HG_ICON '\u'$CODEPOINT_OF_AWESOME_FLASK' ' #  + VCS_SVN_ICON '(svn) ' + RUST_ICON $'\uE6A8' #  + PYTHON_ICON $'\U1F40D' # 🐍 + SWIFT_ICON $'\uE655' #  + PUBLIC_IP_ICON '\u'$CODEPOINT_OF_AWESOME_GLOBE #  + LOCK_ICON '\u'$CODEPOINT_OF_AWESOME_LOCK #  + EXECUTION_TIME_ICON '\u'$CODEPOINT_OF_AWESOME_HOURGLASS_END #  + SSH_ICON '(ssh)' + ) + ;; 'nerdfont-complete'|'nerdfont-fontconfig') # nerd-font patched (complete) font required! See # https://github.com/ryanoasis/nerd-fonts -- cgit v1.2.3 From 50f0a94642222e62fc30f7f3f2e487ad962210c7 Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Sun, 27 Aug 2017 12:41:25 -0400 Subject: Slight tweaks to the awesome-mapped-fontconfig error message. --- functions/icons.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'functions/icons.zsh') diff --git a/functions/icons.zsh b/functions/icons.zsh index 57971b45..a20cef2c 100644 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -168,7 +168,10 @@ case $POWERLEVEL9K_MODE in local LC_ALL="" LC_CTYPE="en_US.UTF-8" if [ -z "$AWESOME_GLYPHS_LOADED" ]; then - echo "powerlevel9k warning: awesome font mappings have not been loaded, source during shell startup"; + echo "Powerlevel9k warning: Awesome-Font mappings have not been loaded. + Source a font mapping in your shell config, per the Awesome-Font docs + (https://github.com/gabrielelana/awesome-terminal-fonts), + Or use a different Powerlevel9k font configuration."; fi icons=( -- cgit v1.2.3 From 81cbd65142609da34f463046abec8ad456440056 Mon Sep 17 00:00:00 2001 From: Timothy Earley Date: Sun, 1 Oct 2017 17:53:07 +0200 Subject: Added dropbox segment --- README.md | 1 + functions/icons.zsh | 4 ++++ powerlevel9k.zsh-theme | 17 +++++++++++++++++ 3 files changed, 22 insertions(+) (limited to 'functions/icons.zsh') diff --git a/README.md b/README.md index 4b0c2791..c4ff1c1f 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,7 @@ The segments that are currently available are: * `aws_eb_env` - The current Elastic Beanstalk Environment. * `docker_machine` - The current Docker Machine. * `kubecontext` - The current context of your `kubectl` configuration. +* `dropbox` - Indicates Dropbox directory and syncing status using `dropbox-cli` **Other:** * [`custom_command`](#custom_command) - Create a custom segment to display the diff --git a/functions/icons.zsh b/functions/icons.zsh index a20cef2c..3fc6d3b0 100644 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -87,6 +87,7 @@ case $POWERLEVEL9K_MODE in SSH_ICON '(ssh)' VPN_ICON '(vpn)' KUBERNETES_ICON $'\U2388' # ⎈ + DROPBOX_ICON $'\UF16B' #  ) ;; 'awesome-fontconfig') @@ -158,6 +159,7 @@ case $POWERLEVEL9K_MODE in SSH_ICON '(ssh)' VPN_ICON $'\uF023' KUBERNETES_ICON $'\U2388' # ⎈ + DROPBOX_ICON $'\UF16B' #  ) ;; 'awesome-mapped-fontconfig') @@ -303,6 +305,7 @@ case $POWERLEVEL9K_MODE in SSH_ICON $'\uF489' #  VPN_ICON '(vpn)' KUBERNETES_ICON $'\U2388' # ⎈ + DROPBOX_ICON $'\UF16B' #  ) ;; *) @@ -374,6 +377,7 @@ case $POWERLEVEL9K_MODE in SSH_ICON '(ssh)' VPN_ICON '(vpn)' KUBERNETES_ICON $'\U2388' # ⎈ + DROPBOX_ICON $'\UF16B' #  ) ;; esac diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 9a146fa8..792771ac 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1423,6 +1423,23 @@ prompt_kubecontext() { 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 -- cgit v1.2.3 From b87c3b85ace58b4a247046a51c37a5b043fcefb5 Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Fri, 6 Oct 2017 20:41:51 -0400 Subject: Updating Dropbox icon for non-awesome fonts --- functions/icons.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'functions/icons.zsh') diff --git a/functions/icons.zsh b/functions/icons.zsh index 3fc6d3b0..76913a81 100644 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -234,6 +234,9 @@ case $POWERLEVEL9K_MODE in LOCK_ICON '\u'$CODEPOINT_OF_AWESOME_LOCK #  EXECUTION_TIME_ICON '\u'$CODEPOINT_OF_AWESOME_HOURGLASS_END #  SSH_ICON '(ssh)' + VPN_ICON '\u'$CODEPOINT_OF_AWESOME_LOCK + KUBERNETES_ICON $'\U2388' # ⎈ + DROPBOX_ICON '\u'$CODEPOINT_OF_AWESOME_DROPBOX #  ) ;; 'nerdfont-complete'|'nerdfont-fontconfig') @@ -377,7 +380,7 @@ case $POWERLEVEL9K_MODE in SSH_ICON '(ssh)' VPN_ICON '(vpn)' KUBERNETES_ICON $'\U2388' # ⎈ - DROPBOX_ICON $'\UF16B' #  + DROPBOX_ICON 'Dropbox' ) ;; esac -- cgit v1.2.3 From 2680eec848cc351001545dc25c67afdff58bc85e Mon Sep 17 00:00:00 2001 From: Christo Kotze Date: Fri, 5 Jan 2018 13:20:48 +0400 Subject: Updates to `functions/icons.zsh` Added date and time icons --- functions/icons.zsh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'functions/icons.zsh') diff --git a/functions/icons.zsh b/functions/icons.zsh index 6ec07379..e642da00 100644 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -88,6 +88,8 @@ case $POWERLEVEL9K_MODE in VPN_ICON '(vpn)' KUBERNETES_ICON $'\U2388' # ⎈ DROPBOX_ICON $'\UF16B' #  + DATE_ICON $'\uE184' #  + TIME_ICON $'\uE12E' #  ) ;; 'awesome-fontconfig') @@ -160,6 +162,8 @@ case $POWERLEVEL9K_MODE in VPN_ICON $'\uF023' KUBERNETES_ICON $'\U2388' # ⎈ DROPBOX_ICON $'\UF16B' #  + DATE_ICON $'\uF073 ' #  + TIME_ICON $'\uF017 ' #  ) ;; 'awesome-mapped-fontconfig') @@ -237,6 +241,8 @@ case $POWERLEVEL9K_MODE in VPN_ICON '\u'$CODEPOINT_OF_AWESOME_LOCK KUBERNETES_ICON $'\U2388' # ⎈ DROPBOX_ICON '\u'$CODEPOINT_OF_AWESOME_DROPBOX #  + DATE_ICON $'\uF073 ' #  + TIME_ICON $'\uF017 ' #  ) ;; 'nerdfont-complete'|'nerdfont-fontconfig') @@ -309,6 +315,8 @@ case $POWERLEVEL9K_MODE in VPN_ICON '(vpn)' KUBERNETES_ICON $'\U2388' # ⎈ DROPBOX_ICON $'\UF16B' #  + DATE_ICON $'\uF073 ' #  + TIME_ICON $'\uF017 ' #  ) ;; *) @@ -381,6 +389,8 @@ case $POWERLEVEL9K_MODE in VPN_ICON '(vpn)' KUBERNETES_ICON $'\U2388' # ⎈ DROPBOX_ICON 'Dropbox' + DATE_ICON '' + TIME_ICON '' ) ;; esac -- cgit v1.2.3 From cc4daa7698784ed6e135fe7661d13e5676f829bb Mon Sep 17 00:00:00 2001 From: Christian Höltje Date: Thu, 15 Feb 2018 10:21:30 -0500 Subject: Fix GIT and GITHUB nerdfont icon. VCS_GIT_ICON and VCS_GIT_GITHUB_ICON were wrong. --- functions/icons.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'functions/icons.zsh') diff --git a/functions/icons.zsh b/functions/icons.zsh index e642da00..ae2c5383 100644 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -248,6 +248,7 @@ case $POWERLEVEL9K_MODE in 'nerdfont-complete'|'nerdfont-fontconfig') # nerd-font patched (complete) font required! See # https://github.com/ryanoasis/nerd-fonts + # http://nerdfonts.com/#cheat-sheet # Set the right locale to protect special characters local LC_ALL="" LC_CTYPE="en_US.UTF-8" icons=( @@ -298,8 +299,8 @@ case $POWERLEVEL9K_MODE in VCS_COMMIT_ICON $'\uE729 ' #  VCS_BRANCH_ICON $'\uF126 ' #  VCS_REMOTE_BRANCH_ICON $'\uE728 ' #  - VCS_GIT_ICON $'\uF113 ' #  - VCS_GIT_GITHUB_ICON $'\uE709 ' #  + VCS_GIT_ICON $'\uF1D3 ' #  + VCS_GIT_GITHUB_ICON $'\uF113 ' #  VCS_GIT_BITBUCKET_ICON $'\uE703 ' #  VCS_GIT_GITLAB_ICON $'\uF296 ' #  VCS_HG_ICON $'\uF0C3 ' #  -- cgit v1.2.3