pull/217/head
vinceliuice 3 years ago
parent 9ab4930e19
commit 97c3a20814

@ -1,63 +0,0 @@
#! /usr/bin/env bash
ROOT_UID=0
DEST_DIR=
# Destination directory
if [ "$UID" -eq "$ROOT_UID" ]; then
DEST_DIR="/usr/share/themes"
else
DEST_DIR="$HOME/.themes"
fi
THEME_NAME=Orchis
THEME_VARIANTS=('' '-purple' '-pink' '-red' '-orange' '-yellow' '-green' '-grey')
COLOR_VARIANTS=('' '-light' '-dark')
SIZE_VARIANTS=('' '-compact')
clean() {
local dest="$1"
local name="$2"
local theme="$3"
local color="$4"
local size="$5"
local THEME_DIR="$dest/$name$theme$color$size"
if [[ "${theme}" == '' && "${color}" == '' && "${size}" == '' ]]; then
todo='nothing'
elif [[ -d "${THEME_DIR}" ]]; then
rm -rf "${THEME_DIR}"
echo -e "Find: ${THEME_DIR} ! removing it ..."
fi
}
themes=()
colors=()
sizes=()
if [[ "${#themes[@]}" -eq 0 ]] ; then
themes=("${THEME_VARIANTS[@]}")
fi
if [[ "${#colors[@]}" -eq 0 ]] ; then
colors=("${COLOR_VARIANTS[@]}")
fi
if [[ "${#sizes[@]}" -eq 0 ]] ; then
sizes=("${SIZE_VARIANTS[@]}")
fi
clean_theme() {
for theme in "${themes[@]}"; do
for color in "${colors[@]}"; do
for size in "${sizes[@]}"; do
clean "${dest:-$DEST_DIR}" "${_name:-$THEME_NAME}" "$theme" "$color" "$size"
done
done
done
}
clean_theme
exit 0

