pull/198/head 2021-12-13
Vince 5 years ago
parent 5a6431c6a5
commit 8f90c785d9

@ -25,18 +25,6 @@ function has_command() {
command -v $1 > /dev/null
}
if [[ "$(command -v gnome-shell)" ]]; then
SHELL_VERSION="$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -1)"
if [[ "${SHELL_VERSION:-}" -ge "40" ]]; then
GS_VERSION="new"
else
GS_VERSION="old"
fi
else
echo "'gnome-shell' not found, using styles for last gnome-shell version available."
GS_VERSION="new"
fi
install() {
local dest="$1"
local name="$2"
@ -252,24 +240,47 @@ theme_tweaks() {
tweaks='true'
fi
if [[ "$panel" == "compact" ]] ; then
install_compact_panel
fi
if [[ "$panel" == "compact" ]] ; then
install_compact_panel
fi
if [[ "$opacity" == "solid" ]] ; then
install_solid
fi
if [[ "$opacity" == "solid" ]] ; then
install_solid
fi
if [[ "$blackness" == "true" ]] ; then
install_black
fi
if [[ "$blackness" == "true" ]] ; then
install_black
fi
if [[ "$primary" == "true" ]] ; then
change_radio_color
fi
if [[ "$primary" == "true" ]] ; then
change_radio_color
fi
}
check_shell() {
if [[ "$shell" == "old" ]]; then
GS_VERSION="old"
echo "Install for old gnome-shell version"
elif [[ "$shell" == "new" ]]; then
GS_VERSION="new"
echo "Install for new gnome-shell version"
elif [[ "$(command -v gnome-shell)" ]]; then
SHELL_VERSION="$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -1)"
echo "Your gnome-shell version is $(gnome-shell --version)"
if [[ "${SHELL_VERSION:-}" -ge "40" ]]; then
GS_VERSION="new"
else
GS_VERSION="old"
fi
else
echo "'gnome-shell' not found, using styles for last gnome-shell version available."
GS_VERSION="new"
fi
}
install_theme() {
check_shell
for theme in "${themes[@]}"; do
for color in "${colors[@]}"; do
for size in "${sizes[@]}"; do

@ -18,6 +18,9 @@ OPTIONS:
2. compact: no floating panel variant
3. black: full black variant
4. primary: Change radio icon checked color to primary theme color (Default is Green)
--shell install gnome-shell version [old|new]
1. old: gnome-shell version < 40.0
2. new: gnome-shell version >= 40.0
-h, --help Show help
EOF
}
@ -37,6 +40,29 @@ while [[ "$#" -gt 0 ]]; do
_name="$2"
shift 2
;;
--shell)
shift
for variant in $@; do
case "$variant" in
old)
shell="old"
shift
;;
new)
shell="new"
shift
;;
-*)
break
;;
*)
echo "ERROR: Unrecognized shell variant '$1'."
echo "Try '$0 --help' for more information."
exit 1
;;
esac
done
;;
--tweaks)
shift
for variant in $@; do
@ -163,7 +189,7 @@ while [[ "$#" -gt 0 ]]; do
break
;;
*)
echo "ERROR: Unrecognized size variant '${1:-}'."
echo "ERROR: Unrecognized size variant '$1'."
echo "Try '$0 --help' for more information."
exit 1
;;
@ -175,7 +201,7 @@ while [[ "$#" -gt 0 ]]; do
exit 0
;;
*)
echo "ERROR: Unrecognized installation option '${1:-}'."
echo "ERROR: Unrecognized installation option '$1'."
echo "Try '$0 --help' for more information."
exit 1
;;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -43,7 +43,7 @@ done
cd ..
./install.sh -t all -d $THEME_DIR
./install.sh -t all -d $THEME_DIR --shell new
cd $THEME_DIR && Tar_themes && Clear_theme

Loading…
Cancel
Save