aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-06-07 01:11:15 +0300
committerDominik Ritter <dritter03@googlemail.com>2018-06-07 01:11:15 +0300
commit4c2f58bdbdaee400b076f2dd56aa5fea2bf9e309 (patch)
tree58563969b91e31abe24f44a1403c2ced50e0419f
parent154e9230339e85009407b01e4aff076a3d76efa9 (diff)
parentb260adbc1bc68d9729d6eebcfd344f83655bfda9 (diff)
Merge remote-tracking branch 'VanRoy/master' into staging_065
Conflicts were: - functions/icons.zsh: The Java Segment was added on master, but on next were added various Segments with icons in the meantime. - powerlevel9k.zsh-theme: Java Segment was added on master, Dropbox Segment was added on next.
-rw-r--r--README.md2
-rwxr-xr-xfunctions/icons.zsh5
-rwxr-xr-xpowerlevel9k.zsh-theme9
3 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9120230b..bdb0332e 100644
--- a/README.md
+++ b/README.md
@@ -135,6 +135,8 @@ The segments that are currently available are:
* `rust_version` - Display the current rust version and [logo](https://www.rust-lang.org/logos/rust-logo-blk.svg).
* **Swift Segments:**
* `swift_version` - Show the version number of the installed Swift.
+* **Java Segments:**
+ * `java_version` - Show the current Java version.
**Cloud Segments:**
* **AWS Segments:**
diff --git a/functions/icons.zsh b/functions/icons.zsh
index f758d55c..cf724b6a 100755
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -109,6 +109,7 @@ case $POWERLEVEL9K_MODE in
DROPBOX_ICON $'\UF16B' # 
DATE_ICON $'\uE184' # 
TIME_ICON $'\uE12E' # 
+ JAVA_ICON $'\U2615' # ☕︎
)
;;
'awesome-fontconfig')
@@ -202,6 +203,7 @@ case $POWERLEVEL9K_MODE in
DROPBOX_ICON $'\UF16B' # 
DATE_ICON $'\uF073 ' # 
TIME_ICON $'\uF017 ' # 
+ JAVA_ICON $'\U2615' # ☕︎
)
;;
'awesome-mapped-fontconfig')
@@ -300,6 +302,7 @@ case $POWERLEVEL9K_MODE in
DROPBOX_ICON '\u'$CODEPOINT_OF_AWESOME_DROPBOX # 
DATE_ICON $'\uF073 ' # 
TIME_ICON $'\uF017 ' # 
+ JAVA_ICON $'\U2615' # ☕︎
)
;;
'nerdfont-complete'|'nerdfont-fontconfig')
@@ -394,6 +397,7 @@ case $POWERLEVEL9K_MODE in
DROPBOX_ICON $'\UF16B' # 
DATE_ICON $'\uF073 ' # 
TIME_ICON $'\uF017 ' # 
+ JAVA_ICON $'\U2615' # ☕︎
)
;;
*)
@@ -487,6 +491,7 @@ case $POWERLEVEL9K_MODE in
DROPBOX_ICON 'Dropbox'
DATE_ICON ''
TIME_ICON ''
+ JAVA_ICON $'\U2615' # ☕︎
)
;;
esac
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 436398c0..ec366abb 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1662,7 +1662,16 @@ prompt_dropbox() {
"$1_prompt_segment" "$0" "$2" "white" "blue" "$dropbox_status" "DROPBOX_ICON"
fi
+}
+
+# print Java version number
+prompt_java_version() {
+ local java_version
+ java_version=$(java -fullversion 2>&1 | cut -d '"' -f 2)
+ if [[ -n "$java_version" ]]; then
+ "$1_prompt_segment" "$0" "$2" "red" "white" "$java_version" "JAVA_ICON"
+ fi
}
################################################################