aboutsummaryrefslogtreecommitdiff
path: root/functions/utilities.zsh
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2015-10-24 00:42:59 +0300
committerDominik Ritter <dritter03@googlemail.com>2015-10-24 00:42:59 +0300
commitd6584e13dac22ffa6318c9624aa76f60a3add7bf (patch)
treebe5df02fa7f3b7ba9992a277ca54cca31c17779d /functions/utilities.zsh
parentfbd1b99babd5065b62b4b16a6e622dddc33838bc (diff)
Extracted icons into a separate file.
Diffstat (limited to 'functions/utilities.zsh')
-rw-r--r--functions/utilities.zsh24
1 files changed, 1 insertions, 23 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index be0ffc86..4c2d637a 100644
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -1,13 +1,10 @@
# vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8
################################################################
-# power-functions
+# Utility functions
# This file holds some utility-functions for
# the powerlevel9k-ZSH-theme
# https://github.com/bhilburn/powerlevel9k
################################################################
-################################################################
-# Utility functions
-################################################################
# Exits with 0 if a variable has been previously defined (even if empty)
# Takes the name of a variable that should be checked.
@@ -29,19 +26,6 @@ function set_default() {
defined "$varname" || typeset -g "$varname"="$default_value"
}
-# Safety function for printing icons
-# Prints the named icon, or if that icon is undefined, the string name.
-function print_icon() {
- local icon_name=$1
- local ICON_USER_VARIABLE=POWERLEVEL9K_${icon_name}
- local USER_ICON=${(P)ICON_USER_VARIABLE}
- if defined "$ICON_USER_VARIABLE"; then
- echo -n "$USER_ICON"
- else
- echo -n "${icons[$icon_name]}"
- fi
-}
-
# Get numerical color codes. That way we translate ANSI codes
# into ZSH-Style color codes.
function getColorCode() {
@@ -140,12 +124,6 @@ function getRelevantItem() {
done
}
-get_icon_names() {
- for key in ${(@k)icons}; do
- echo "POWERLEVEL9K_$key: ${icons[$key]}"
- done
-}
-
# OS detection for the `os_icon` segment
case $(uname) in
Darwin)