mirror of
https://github.com/vinceliuice/Colloid-gtk-theme.git
synced 2024-10-18 05:20:35 -04:00
update
This commit is contained in:
parent
b3ceea1b71
commit
a0f7fadfbe
2 changed files with 85 additions and 72 deletions
10
README.md
10
README.md
|
@ -46,11 +46,11 @@ Run the following commands in the terminal:
|
|||
-u, --uninstall Uninstall/Remove installed themes or links
|
||||
|
||||
--tweaks Specify versions for tweaks
|
||||
1. [nord|dracula|gruvbox] Nord|Dracula|gruvbox ColorSchemes version
|
||||
2. black Blackness color version
|
||||
3. rimless Remove the 1px border about windows and menus
|
||||
4. normal Normal windows button style like gnome default theme (titlebuttons: max/min/close)
|
||||
5. float Floating gnome-shell panel style
|
||||
1. [nord|dracula|gruvbox|all] (Nord/Dracula/gruvbox/all) ColorSchemes version
|
||||
2. black Blackness color version
|
||||
3. rimless Remove the 1px border about windows and menus
|
||||
4. normal Normal windows button style like gnome default theme (titlebuttons: max/min/close)
|
||||
5. float Floating gnome-shell panel style
|
||||
|
||||
-h, --help Show help
|
||||
```
|
||||
|
|
147
install.sh
147
install.sh
|
@ -10,7 +10,7 @@ source "${REPO_DIR}/gtkrc.sh"
|
|||
ROOT_UID=0
|
||||
DEST_DIR=
|
||||
|
||||
ctype=
|
||||
scheme=
|
||||
window=
|
||||
|
||||
# Destination directory
|
||||
|
@ -24,6 +24,7 @@ SASSC_OPT="-M -t expanded"
|
|||
|
||||
THEME_NAME=Colloid
|
||||
THEME_VARIANTS=('' '-Purple' '-Pink' '-Red' '-Orange' '-Yellow' '-Green' '-Teal' '-Grey')
|
||||
SCHEME_VARIANTS=('' '-Nord' '-Dracula' '-Gruvbox')
|
||||
COLOR_VARIANTS=('' '-Light' '-Dark')
|
||||
SIZE_VARIANTS=('' '-Compact')
|
||||
|
||||
|
@ -65,11 +66,11 @@ OPTIONS:
|
|||
-u, --uninstall Uninstall/Remove installed themes or links
|
||||
|
||||
--tweaks Specify versions for tweaks
|
||||
1. [nord|dracula|gruvbox] Nord|Dracula|gruvbox ColorSchemes version
|
||||
2. black Blackness color version
|
||||
3. rimless Remove the 1px border about windows and menus
|
||||
4. normal Normal windows button style like gnome default theme (titlebuttons: max/min/close)
|
||||
5. float Floating gnome-shell panel style
|
||||
1. [nord|dracula|gruvbox|all] Nord|Dracula|gruvbox|all ColorSchemes version
|
||||
2. black Blackness color version
|
||||
3. rimless Remove the 1px border about windows and menus
|
||||
4. normal Normal windows button style like gnome default theme (titlebuttons: max/min/close)
|
||||
5. float Floating gnome-shell panel style
|
||||
|
||||
-h, --help Show help
|
||||
EOF
|
||||
|
@ -81,7 +82,7 @@ install() {
|
|||
local theme="${3}"
|
||||
local color="${4}"
|
||||
local size="${5}"
|
||||
local ctype="${6}"
|
||||
local scheme="${6}"
|
||||
local window="${7}"
|
||||
|
||||
[[ "${color}" == '-Light' ]] && local ELSE_LIGHT="${color}"
|
||||
|
@ -116,7 +117,7 @@ install() {
|
|||
|
||||
cp -r "${SRC_DIR}/assets/gnome-shell/common-assets" "${THEME_DIR}/gnome-shell/assets"
|
||||
cp -r "${SRC_DIR}/assets/gnome-shell/assets${ELSE_DARK:-}/"*.svg "${THEME_DIR}/gnome-shell/assets"
|
||||
cp -r "${SRC_DIR}/assets/gnome-shell/theme${theme}${ctype}/"*.svg "${THEME_DIR}/gnome-shell/assets"
|
||||
cp -r "${SRC_DIR}/assets/gnome-shell/theme${theme}${scheme}/"*.svg "${THEME_DIR}/gnome-shell/assets"
|
||||
|
||||
cd "${THEME_DIR}/gnome-shell"
|
||||
ln -s assets/no-events.svg no-events.svg
|
||||
|
@ -124,31 +125,31 @@ install() {
|
|||
ln -s assets/no-notifications.svg no-notifications.svg
|
||||
|
||||
mkdir -p "${THEME_DIR}/gtk-2.0"
|
||||
# cp -r "${SRC_DIR}/main/gtk-2.0/gtkrc${theme}${ELSE_DARK:-}${ctype}" "${THEME_DIR}/gtk-2.0/gtkrc"
|
||||
# cp -r "${SRC_DIR}/main/gtk-2.0/gtkrc${theme}${ELSE_DARK:-}${scheme}" "${THEME_DIR}/gtk-2.0/gtkrc"
|
||||
cp -r "${SRC_DIR}/main/gtk-2.0/common/"*'.rc' "${THEME_DIR}/gtk-2.0"
|
||||
cp -r "${SRC_DIR}/assets/gtk-2.0/assets-common${ELSE_DARK:-}" "${THEME_DIR}/gtk-2.0/assets"
|
||||
cp -r "${SRC_DIR}/assets/gtk-2.0/assets${theme}${ELSE_DARK:-}${ctype}/"*"png" "${THEME_DIR}/gtk-2.0/assets"
|
||||
cp -r "${SRC_DIR}/assets/gtk-2.0/assets${theme}${ELSE_DARK:-}${scheme}/"*"png" "${THEME_DIR}/gtk-2.0/assets"
|
||||
|
||||
mkdir -p "${THEME_DIR}/gtk-3.0"
|
||||
cp -r "${SRC_DIR}/assets/gtk/assets${theme}${ctype}" "${THEME_DIR}/gtk-3.0/assets"
|
||||
cp -r "${SRC_DIR}/assets/gtk/assets${theme}${scheme}" "${THEME_DIR}/gtk-3.0/assets"
|
||||
cp -r "${SRC_DIR}/assets/gtk/scalable" "${THEME_DIR}/gtk-3.0/assets"
|
||||
cp -r "${SRC_DIR}/assets/gtk/thumbnails/thumbnail${theme}${ctype}${ELSE_DARK:-}.png" "${THEME_DIR}/gtk-3.0/thumbnail.png"
|
||||
cp -r "${SRC_DIR}/assets/gtk/thumbnails/thumbnail${theme}${scheme}${ELSE_DARK:-}.png" "${THEME_DIR}/gtk-3.0/thumbnail.png"
|
||||
sassc $SASSC_OPT "${SRC_DIR}/main/gtk-3.0/gtk${color}.scss" "${THEME_DIR}/gtk-3.0/gtk.css"
|
||||
sassc $SASSC_OPT "${SRC_DIR}/main/gtk-3.0/gtk-Dark.scss" "${THEME_DIR}/gtk-3.0/gtk-dark.css"
|
||||
|
||||
mkdir -p "${THEME_DIR}/gtk-4.0"
|
||||
cp -r "${SRC_DIR}/assets/gtk/assets${theme}${ctype}" "${THEME_DIR}/gtk-4.0/assets"
|
||||
cp -r "${SRC_DIR}/assets/gtk/assets${theme}${scheme}" "${THEME_DIR}/gtk-4.0/assets"
|
||||
cp -r "${SRC_DIR}/assets/gtk/scalable" "${THEME_DIR}/gtk-4.0/assets"
|
||||
cp -r "${SRC_DIR}/assets/gtk/thumbnails/thumbnail${theme}${ctype}${ELSE_DARK:-}.png" "${THEME_DIR}/gtk-4.0/thumbnail.png"
|
||||
cp -r "${SRC_DIR}/assets/gtk/thumbnails/thumbnail${theme}${scheme}${ELSE_DARK:-}.png" "${THEME_DIR}/gtk-4.0/thumbnail.png"
|
||||
sassc $SASSC_OPT "${SRC_DIR}/main/gtk-4.0/gtk${color}.scss" "${THEME_DIR}/gtk-4.0/gtk.css"
|
||||
sassc $SASSC_OPT "${SRC_DIR}/main/gtk-4.0/gtk-Dark.scss" "${THEME_DIR}/gtk-4.0/gtk-dark.css"
|
||||
|
||||
mkdir -p "${THEME_DIR}/cinnamon"
|
||||
cp -r "${SRC_DIR}/assets/cinnamon/common-assets" "${THEME_DIR}/cinnamon/assets"
|
||||
cp -r "${SRC_DIR}/assets/cinnamon/assets${ELSE_DARK:-}/"*'.svg' "${THEME_DIR}/cinnamon/assets"
|
||||
cp -r "${SRC_DIR}/assets/cinnamon/theme${theme}${ctype}/"*'.svg' "${THEME_DIR}/cinnamon/assets"
|
||||
cp -r "${SRC_DIR}/assets/cinnamon/theme${theme}${scheme}/"*'.svg' "${THEME_DIR}/cinnamon/assets"
|
||||
sassc $SASSC_OPT "${SRC_DIR}/main/cinnamon/cinnamon${color}.scss" "${THEME_DIR}/cinnamon/cinnamon.css"
|
||||
cp -r "${SRC_DIR}/assets/cinnamon/thumbnails/thumbnail${theme}${ctype}${color}.png" "${THEME_DIR}/cinnamon/thumbnail.png"
|
||||
cp -r "${SRC_DIR}/assets/cinnamon/thumbnails/thumbnail${theme}${scheme}${color}.png" "${THEME_DIR}/cinnamon/thumbnail.png"
|
||||
|
||||
mkdir -p "${THEME_DIR}/metacity-1"
|
||||
cp -r "${SRC_DIR}/main/metacity-1/metacity-theme-3${window}.xml" "${THEME_DIR}/metacity-1/metacity-theme-3.xml"
|
||||
|
@ -157,22 +158,22 @@ install() {
|
|||
cd "${THEME_DIR}/metacity-1" && ln -s metacity-theme-3.xml metacity-theme-1.xml && ln -s metacity-theme-3.xml metacity-theme-2.xml
|
||||
|
||||
mkdir -p "${THEME_DIR}/xfwm4"
|
||||
cp -r "${SRC_DIR}/assets/xfwm4/assets${ELSE_LIGHT:-}${ctype}${window}/"*.png "${THEME_DIR}/xfwm4"
|
||||
cp -r "${SRC_DIR}/assets/xfwm4/assets${ELSE_LIGHT:-}${scheme}${window}/"*.png "${THEME_DIR}/xfwm4"
|
||||
cp -r "${SRC_DIR}/main/xfwm4/themerc${ELSE_LIGHT:-}" "${THEME_DIR}/xfwm4/themerc"
|
||||
mkdir -p "${THEME_DIR}-hdpi/xfwm4"
|
||||
cp -r "${SRC_DIR}/assets/xfwm4/assets${ELSE_LIGHT:-}${ctype}${window}-hdpi/"*.png "${THEME_DIR}-hdpi/xfwm4"
|
||||
cp -r "${SRC_DIR}/assets/xfwm4/assets${ELSE_LIGHT:-}${scheme}${window}-hdpi/"*.png "${THEME_DIR}-hdpi/xfwm4"
|
||||
cp -r "${SRC_DIR}/main/xfwm4/themerc${ELSE_LIGHT:-}" "${THEME_DIR}-hdpi/xfwm4/themerc"
|
||||
sed -i "s/button_offset=6/button_offset=9/" "${THEME_DIR}-hdpi/xfwm4/themerc"
|
||||
mkdir -p "${THEME_DIR}-xhdpi/xfwm4"
|
||||
cp -r "${SRC_DIR}/assets/xfwm4/assets${ELSE_LIGHT:-}${ctype}${window}-xhdpi/"*.png "${THEME_DIR}-xhdpi/xfwm4"
|
||||
cp -r "${SRC_DIR}/assets/xfwm4/assets${ELSE_LIGHT:-}${scheme}${window}-xhdpi/"*.png "${THEME_DIR}-xhdpi/xfwm4"
|
||||
cp -r "${SRC_DIR}/main/xfwm4/themerc${ELSE_LIGHT:-}" "${THEME_DIR}-xhdpi/xfwm4/themerc"
|
||||
sed -i "s/button_offset=6/button_offset=12/" "${THEME_DIR}-xhdpi/xfwm4/themerc"
|
||||
|
||||
mkdir -p "${THEME_DIR}/plank"
|
||||
if [[ "$color" == '-Light' ]]; then
|
||||
cp -r "${SRC_DIR}/main/plank/theme-Light${ctype}/"* "${THEME_DIR}/plank"
|
||||
cp -r "${SRC_DIR}/main/plank/theme-Light${scheme}/"* "${THEME_DIR}/plank"
|
||||
else
|
||||
cp -r "${SRC_DIR}/main/plank/theme-Dark${ctype}/"* "${THEME_DIR}/plank"
|
||||
cp -r "${SRC_DIR}/main/plank/theme-Dark${scheme}/"* "${THEME_DIR}/plank"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -180,6 +181,7 @@ themes=()
|
|||
colors=()
|
||||
sizes=()
|
||||
lcolors=()
|
||||
schemes=()
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "${1}" in
|
||||
|
@ -318,23 +320,28 @@ while [[ $# -gt 0 ]]; do
|
|||
for variant in $@; do
|
||||
case "$variant" in
|
||||
nord)
|
||||
nord="true"
|
||||
ctype="-Nord"
|
||||
colorscheme='true'
|
||||
schemes+=("${SCHEME_VARIANTS[1]}")
|
||||
echo -e "Nord ColorScheme version! ..."
|
||||
shift
|
||||
;;
|
||||
dracula)
|
||||
dracula="true"
|
||||
ctype="-Dracula"
|
||||
colorscheme='true'
|
||||
schemes+=("${SCHEME_VARIANTS[2]}")
|
||||
echo -e "Dracula ColorScheme version! ..."
|
||||
shift
|
||||
;;
|
||||
gruvbox)
|
||||
gruvbox="true"
|
||||
ctype="-Gruvbox"
|
||||
colorscheme='true'
|
||||
schemes+=("${SCHEME_VARIANTS[3]}")
|
||||
echo -e "Gruvbox ColorScheme version! ..."
|
||||
shift
|
||||
;;
|
||||
all)
|
||||
colorscheme='true'
|
||||
schemes+=("${SCHEME_VARIANTS[@]}")
|
||||
shift
|
||||
;;
|
||||
black)
|
||||
blackness="true"
|
||||
echo -e "Blackness version! ..."
|
||||
|
@ -395,6 +402,10 @@ if [[ "${#sizes[@]}" -eq 0 ]] ; then
|
|||
sizes=("${SIZE_VARIANTS[0]}")
|
||||
fi
|
||||
|
||||
if [[ "${#schemes[@]}" -eq 0 ]] ; then
|
||||
schemes=("${SCHEME_VARIANTS[0]}")
|
||||
fi
|
||||
|
||||
# Check command avalibility
|
||||
function has_command() {
|
||||
command -v $1 > /dev/null
|
||||
|
@ -426,19 +437,22 @@ compact_size() {
|
|||
sed -i "/\$compact:/s/false/true/" "${SRC_DIR}/sass/_tweaks-temp.scss"
|
||||
}
|
||||
|
||||
nord_color() {
|
||||
sed -i "/\@import/s/color-palette-default/color-palette-nord/" "${SRC_DIR}/sass/_tweaks-temp.scss"
|
||||
sed -i "/\$colorscheme:/s/default/nord/" "${SRC_DIR}/sass/_tweaks-temp.scss"
|
||||
}
|
||||
|
||||
dracula_color() {
|
||||
sed -i "/\@import/s/color-palette-default/color-palette-dracula/" "${SRC_DIR}/sass/_tweaks-temp.scss"
|
||||
sed -i "/\$colorscheme:/s/default/dracula/" "${SRC_DIR}/sass/_tweaks-temp.scss"
|
||||
}
|
||||
|
||||
gruvbox_color() {
|
||||
sed -i "/\@import/s/color-palette-default/color-palette-gruvbox/" "${SRC_DIR}/sass/_tweaks-temp.scss"
|
||||
sed -i "/\$colorscheme:/s/default/gruvbox/" "${SRC_DIR}/sass/_tweaks-temp.scss"
|
||||
color_schemes() {
|
||||
if [[ "$scheme" != '' ]]; then
|
||||
case "$scheme" in
|
||||
-Nord)
|
||||
scheme_color='nord'
|
||||
;;
|
||||
-Dracula)
|
||||
scheme_color='dracula'
|
||||
;;
|
||||
-Gruvbox)
|
||||
scheme_color='gruvbox'
|
||||
;;
|
||||
esac
|
||||
sed -i "/\@import/s/color-palette-default/color-palette-${scheme_color}/" "${SRC_DIR}/sass/_tweaks-temp.scss"
|
||||
sed -i "/\$colorscheme:/s/default/${scheme_color}/" "${SRC_DIR}/sass/_tweaks-temp.scss"
|
||||
fi
|
||||
}
|
||||
|
||||
blackness_color() {
|
||||
|
@ -495,45 +509,40 @@ theme_color() {
|
|||
theme_color='grey'
|
||||
;;
|
||||
esac
|
||||
tweaks_temp
|
||||
sed -i "/\$theme:/s/default/${theme_color}/" "${SRC_DIR}/sass/_tweaks-temp.scss"
|
||||
fi
|
||||
}
|
||||
|
||||
theme_tweaks() {
|
||||
if [[ "$accent" = "true" ]] ; then
|
||||
if [[ "$accent" = "true" || "$colorscheme" = "true" ]]; then
|
||||
tweaks_temp
|
||||
fi
|
||||
|
||||
if [[ "$accent" = "true" ]]; then
|
||||
theme_color
|
||||
fi
|
||||
|
||||
if [[ "$compact" = "true" ]] ; then
|
||||
if [[ "$compact" = "true" ]]; then
|
||||
compact_size
|
||||
fi
|
||||
|
||||
if [[ "$nord" = "true" ]] ; then
|
||||
nord_color
|
||||
if [[ "$colorscheme" = "true" ]] ; then
|
||||
color_schemes
|
||||
fi
|
||||
|
||||
if [[ "$dracula" = "true" ]] ; then
|
||||
dracula_color
|
||||
fi
|
||||
|
||||
if [[ "$gruvbox" = "true" ]] ; then
|
||||
gruvbox_color
|
||||
fi
|
||||
|
||||
if [[ "$blackness" = "true" ]] ; then
|
||||
if [[ "$blackness" = "true" ]]; then
|
||||
blackness_color
|
||||
fi
|
||||
|
||||
if [[ "$rimless" = "true" ]] ; then
|
||||
if [[ "$rimless" = "true" ]]; then
|
||||
border_rimless
|
||||
fi
|
||||
|
||||
if [[ "$normal" = "true" ]] ; then
|
||||
if [[ "$normal" = "true" ]]; then
|
||||
normal_winbutton
|
||||
fi
|
||||
|
||||
if [[ "$float" = "true" ]] ; then
|
||||
if [[ "$float" = "true" ]]; then
|
||||
float_panel
|
||||
fi
|
||||
}
|
||||
|
@ -548,7 +557,7 @@ link_libadwaita() {
|
|||
local theme="${3}"
|
||||
local color="${4}"
|
||||
local size="${5}"
|
||||
local ctype="${6}"
|
||||
local scheme="${6}"
|
||||
|
||||
local THEME_DIR="${1}/${2}${3}${4}${5}${6}"
|
||||
|
||||
|
@ -566,7 +575,9 @@ link_theme() {
|
|||
for theme in "${themes[@]}"; do
|
||||
for color in "${lcolors[@]}"; do
|
||||
for size in "${sizes[@]}"; do
|
||||
link_libadwaita "${dest:-$DEST_DIR}" "${name:-$THEME_NAME}" "$theme" "$color" "$size" "$ctype"
|
||||
for scheme in "${schemes[@]}"; do
|
||||
link_libadwaita "${dest:-$DEST_DIR}" "${name:-$THEME_NAME}" "$theme" "$color" "$size" "$scheme"
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
|
@ -578,12 +589,12 @@ clean() {
|
|||
local theme="${3}"
|
||||
local color="${4}"
|
||||
local size="${5}"
|
||||
local type="${6}"
|
||||
local scheme="${6}"
|
||||
local screen="${7}"
|
||||
|
||||
local THEME_DIR="${1}/${2}${3}${4}${5}${6}${7}"
|
||||
|
||||
if [[ ${theme} == '' && ${color} == '' && ${size} == '' && ${type} == '' ]]; then
|
||||
if [[ ${theme} == '' && ${color} == '' && ${size} == '' && ${scheme} == '' ]]; then
|
||||
cleantheme='none'
|
||||
elif [[ -d ${THEME_DIR} ]]; then
|
||||
rm -rf ${THEME_DIR}
|
||||
|
@ -595,9 +606,9 @@ clean_theme() {
|
|||
for theme in '' '-purple' '-pink' '-red' '-orange' '-yellow' '-green' '-teal' '-grey'; do
|
||||
for color in '' '-light' '-dark'; do
|
||||
for size in '' '-compact'; do
|
||||
for type in '' '-nord' '-dracula' '-gruvbox'; do
|
||||
for scheme in '' '-nord' '-dracula' '-gruvbox'; do
|
||||
for screen in '' '-hdpi' '-xhdpi'; do
|
||||
clean "${dest:-${DEST_DIR}}" "${name:-${THEME_NAME}}" "${theme}" "${color}" "${size}" "${type}" "${screen}"
|
||||
clean "${dest:-${DEST_DIR}}" "${name:-${THEME_NAME}}" "${theme}" "${color}" "${size}" "${scheme}" "${screen}"
|
||||
done
|
||||
done
|
||||
done
|
||||
|
@ -609,8 +620,10 @@ install_theme() {
|
|||
for theme in "${themes[@]}"; do
|
||||
for color in "${colors[@]}"; do
|
||||
for size in "${sizes[@]}"; do
|
||||
install "${dest:-$DEST_DIR}" "${name:-$THEME_NAME}" "$theme" "$color" "$size" "$ctype" "$window"
|
||||
make_gtkrc "${dest:-$DEST_DIR}" "${name:-$THEME_NAME}" "$theme" "$color" "$size" "$ctype" "$window"
|
||||
for scheme in "${schemes[@]}"; do
|
||||
install "${dest:-$DEST_DIR}" "${name:-$THEME_NAME}" "$theme" "$color" "$size" "$scheme" "$window"
|
||||
make_gtkrc "${dest:-$DEST_DIR}" "${name:-$THEME_NAME}" "$theme" "$color" "$size" "$scheme" "$window"
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
|
@ -630,7 +643,7 @@ uninstall() {
|
|||
local theme="${3}"
|
||||
local color="${4}"
|
||||
local size="${5}"
|
||||
local ctype="${6}"
|
||||
local scheme="${6}"
|
||||
|
||||
local THEME_DIR="${1}/${2}${3}${4}${5}${6}"
|
||||
|
||||
|
@ -644,7 +657,7 @@ uninstall_theme() {
|
|||
for theme in "${themes[@]}"; do
|
||||
for color in "${colors[@]}"; do
|
||||
for size in "${sizes[@]}"; do
|
||||
uninstall "${dest:-$DEST_DIR}" "${name:-$THEME_NAME}" "$theme" "$color" "$size" "$ctype"
|
||||
uninstall "${dest:-$DEST_DIR}" "${name:-$THEME_NAME}" "$theme" "$color" "$size" "$scheme"
|
||||
done
|
||||
done
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue