Uppercase first letter of info

This commit is contained in:
Dylan Araps 2016-10-15 21:45:19 +11:00
parent 74a125e254
commit a8ccdf6a65

View file

@ -539,7 +539,7 @@ getwm() {
case "$wm" in case "$wm" in
"xwlc") "xwlc")
wm="$(ps -e | grep -m 1 -oE "sway|orbment|velox|orbital")" wm="$(ps -e | grep -m 1 -oE "sway|orbment|velox|orbital")"
[ "$version" -ge 4 ] && wm="${wm^}" wm="$(uppercase "$wm")"
;; ;;
esac esac
@ -663,7 +663,7 @@ getwmtheme() {
esac esac
wmtheme="${wmtheme//\'}" wmtheme="${wmtheme//\'}"
[ "$version" -ge 4 ] && wmtheme="${wmtheme^}" wmtheme="$(uppercase "$wmtheme")"
} }
# }}} # }}}
@ -1396,7 +1396,7 @@ getstyle() {
theme="$(grep "^[^#]*$kde" "$kde_config_file")" theme="$(grep "^[^#]*$kde" "$kde_config_file")"
theme="${theme/${kde}*=}" theme="${theme/${kde}*=}"
[ "$version" -ge 4 ] && theme="${theme^}" theme="$(uppercase "$theme")"
gtk_shorthand="on" gtk_shorthand="on"
return return
@ -1471,10 +1471,8 @@ getstyle() {
gtk3theme=${gtk3theme//\'} gtk3theme=${gtk3theme//\'}
# Uppercase the first letter of each gtk theme # Uppercase the first letter of each gtk theme
if [ "$version" -ge 4 ]; then gtk2theme="$(uppercase "$gtk2theme")"
gtk2theme="${gtk2theme^}" gtk3theme="$(uppercase "$gtk3theme")"
gtk3theme="${gtk3theme^}"
fi
# Toggle visibility of gtk themes. # Toggle visibility of gtk themes.
[ "$gtk2" == "off" ] && unset gtk2theme [ "$gtk2" == "off" ] && unset gtk2theme
@ -1559,6 +1557,8 @@ getterm() {
"gnome-terminal-") term="gnome-terminal" ;; "gnome-terminal-") term="gnome-terminal" ;;
*) term="$name" ;; *) term="$name" ;;
esac esac
term="$(uppercase "$term")"
} }
# }}} # }}}
@ -1607,6 +1607,8 @@ gettermfont() {
termfont="${termfont/:*}" termfont="${termfont/:*}"
;; ;;
esac esac
termfont="$(uppercase "$termfont")"
} }
# }}} # }}}
@ -2663,6 +2665,15 @@ bold() {
# }}} # }}}
# Uppercase {{{
# Uppercase the first letter of $1
uppercase () {
[ "$version" -ge 4 ] && printf "%s" "${1^}"
}
# }}}
# Linebreak {{{ # Linebreak {{{
getlinebreak() { getlinebreak() {