Skip to content

Commit a65f3c3

Browse files
committed
Fixed #105
1 parent bc7dd66 commit a65f3c3

File tree

74 files changed

+600
-489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+600
-489
lines changed

install.sh

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ SRC_DIR="$(cd "$(dirname "$0")" && pwd)"
1717
source "${SRC_DIR}/lib_colors.sh"
1818

1919
THEME_NAME=Colloid
20-
COLOR_VARIANTS=('' '-Light' '-Dark')
20+
COLOR_VARIANTS=('-Light' '-Dark' '')
2121
THEME_VARIANTS=('' '-Purple' '-Pink' '-Red' '-Orange' '-Yellow' '-Green' '-Teal' '-Grey')
2222
SCHEME_VARIANTS=('' '-Nord' '-Dracula' '-Gruvbox' '-Everforest' '-Catppuccin')
2323

@@ -31,6 +31,7 @@ cat << EOF
3131
-s, --scheme VARIANTS Specify folder colorscheme variant(s) [default|nord|dracula|gruvbox|everforest|catppuccin|all]
3232
-t, --theme VARIANTS Specify folder color theme variant(s) [default|purple|pink|red|orange|yellow|green|teal|grey|all] (Default: blue)
3333
-notint, --notint Disable Follow ColorSheme for folders on KDE Plasma
34+
-r, --remove, -u, --uninstall Remove/Uninstall $THEME_NAME icon themes
3435
-h, --help Show help
3536
EOF
3637
}
@@ -72,7 +73,7 @@ install() {
7273
if [[ "${color}" == '-Dark' ]]; then
7374
mkdir -p "${THEME_DIR}"/{apps,categories,devices,emblems,mimetypes,places,status}
7475
cp -r "${SRC_DIR}"/src/actions "${THEME_DIR}"
75-
cp -r "${SRC_DIR}"/src/apps/symbolic "${THEME_DIR}"/apps
76+
cp -r "${SRC_DIR}"/src/apps/{22,symbolic} "${THEME_DIR}"/apps
7677
cp -r "${SRC_DIR}"/src/categories/symbolic "${THEME_DIR}"/categories
7778
cp -r "${SRC_DIR}"/src/emblems/symbolic "${THEME_DIR}"/emblems
7879
cp -r "${SRC_DIR}"/src/mimetypes/symbolic "${THEME_DIR}"/mimetypes
@@ -81,15 +82,16 @@ install() {
8182
cp -r "${SRC_DIR}"/src/status/{16,22,24,symbolic} "${THEME_DIR}"/status
8283

8384
# Change icon color for dark theme
84-
sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,devices,places,status}/{16,22,24}/*
85-
sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,devices}/32/*
86-
sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,apps,categories,devices,emblems,mimetypes,places,status}/symbolic/*
85+
sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,devices,places,status}/{16,22,24}/*.svg
86+
sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,devices}/32/*.svg
87+
sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/apps/22/*.svg
88+
sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,apps,categories,devices,emblems,mimetypes,places,status}/symbolic/*.svg
8789

8890
cp -r "${SRC_DIR}"/links/actions/{16,22,24,32,symbolic} "${THEME_DIR}"/actions
8991
cp -r "${SRC_DIR}"/links/devices/{16,22,24,32,symbolic} "${THEME_DIR}"/devices
9092
cp -r "${SRC_DIR}"/links/places/{16,22,24,symbolic} "${THEME_DIR}"/places
9193
cp -r "${SRC_DIR}"/links/status/{16,22,24,symbolic} "${THEME_DIR}"/status
92-
cp -r "${SRC_DIR}"/links/apps/symbolic "${THEME_DIR}"/apps
94+
cp -r "${SRC_DIR}"/links/apps/{22,symbolic} "${THEME_DIR}"/apps
9395
cp -r "${SRC_DIR}"/links/categories/symbolic "${THEME_DIR}"/categories
9496
cp -r "${SRC_DIR}"/links/mimetypes/symbolic "${THEME_DIR}"/mimetypes
9597

@@ -142,6 +144,11 @@ while [[ "$#" -gt 0 ]]; do
142144
name="${2}"
143145
shift 2
144146
;;
147+
-r|--remove|-u|--uninstall)
148+
remove='true'
149+
echo -e "\nUninstall icon themes...\n"
150+
shift
151+
;;
145152
-notint|--notint)
146153
notint='true'
147154
echo -e "\nInstall notint version! that folders will not follow system colorschemes..."
@@ -285,6 +292,17 @@ clean_old_theme() {
285292
done
286293
}
287294

295+
remove_theme() {
296+
for theme in "${THEME_VARIANTS[@]}"; do
297+
for scheme in "${SCHEME_VARIANTS[@]}"; do
298+
for color in "${COLOR_VARIANTS[@]}"; do
299+
local THEME_DIR="${DEST_DIR}/${THEME_NAME}${theme}${scheme}${color}"
300+
[[ -d "$THEME_DIR" ]] && echo -e "Removing $THEME_DIR ..." && rm -rf "$THEME_DIR"
301+
done
302+
done
303+
done
304+
}
305+
288306
install_theme() {
289307
for theme in "${themes[@]}"; do
290308
for scheme in "${schemes[@]}"; do
@@ -295,4 +313,14 @@ install_theme() {
295313
done
296314
}
297315

298-
clean_old_theme && install_theme
316+
clean_old_theme
317+
318+
if [[ "${remove}" == 'true' ]]; then
319+
remove_theme
320+
else
321+
install_theme
322+
fi
323+
324+
echo -e "\nFinished!\n"
325+
326+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kwrite.svg
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
anydesk.svg
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../actions/22/view-calendar-tasks.svg

links/apps/22/org.kde.elisa.svg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
elisa.svg
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ktimetracker.svg

links/apps/22/org.kde.kwrite.svg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kwrite.svg

links/apps/22/org.kde.umbrello.svg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
umbrello.svg
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../actions/22/application-menu.svg
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../actions/22/kt-plugins.svg

0 commit comments

Comments
 (0)