diff options
Diffstat (limited to 'archdroid-icon-theme.install')
-rwxr-xr-x | archdroid-icon-theme.install | 114 |
1 files changed, 68 insertions, 46 deletions
diff --git a/archdroid-icon-theme.install b/archdroid-icon-theme.install index 31e02bc53c60..ad665530ba92 100755 --- a/archdroid-icon-theme.install +++ b/archdroid-icon-theme.install @@ -1,24 +1,60 @@ -_color() { - tput bold && tput setaf "${1}"; - if ! [ "${2}" ]; then - return; - fi; - printf "%s" "${2}"; +post_install() { + _gtkUpdate; + _credits; } -_green() { - _color "2" "${1}"; +post_upgrade() { + _gtkUpdate; + _credits; } -_blue() { - _color "4" "${1}"; +post_remove() { + gtk-update-icon-cache; } -_white() { - _color "7"; - for line ; do - echo "${line}" ; - done ; +_gtkUpdate() { + _msg "Updating icon cache"...; + + local -ar Themes=( + Amber + ArchBlue + Blue + BlueGrey + BlueGreyDark + Brown + BrownDark + Cyan + DeepOrange + DeepOrangeDark + DeepPurple + Green + Grey + Indigo + KellyGreen + LightBlue + LightGreen + Lime + Orange + Pink + Purple + Red + Shamrock + Teal + Yellow + ); + + local theme; + for theme in "${Themes[@]}"; do + local dir="Archdroid-${theme}"; + local path="usr/share/icons/${dir}"; + + _msg2 "${dir}"; + gtk-update-icon-cache -ftq "${path}"; + done; +} + +_credits() { + _msg "Credits to Google, Ubuntu Mono, Mint-X, and Numix for this theme"; } _msg() { @@ -33,44 +69,30 @@ _msg2() { tput sgr 0; } -_gtkUpdate() { - _msg "Updating icon cache"...; - - a="Archdroid"; - Colors=( - Amber ArchBlue Blue BlueGrey - Brown Cyan DeepOrange DeepPurple - Green Grey Indigo KellyGreen - LightBlue LightGreen Lime Orange - Pink Purple Red Shamrock - Teal Yellow - ); - - for c in "${Colors[@]}"; do - t="${a}-${c}"; - d="usr/share/icons/${t}"; - - _msg2 "${t}"; - gtk-update-icon-cache -ftq "${d}"; - done; +_green() { + _color "2" "${1}"; } -_credits() { - _msg "Credits to Google, Ubuntu Mono, Mint-X, and Numix for this theme"; +_blue() { + _color "4" "${1}"; } -post_install() { - _gtkUpdate; - _credits; +_white() { + _color "7"; + for line ; do + echo "${line}" ; + done ; } -post_upgrade() { - _gtkUpdate; - _credits; -} +_color() { + tput bold; + tput setaf "${1}"; -post_remove() { - gtk-update-icon-cache; + if ! [ "${2}" ]; then + return; + fi; + + printf "%s" "${2}"; } # vim: ts=2 sw=2 et: |