This commit is contained in:
vinceliuice
2024-10-15 14:35:29 +08:00
parent e60692a414
commit 790b4ecc7c
3 changed files with 14 additions and 8 deletions

View File

@@ -33,6 +33,7 @@ pakitheme_gtk3() {
prompt -i "Converting theme: $FLATPAK_THEME... \n"
elif [[ "${theme}" == '' ]]; then
prompt -e "Find other variant themes but could not locate deafult theme! \n"
prompt -s "You can run './install.sh' install theme first! \n"
prompt -s "Run this with right options! >>> \n"
prompt -i "-o, --opacity [$(IFS='|'; echo "${OPACITY_VARIANTS[*]}")]"
prompt -i "-c, --color [$(IFS='|'; echo "${COLOR_VARIANTS[*]}")]"
@@ -116,9 +117,14 @@ flatpak_remove() {
local theme="$(destify ${4})"
local scheme="$(destify ${5})"
if [[ -w "/root" ]]; then
local system_theme_dir="/var/lib/flatpak/runtime/org.gtk.Gtk3theme.${name}${color}${opacity}${alt}${theme}${scheme}"
local user_theme_dir="$HOME/.local/share/flatpak/runtime/org.gtk.Gtk3theme.${name}${color}${opacity}${alt}${theme}${scheme}"
if [[ -d "$system_theme_dir" ]]; then
sudo flatpak remove -y --system org.gtk.Gtk3theme.${name}${color}${opacity}${alt}${theme}${scheme}
else
fi
if [[ -d "$user_theme_dir" ]]; then
flatpak remove -y --user org.gtk.Gtk3theme.${name}${color}${opacity}${alt}${theme}${scheme}
fi
}

View File

@@ -853,11 +853,11 @@ connect_flatpak() {
}
disconnect_flatpak() {
for color in "${colors[@]}"; do
for opacity in "${opacities[@]}"; do
for alt in "${alts[@]}"; do
for theme in "${themes[@]}"; do
for scheme in "${schemes[@]}"; do
for color in "${COLOR_VARIANTS[@]}"; do
for opacity in "${OPACITY_VARIANTS[@]}"; do
for alt in "${ALT_VARIANTS[@]}"; do
for theme in "${THEME_VARIANTS[@]}"; do
for scheme in "${SCHEME_VARIANTS[@]}"; do
flatpak_remove "${color}" "${opacity}" "${alt}" "${theme}" "${scheme}"
done
done