mirror of
https://github.com/vinceliuice/WhiteSur-gtk-theme.git
synced 2025-06-04 13:13:04 +00:00
Fixed #1147
This commit is contained in:
parent
e60692a414
commit
790b4ecc7c
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -228,7 +228,6 @@ while [[ $# -gt 0 ]]; do
|
||||
fi; shift ;;
|
||||
-F|--flatpak)
|
||||
flatpak="true"; signal_exit
|
||||
prompt -w "Without options it will only install default themes\n"
|
||||
|
||||
if ! has_command flatpak; then
|
||||
prompt -e "'${1}' ERROR: There's no Flatpak installed in your system"
|
||||
@ -322,6 +321,7 @@ else
|
||||
|
||||
if [[ "${flatpak}" == 'true' && "${gdm}" != 'true' ]]; then
|
||||
prompt -i "Connecting '${name}' themes to your Flatpak... \n"
|
||||
prompt -w "Without options it will only install default themes\n"
|
||||
customize_theme; avoid_variant_duplicates; connect_flatpak
|
||||
prompt -s "Done! '${name}' theme has been connected to your Flatpak. \n"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user