This commit is contained in:
vinceliuice
2022-04-23 17:58:25 +08:00
parent 980fbf80e4
commit 329e8efaec

View File

@@ -28,20 +28,17 @@ COLOR_VARIANTS=('' '-light' '-dark')
SIZE_VARIANTS=('' '-compact')
if [[ "$(command -v gnome-shell)" ]]; then
gnome-shell --version
SHELL_VERSION="$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -1)"
if [[ "${SHELL_VERSION:-}" -ge "42" ]]; then
GS_VERSION="42"
echo "gnome-shell 42"
GS_VERSION="42-0"
elif [[ "${SHELL_VERSION:-}" -ge "40" ]]; then
GS_VERSION="40"
echo "gnome-shell 40"
GS_VERSION="40-0"
else
GS_VERSION="38"
echo "gnome-shell 38"
GS_VERSION="3-28"
fi
else
echo "'gnome-shell' not found, using styles for last gnome-shell version available."
GS_VERSION="42"
fi
usage() {
@@ -425,10 +422,10 @@ normal_winbutton() {
}
gnome_shell_version() {
sed -i "/\widgets/s/40/${GS_VERSION}/" ${SRC_DIR}/sass/gnome-shell/_common-temp.scss
sed -i "/\widgets/s/40-0/${GS_VERSION}/" ${SRC_DIR}/sass/gnome-shell/_common-temp.scss
if [[ "${GS_VERSION}" == '38' ]]; then
sed -i "/\extensions/s/40-0/3-28/" ${SRC_DIR}/sass/gnome-shell/_common-temp.scss
if [[ "${GS_VERSION}" == '3-28' ]]; then
sed -i "/\extensions/s/40-0/${GS_VERSION}/" ${SRC_DIR}/sass/gnome-shell/_common-temp.scss
fi
}