diff --git a/README.md b/README.md index b70699bf..5891f94f 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Usage: `./install.sh` **[OPTIONS...]** |-a, --alternative | Install alternative icons for software center and file-manager| |-b, --bold | Install bold panel icons version| |--black | Black panel icons version| +|-r,--remove,-u,--uninstall | Uninstall (remove) icon themes| |-h, --help | Show this help| > **Note for snaps:** To use these icons with snaps, the best way is to make a copy of the application's .desktop located in `/var/lib/snapd/desktop/applications/name-of-the-snap-application.desktop` into `$HOME/.local/share/applications/`. Then use any text editor and change the "Icon=" to "Icon=name-of-the-icon.svg" diff --git a/install.sh b/install.sh index da7663c3..09d46595 100755 --- a/install.sh +++ b/install.sh @@ -27,6 +27,10 @@ cat << EOF -a, --alternative Install alternative icons for software center and file-manager -b, --bold Install bold panel icons version --black Black panel icons version + + -r, --remove, + -u, --uninstall Uninstall (remove) icon themes + -h, --help Show help EOF } @@ -142,6 +146,19 @@ install() { gtk-update-icon-cache ${THEME_DIR} } +uninstall() { + local dest=${1} + local name=${2} + local theme=${3} + local color=${4} + + local THEME_DIR=${dest}/${name}${theme}${color} + + [[ -d ${THEME_DIR} ]] && rm -rf ${THEME_DIR} + + echo "Uninstalling '${THEME_DIR}'..." +} + while [[ "$#" -gt 0 ]]; do case "${1:-}" in -d|--dest) @@ -168,6 +185,10 @@ while [[ "$#" -gt 0 ]]; do echo "Installing 'black on panel' version..." shift ;; + -r|--remove|-u|--uninstall) + remove='true' + shift + ;; -t|--theme) shift for theme in "${@}"; do @@ -252,4 +273,16 @@ install_theme() { done } -install_theme +uninstall_theme() { + for theme in "${THEME_VARIANTS[@]}"; do + for color in "${COLOR_VARIANTS[@]}"; do + uninstall "${dest:-${DEST_DIR}}" "${name:-${THEME_NAME}}" "${theme}" "${color}" + done + done +} + +if [[ "${remove}" == 'true' ]]; then + uninstall_theme +else + install_theme +fi diff --git a/src/mimes/symbolic/font-x-generic-symbolic.svg b/src/mimes/symbolic/font-x-generic-symbolic.svg index 02b1a856..8bf2f223 100644 --- a/src/mimes/symbolic/font-x-generic-symbolic.svg +++ b/src/mimes/symbolic/font-x-generic-symbolic.svg @@ -1 +1,4 @@ - + + + +