mirror of
https://github.com/vinceliuice/WhiteSur-icon-theme.git
synced 2024-11-22 05:40:09 +00:00
Merge pull request #67 from alvatip/alternative-icons
FIX: #30 Non-apple alternative
This commit is contained in:
commit
57933a29da
4 changed files with 127 additions and 1 deletions
|
@ -11,6 +11,7 @@ Usage: `./install.sh` **[OPTIONS...]**
|
|||
|:--------------------|:-------------|
|
||||
|-d, --dest | Specify theme destination directory (Default: $HOME/.themes)|
|
||||
|-n, --name | Specify theme name (Default: WhiteSur)|
|
||||
|-a, --alternative | Install alternative icons for software center and file-manager|
|
||||
|-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"
|
||||
|
|
34
install.sh
34
install.sh
|
@ -22,9 +22,31 @@ usage() {
|
|||
printf " %-25s%s\n" "-d, --dest DIR" "Specify theme destination directory (Default: ${DEST_DIR})"
|
||||
printf " %-25s%s\n" "-n, --name NAME" "Specify theme name (Default: ${THEME_NAME})"
|
||||
printf " %-25s%s\n" "-t, --theme VARIANTS" "Specify folder color [default|purple|pink|red|orange|yellow|green|grey|all] (Default: MacOS blue)"
|
||||
printf " %-25s%s\n" "-a, --alternative" "Install alternative icons for software center and file-manager"
|
||||
printf " %-25s%s\n" "-h, --help" "Show this help"
|
||||
}
|
||||
|
||||
# change the name of software and file-manager to use the alternative
|
||||
alternative() {
|
||||
local dir="${SRC_DIR}/src/apps/scalable"
|
||||
if [[ ${1} == 'unset' ]]; then
|
||||
# Software
|
||||
mv ${dir}/softwarecenter.svg ${dir}/softwarecenter-alternative.svg
|
||||
mv ${dir}/softwarecenter-old.svg ${dir}/softwarecenter.svg
|
||||
# File-manager
|
||||
mv ${dir}/file-manager.svg ${dir}/file-manager-alternative.svg
|
||||
mv ${dir}/file-manager-old.svg ${dir}/file-manager.svg
|
||||
else
|
||||
# Software
|
||||
mv ${dir}/softwarecenter.svg ${dir}/softwarecenter-old.svg
|
||||
mv ${dir}/softwarecenter-alternative.svg ${dir}/softwarecenter.svg
|
||||
# File-manager
|
||||
mv ${dir}/file-manager.svg ${dir}/file-manager-old.svg
|
||||
mv ${dir}/file-manager-alternative.svg ${dir}/file-manager.svg
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
install() {
|
||||
local dest=${1}
|
||||
local name=${2}
|
||||
|
@ -183,6 +205,10 @@ while [[ $# -gt 0 ]]; do
|
|||
esac
|
||||
done
|
||||
;;
|
||||
-a|--alternative)
|
||||
alternative
|
||||
alternative=true
|
||||
;;
|
||||
-h|--help)
|
||||
usage
|
||||
exit 0
|
||||
|
@ -197,11 +223,17 @@ while [[ $# -gt 0 ]]; do
|
|||
done
|
||||
|
||||
install_theme() {
|
||||
|
||||
for theme in "${themes[@]-${THEME_VARIANTS[0]}}"; do
|
||||
for color in "${colors[@]-${COLOR_VARIANTS[@]}}"; do
|
||||
install "${dest:-${DEST_DIR}}" "${name:-${THEME_NAME}}" "${theme}" "${color}"
|
||||
done
|
||||
done
|
||||
|
||||
# restore the names in the source file
|
||||
if [[ $alternative == true ]]; then
|
||||
alternative 'unset'
|
||||
fi
|
||||
}
|
||||
|
||||
install_theme
|
||||
install_theme
|
53
src/apps/scalable/file-manager-alternative.svg
Normal file
53
src/apps/scalable/file-manager-alternative.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 12 KiB |
40
src/apps/scalable/softwarecenter-alternative.svg
Normal file
40
src/apps/scalable/softwarecenter-alternative.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 9.5 KiB |
Loading…
Reference in a new issue