@ -19,6 +19,11 @@ THEME_VARIANTS=('' '-Purple' '-Pink' '-Red' '-Orange' '-Yellow' '-Green' '-Grey'
COLOR_VARIANTS=('' '-Light' '-Dark')
SIZE_VARIANTS=('' '-Compact')
# Old name variants
OLD_THEME_VARIANTS=('' '-purple' '-pink' '-red' '-orange' '-yellow' '-green' '-grey')
OLD_COLOR_VARIANTS=('' '-light' '-dark')
OLD_SIZE_VARIANTS=('' '-compact')
# Check command availability
function has_command() {
command -v $1 > /dev/null
@ -157,6 +162,23 @@ uninstall() {
[[ -d "$THEME_DIR" ]] && rm -rf "$THEME_DIR" && echo -e "Uninstalling "$THEME_DIR" ..."
}
clean() {
local dest="$1"
local name="$2"
local theme="$3"
local color="$4"
local size="$5"
local THEME_DIR="$dest/$name$theme$color$size"
if [[ "${theme}" == '' && "${color}" == '' && "${size}" == '' ]]; then
todo='nothing'
elif [[ -d "${THEME_DIR}" ]]; then
rm -rf "${THEME_DIR}"
echo -e "Find: ${THEME_DIR} ! removing it ..."
fi
}
uninstall_link() {
[[ -L "${HOME}/.config/gtk-4.0/assets" ]] && rm -rf "${HOME}/.config/gtk-4.0/assets" && echo -e "Removing ${HOME}/.config/gtk-4.0/assets"
[[ -L "${HOME}/.config/gtk-4.0/gtk.css" ]] && rm -rf "${HOME}/.config/gtk-4.0/gtk.css" && echo -e "Removing ${HOME}/.config/gtk-4.0/gtk.css"
@ -328,6 +350,16 @@ uninstall_theme() {
done
}
clean_theme() {
for theme in "${othemes[@]}"; do
for color in "${ocolors[@]}"; do
for size in "${osizes[@]}"; do
clean "${dest:-$DEST_DIR}" "${_name:-$THEME_NAME}" "$theme" "$color" "$size"
done
done
done
}
link_theme() {
for theme in "${themes[@]}"; do
for color in "${COLOR_VARIANTS[2]}"; do

@ -38,6 +38,9 @@ EOF
themes=()
colors=()
sizes=()
othemes=()
ocolors=()
osizes=()
while [[ "$#" -gt 0 ]]; do
case "${1:-}" in
@ -242,7 +245,19 @@ if [[ "${#sizes[@]}" -eq 0 ]] ; then
sizes=("${SIZE_VARIANTS[@]}")
fi
./clean-old-theme.sh
if [[ "${#othemes[@]}" -eq 0 ]] ; then
othemes=("${OLD_THEME_VARIANTS[@]}")
fi
if [[ "${#ocolors[@]}" -eq 0 ]] ; then
ocolors=("${OLD_COLOR_VARIANTS[@]}")
fi
if [[ "${#osizes[@]}" -eq 0 ]] ; then
osizes=("${OLD_SIZE_VARIANTS[@]}")
fi
clean_theme
if [[ ${remove} == 'true' ]]; then
if [[ "$libadwaita" == 'true' ]]; then

@ -1818,6 +1818,40 @@ notebook {
&:focus tab:checked { box-shadow: none; }
> header {
&.top {
> tabs {
> tab {
border-radius: $corner-radius / 2 $corner-radius / 2 0 0;
}
}
}
&.bottom {
> tabs {
> tab {
border-radius: 0 0 $corner-radius / 2 $corner-radius / 2;
}
}
}
&.left {
> tabs {
> tab {
border-radius: $corner-radius / 2 0 0 $corner-radius / 2;
}
}
}
&.right {
> tabs {
> tab {
border-radius: 0 $corner-radius / 2 $corner-radius / 2 0;
}
}
}
}
.background.csd & > header {
&.top {
border-radius: $corner-radius $corner-radius 0 0;

@ -3602,6 +3602,7 @@ paned {
background-image: image($divider);
background-size: 1px 1px;
background-clip: content-box; // avoids borders image being rendered twice (?)
box-shadow: none;
&.wide {
min-width: 6px;

@ -3262,6 +3262,22 @@ notebook:focus tab:checked {
box-shadow: none;
}
notebook > header.top > tabs > tab {
border-radius: 5px 5px 0 0;
}
notebook > header.bottom > tabs > tab {
border-radius: 0 0 5px 5px;
}
notebook > header.left > tabs > tab {
border-radius: 5px 0 0 5px;
}
notebook > header.right > tabs > tab {
border-radius: 0 5px 5px 0;
}
.background.csd notebook > header.top {
border-radius: 10px 10px 0 0;
}

@ -3262,6 +3262,22 @@ notebook:focus tab:checked {
box-shadow: none;
}
notebook > header.top > tabs > tab {
border-radius: 5px 5px 0 0;
}
notebook > header.bottom > tabs > tab {
border-radius: 0 0 5px 5px;
}
notebook > header.left > tabs > tab {
border-radius: 5px 0 0 5px;
}
notebook > header.right > tabs > tab {
border-radius: 0 5px 5px 0;
}
.background.csd notebook > header.top {
border-radius: 10px 10px 0 0;
}

@ -3262,6 +3262,22 @@ notebook:focus tab:checked {
box-shadow: none;
}
notebook > header.top > tabs > tab {
border-radius: 6px 6px 0 0;
}
notebook > header.bottom > tabs > tab {
border-radius: 0 0 6px 6px;
}
notebook > header.left > tabs > tab {
border-radius: 6px 0 0 6px;
}
notebook > header.right > tabs > tab {
border-radius: 0 6px 6px 0;
}
.background.csd notebook > header.top {
border-radius: 12px 12px 0 0;
}

@ -3262,6 +3262,22 @@ notebook:focus tab:checked {
box-shadow: none;
}
notebook > header.top > tabs > tab {
border-radius: 5px 5px 0 0;
}
notebook > header.bottom > tabs > tab {
border-radius: 0 0 5px 5px;
}
notebook > header.left > tabs > tab {
border-radius: 5px 0 0 5px;
}
notebook > header.right > tabs > tab {
border-radius: 0 5px 5px 0;
}
.background.csd notebook > header.top {
border-radius: 10px 10px 0 0;
}

@ -3262,6 +3262,22 @@ notebook:focus tab:checked {
box-shadow: none;
}
notebook > header.top > tabs > tab {
border-radius: 6px 6px 0 0;
}
notebook > header.bottom > tabs > tab {
border-radius: 0 0 6px 6px;
}
notebook > header.left > tabs > tab {
border-radius: 6px 0 0 6px;
}
notebook > header.right > tabs > tab {
border-radius: 0 6px 6px 0;
}
.background.csd notebook > header.top {
border-radius: 12px 12px 0 0;
}

@ -3262,6 +3262,22 @@ notebook:focus tab:checked {
box-shadow: none;
}
notebook > header.top > tabs > tab {
border-radius: 6px 6px 0 0;
}
notebook > header.bottom > tabs > tab {
border-radius: 0 0 6px 6px;
}
notebook > header.left > tabs > tab {
border-radius: 6px 0 0 6px;
}
notebook > header.right > tabs > tab {
border-radius: 0 6px 6px 0;
}
.background.csd notebook > header.top {
border-radius: 12px 12px 0 0;
}

@ -3952,6 +3952,7 @@ paned > separator {
background-image: image(rgba(0, 0, 0, 0.12));
background-size: 1px 1px;
background-clip: content-box;
box-shadow: none;
}
paned > separator.wide {

@ -3952,6 +3952,7 @@ paned > separator {
background-image: image(rgba(255, 255, 255, 0.12));
background-size: 1px 1px;
background-clip: content-box;
box-shadow: none;
}
paned > separator.wide {

@ -3952,6 +3952,7 @@ paned > separator {
background-image: image(rgba(255, 255, 255, 0.12));
background-size: 1px 1px;
background-clip: content-box;
box-shadow: none;
}
paned > separator.wide {

@ -3952,6 +3952,7 @@ paned > separator {
background-image: image(rgba(0, 0, 0, 0.12));
background-size: 1px 1px;
background-clip: content-box;
box-shadow: none;
}
paned > separator.wide {

@ -3952,6 +3952,7 @@ paned > separator {
background-image: image(rgba(0, 0, 0, 0.12));
background-size: 1px 1px;
background-clip: content-box;
box-shadow: none;
}
paned > separator.wide {

@ -3952,6 +3952,7 @@ paned > separator {
background-image: image(rgba(0, 0, 0, 0.12));
background-size: 1px 1px;
background-clip: content-box;
box-shadow: none;
}
paned > separator.wide {

Loading…
Cancel
Save