aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md6
-rw-r--r--README.md1
-rwxr-xr-xfunctions/icons.zsh5
-rwxr-xr-xpowerlevel9k.zsh-theme12
4 files changed, 24 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a8842a3..e7e61af6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+## next
+
+### New Segment: `laravel_version`
+
+Displays the current laravel version.
+
## v0.6.4
- `load` segment now has configurable averages.
diff --git a/README.md b/README.md
index 9b86067f..1e01e915 100644
--- a/README.md
+++ b/README.md
@@ -120,6 +120,7 @@ The segments that are currently available are:
* `nvm` - Show the version of Node that is currently active, if it differs from the version used by NVM
* **PHP Segments:**
* `php_version` - Show the current PHP version.
+ * `laravel_version` - Show the current Laravel version.
* [`symfony2_tests`](#symfony2_tests) - Show a ratio of test classes vs code classes for Symfony2.
* `symfony2_version` - Show the current Symfony2 version, if you are in a Symfony2-Project dir.
* **Python Segments:**
diff --git a/functions/icons.zsh b/functions/icons.zsh
index 1f90e94f..98c6f13d 100755
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -111,6 +111,7 @@ case $POWERLEVEL9K_MODE in
DATE_ICON $'\uE184' # 
TIME_ICON $'\uE12E' # 
JAVA_ICON $'\U2615' # ☕︎
+ LARAVEL_ICON ''
)
;;
'awesome-fontconfig')
@@ -206,6 +207,7 @@ case $POWERLEVEL9K_MODE in
DATE_ICON $'\uF073 ' # 
TIME_ICON $'\uF017 ' # 
JAVA_ICON $'\U2615' # ☕︎
+ LARAVEL_ICON ''
)
;;
'awesome-mapped-fontconfig')
@@ -306,6 +308,7 @@ case $POWERLEVEL9K_MODE in
DATE_ICON $'\uF073 ' # 
TIME_ICON $'\uF017 ' # 
JAVA_ICON $'\U2615' # ☕︎
+ LARAVEL_ICON ''
)
;;
'nerdfont-complete'|'nerdfont-fontconfig')
@@ -402,6 +405,7 @@ case $POWERLEVEL9K_MODE in
DATE_ICON $'\uF073 ' # 
TIME_ICON $'\uF017 ' # 
JAVA_ICON $'\U2615' # ☕︎
+ LARAVEL_ICON $'\ue73f ' # 
)
;;
*)
@@ -497,6 +501,7 @@ case $POWERLEVEL9K_MODE in
DATE_ICON ''
TIME_ICON ''
JAVA_ICON $'\U2615' # ☕︎
+ LARAVEL_ICON ''
)
;;
esac
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index b9119d4c..dde838d9 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1110,6 +1110,18 @@ prompt_vpn_ip() {
}
################################################################
+# Segment to display laravel version
+prompt_laravel_version() {
+ local laravel_version="$(php artisan --version 2>/dev/null)"
+ if [[ -n "${laravel_version}" ]]; then
+ # Remove unrelevant infos
+ laravel_version="${laravel_version//Laravel Framework version /}"
+
+ "$1_prompt_segment" "$0" "$2" "maroon" "white" "${laravel_version}" 'LARAVEL_ICON'
+ fi
+}
+
+################################################################
# Segment to display load
set_default POWERLEVEL9K_LOAD_WHICH 5
prompt_load() {