This commit is contained in:
vinceliuice
2024-05-13 05:36:14 +08:00
parent bbbda97b78
commit 9d70919f34
7 changed files with 104 additions and 61 deletions

View File

@@ -41,10 +41,10 @@ Run the following commands in the terminal:
-s, --size VARIANT... Specify size variant [standard|compact] (Default: standard variant) -s, --size VARIANT... Specify size variant [standard|compact] (Default: standard variant)
-l, --libadwaita Install specify gtk-4.0 theme into config folder (~/.config/gtk-4.0) for all gtk4 apps use this theme -l, --libadwaita Install specify gtk-4.0 theme into config folder (~/.config/gtk-4.0) for all gtk4 apps use this theme
(Default ColorSchemes themes will follow the system style, [nord|dracula|gruvbox|everforest|black] not support this) Default ColorSchemes theme will follow the system style (light/dark mode switch), nord|dracula|gruvbox|everforest|black ColorSchemes not support this
Options for default ColorSchemes:
-r, --remove, 1. system Default option (using system colors for light/dark mode switching)
-u, --uninstall Uninstall/Remove installed themes or links 2. fixed Using fixed theme colors (that will break light/dark mode switch)
--tweaks Specify versions for tweaks --tweaks Specify versions for tweaks
1. [nord|dracula|gruvbox|all] (Nord/Dracula/gruvbox/all) ColorSchemes version 1. [nord|dracula|gruvbox|all] (Nord/Dracula/gruvbox/all) ColorSchemes version
@@ -53,6 +53,9 @@ Run the following commands in the terminal:
4. normal Normal windows button style like gnome default theme (titlebuttons: max/min/close) 4. normal Normal windows button style like gnome default theme (titlebuttons: max/min/close)
5. float Floating gnome-shell panel style 5. float Floating gnome-shell panel style
-r, --remove,
-u, --uninstall Uninstall/Remove installed themes or links
-h, --help Show help -h, --help Show help
``` ```

View File

@@ -30,7 +30,7 @@ COLOR_VARIANTS=('' '-Light' '-Dark')
SIZE_VARIANTS=('' '-Compact') SIZE_VARIANTS=('' '-Compact')
if [[ "$(command -v gnome-shell)" ]]; then if [[ "$(command -v gnome-shell)" ]]; then
gnome-shell --version echo && gnome-shell --version
SHELL_VERSION="$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -1)" SHELL_VERSION="$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -1)"
if [[ "${SHELL_VERSION:-}" -ge "46" ]]; then if [[ "${SHELL_VERSION:-}" -ge "46" ]]; then
GS_VERSION="46-0" GS_VERSION="46-0"
@@ -63,11 +63,11 @@ OPTIONS:
-s, --size VARIANT Specify size variant [standard|compact] (Default: standard variant) -s, --size VARIANT Specify size variant [standard|compact] (Default: standard variant)
-l, --libadwaita Install specify gtk-4.0 theme into config folder (~/.config/gtk-4.0) for all gtk4 apps use this theme -l, --libadwaita Install specify gtk-4.0 theme into config folder ($HOME/.config/gtk-4.0) for all gtk4 apps use this theme
(Default ColorSchemes theme will follow the system style, nord|dracula|gruvbox|everforest|black not support this) Default ColorSchemes theme will follow the system style (light/dark mode switch), nord|dracula|gruvbox|everforest|black ColorSchemes not support this
Options for default ColorSchemes:
-r, --remove, 1. system Default option (using system colors for light/dark mode switching)
-u, --uninstall Uninstall/Remove installed themes or links 2. fixed Using fixed theme colors (that will break light/dark mode switch)
--tweaks Specify versions for tweaks --tweaks Specify versions for tweaks
1. [nord|dracula|gruvbox|everforest|all] Nord|Dracula|gruvbox|everforet|all ColorSchemes version 1. [nord|dracula|gruvbox|everforest|all] Nord|Dracula|gruvbox|everforet|all ColorSchemes version
@@ -76,6 +76,9 @@ OPTIONS:
4. normal Normal windows button style like gnome default theme (titlebuttons: max/min/close) 4. normal Normal windows button style like gnome default theme (titlebuttons: max/min/close)
5. float Floating gnome-shell panel style 5. float Floating gnome-shell panel style
-r, --remove,
-u, --uninstall Uninstall/Remove installed themes or links
-h, --help Show help -h, --help Show help
EOF EOF
} }
@@ -166,7 +169,7 @@ while [[ $# -gt 0 ]]; do
-d|--dest) -d|--dest)
dest="${2}" dest="${2}"
if [[ ! -d "${dest}" ]]; then if [[ ! -d "${dest}" ]]; then
echo "Destination directory does not exist. Let's make a new one..." echo -e "\nDestination directory does not exist. Let's make a new one..."
mkdir -p ${dest} mkdir -p ${dest}
fi fi
shift 2 shift 2
@@ -182,6 +185,27 @@ while [[ $# -gt 0 ]]; do
-l|--libadwaita) -l|--libadwaita)
libadwaita="true" libadwaita="true"
shift shift
for type in "${@}"; do
case "${type}" in
system)
echo -e "\nUse system default colors for light/dark mode switch."
shift
;;
fixed)
colortype='fixed'
echo -e "\nUse fixed theme colors but that will break light/dark mode switch."
shift
;;
-*|--*)
break
;;
*)
echo -e "\nERROR: Unrecognized type variant '$1'."
echo -e "\nTry '$0 --help' for more information."
exit 1
;;
esac
done
;; ;;
-c|--color) -c|--color)
shift shift
@@ -206,8 +230,8 @@ while [[ $# -gt 0 ]]; do
break break
;; ;;
*) *)
echo "ERROR: Unrecognized color variant '$1'." echo -e "\nERROR: Unrecognized color variant '$1'."
echo "Try '$0 --help' for more information." echo -e "\nTry '$0 --help' for more information."
exit 1 exit 1
;; ;;
esac esac
@@ -262,8 +286,8 @@ while [[ $# -gt 0 ]]; do
break break
;; ;;
*) *)
echo "ERROR: Unrecognized theme variant '$1'." echo -e "\nERROR: Unrecognized theme variant '$1'."
echo "Try '$0 --help' for more information." echo -e "\nTry '$0 --help' for more information."
exit 1 exit 1
;; ;;
esac esac
@@ -286,8 +310,8 @@ while [[ $# -gt 0 ]]; do
break break
;; ;;
*) *)
echo "ERROR: Unrecognized size variant '${1:-}'." echo -e "\nERROR: Unrecognized size variant '${1:-}'."
echo "Try '$0 --help' for more information." echo -e "\nTry '$0 --help' for more information."
exit 1 exit 1
;; ;;
esac esac
@@ -300,25 +324,25 @@ while [[ $# -gt 0 ]]; do
nord) nord)
colorscheme='true' colorscheme='true'
schemes+=("${SCHEME_VARIANTS[1]}") schemes+=("${SCHEME_VARIANTS[1]}")
echo -e "Nord ColorScheme version! ..." echo -e "\nNord ColorScheme version! ..."
shift shift
;; ;;
dracula) dracula)
colorscheme='true' colorscheme='true'
schemes+=("${SCHEME_VARIANTS[2]}") schemes+=("${SCHEME_VARIANTS[2]}")
echo -e "Dracula ColorScheme version! ..." echo -e "\nDracula ColorScheme version! ..."
shift shift
;; ;;
gruvbox) gruvbox)
colorscheme='true' colorscheme='true'
schemes+=("${SCHEME_VARIANTS[3]}") schemes+=("${SCHEME_VARIANTS[3]}")
echo -e "Gruvbox ColorScheme version! ..." echo -e "\nGruvbox ColorScheme version! ..."
shift shift
;; ;;
everforest) everforest)
colorscheme='true' colorscheme='true'
schemes+=("${SCHEME_VARIANTS[4]}") schemes+=("${SCHEME_VARIANTS[4]}")
echo -e "Everforest ColorScheme version! ..." echo -e "\nEverforest ColorScheme version! ..."
shift shift
;; ;;
all) all)
@@ -328,31 +352,31 @@ while [[ $# -gt 0 ]]; do
;; ;;
black) black)
blackness="true" blackness="true"
echo -e "Blackness version! ..." echo -e "\nBlackness version! ..."
shift shift
;; ;;
rimless) rimless)
rimless="true" rimless="true"
echo -e "Rimless version! ..." echo -e "\nRimless version! ..."
shift shift
;; ;;
normal) normal)
normal="true" normal="true"
window="-Normal" window="-Normal"
echo -e "Normal window button version! ..." echo -e "\nNormal window button version! ..."
shift shift
;; ;;
float) float)
float="true" float="true"
echo -e "Install Floating Gnome-Shell Panel version! ..." echo -e "\nInstall Floating Gnome-Shell Panel version! ..."
shift shift
;; ;;
-*) -*)
break break
;; ;;
*) *)
echo "ERROR: Unrecognized tweaks variant '$1'." echo -e "\nERROR: Unrecognized tweaks variant '$1'."
echo "Try '$0 --help' for more information." echo -e "\nTry '$0 --help' for more information."
exit 1 exit 1
;; ;;
esac esac
@@ -363,8 +387,8 @@ while [[ $# -gt 0 ]]; do
exit 0 exit 0
;; ;;
*) *)
echo "ERROR: Unrecognized installation option '$1'." echo -e "\nERROR: Unrecognized installation option '$1'."
echo "Try '$0 --help' for more information." echo -e "\nTry '$0 --help' for more information."
exit 1 exit 1
;; ;;
esac esac
@@ -444,6 +468,10 @@ color_schemes() {
fi fi
} }
color_type() {
sed -i "/\$colortype:/s/system/fixed/" "${SRC_DIR}/sass/_tweaks-temp.scss"
}
blackness_color() { blackness_color() {
sed -i "/\$blackness:/s/false/true/" "${SRC_DIR}/sass/_tweaks-temp.scss" sed -i "/\$blackness:/s/false/true/" "${SRC_DIR}/sass/_tweaks-temp.scss"
} }
@@ -515,6 +543,10 @@ theme_tweaks() {
compact_size compact_size
fi fi
if [[ "$colortype" = "fixed" ]] ; then
color_type
fi
if [[ "$colorscheme" = "true" ]] ; then if [[ "$colorscheme" = "true" ]] ; then
color_schemes color_schemes
fi fi
@@ -552,7 +584,7 @@ link_libadwaita() {
rm -rf "${HOME}/.config/gtk-4.0/"{assets,gtk.css,gtk-dark.css} rm -rf "${HOME}/.config/gtk-4.0/"{assets,gtk.css,gtk-dark.css}
echo -e "\nLink '$THEME_DIR/gtk-4.0' to '${HOME}/.config/gtk-4.0' for libadwaita..." echo -e "\nLink '${THEME_DIR}/gtk-4.0' to '${HOME}/.config/gtk-4.0' for libadwaita...\n"
mkdir -p "${HOME}/.config/gtk-4.0" mkdir -p "${HOME}/.config/gtk-4.0"
ln -sf "${THEME_DIR}/gtk-4.0/assets" "${HOME}/.config/gtk-4.0/assets" ln -sf "${THEME_DIR}/gtk-4.0/assets" "${HOME}/.config/gtk-4.0/assets"
@@ -572,13 +604,13 @@ libadwaita_theme() {
rm -rf "${HOME}/.config/gtk-4.0/"{assets,gtk.css,gtk-dark.css} rm -rf "${HOME}/.config/gtk-4.0/"{assets,gtk.css,gtk-dark.css}
echo -e "\nInstalling theme into '${HOME}/.config/gtk-4.0' for libadwaita..." echo -e "\nInstalling ${2}${3}${4}${5}${6} theme into '${HOME}/.config/gtk-4.0' for libadwaita..."
mkdir -p "${HOME}/.config/gtk-4.0" mkdir -p "${HOME}/.config/gtk-4.0"
cp -r "${SRC_DIR}/assets/gtk/assets" "${HOME}/.config/gtk-4.0" cp -r "${SRC_DIR}/assets/gtk/assets" "${HOME}/.config/gtk-4.0"
cp -r "${SRC_DIR}/assets/gtk/symbolics/"*'.svg' "${HOME}/.config/gtk-4.0/assets" cp -r "${SRC_DIR}/assets/gtk/symbolics/"*'.svg' "${HOME}/.config/gtk-4.0/assets"
if [[ "$colorscheme" = "true" || "$blackness" = "true" ]] ; then if [[ "$colorscheme" = "true" || "$blackness" = "true" || "$colortype" = "fixed" ]] ; then
sassc $SASSC_OPT "${SRC_DIR}/main/libadwaita/libadwaita${color}.scss" "${HOME}/.config/gtk-4.0/gtk.css" sassc $SASSC_OPT "${SRC_DIR}/main/libadwaita/libadwaita${color}.scss" "${HOME}/.config/gtk-4.0/gtk.css"
else else
sassc $SASSC_OPT "${SRC_DIR}/main/libadwaita/libadwaita-Light.scss" "${HOME}/.config/gtk-4.0/gtk.css" sassc $SASSC_OPT "${SRC_DIR}/main/libadwaita/libadwaita-Light.scss" "${HOME}/.config/gtk-4.0/gtk.css"
@@ -665,7 +697,8 @@ if [[ "$uninstall" == 'true' ]]; then
echo && uninstall_theme && uninstall_libadwaita echo && uninstall_theme && uninstall_libadwaita
fi fi
else else
install_package && tweaks_temp && gnome_shell_version && install_theme install_package && tweaks_temp
gnome_shell_version && echo && install_theme
if [[ "$libadwaita" == 'true' ]]; then if [[ "$libadwaita" == 'true' ]]; then
uninstall_libadwaita && install_libadwaita uninstall_libadwaita && install_libadwaita

View File

@@ -4,6 +4,9 @@
$colorscheme: 'default'; $colorscheme: 'default';
// Color type
$colortype: 'system'; // system/fixed : use system colors / use theme colors
// transparent opacity // transparent opacity
$opacity: 'default'; $opacity: 'default';

View File

@@ -8,7 +8,7 @@
// These are the colors apps are can override. We define the defaults here and // These are the colors apps are can override. We define the defaults here and
// define variables for them in _colors.scss // define variables for them in _colors.scss
@if $theme != 'default' { @if $theme != 'default' or $colortype == 'fixed' {
// The main accent color and the matching text value // The main accent color and the matching text value
@define-color accent_bg_color #{$primary}; @define-color accent_bg_color #{$primary};
@define-color accent_fg_color #{on($primary)}; @define-color accent_fg_color #{on($primary)};
@@ -33,7 +33,7 @@
@define-color error_fg_color #{on($error)}; @define-color error_fg_color #{on($error)};
@define-color error_color #{$error}; @define-color error_color #{$error};
@if $colorscheme != 'default' or $blackness == 'true' { @if $colorscheme != 'default' or $blackness == 'true' or $colortype == 'fixed' {
// Window // Window
@define-color window_bg_color #{$background}; @define-color window_bg_color #{$background};
@define-color window_fg_color #{$text}; @define-color window_fg_color #{$text};
@@ -45,7 +45,7 @@
// Header bar, search bar, tab bar // Header bar, search bar, tab bar
@define-color headerbar_bg_color #{$titlebar-backdrop}; @define-color headerbar_bg_color #{$titlebar-backdrop};
@define-color headerbar_fg_color #{$titlebar-text}; @define-color headerbar_fg_color #{$titlebar-text};
@define-color headerbar_border_color #{$border}; @define-color headerbar_border_color #{$titlebar-text};
@define-color headerbar_backdrop_color #{$titlebar}; @define-color headerbar_backdrop_color #{$titlebar};
@define-color headerbar_shade_color #{if($variant == 'light', transparentize(black, .88), transparentize(black, .64))}; @define-color headerbar_shade_color #{if($variant == 'light', transparentize(black, .88), transparentize(black, .64))};
@define-color headerbar_darker_shade_color #{$window-border}; @define-color headerbar_darker_shade_color #{$window-border};

View File

@@ -81,6 +81,10 @@ placesview {
filechooser { filechooser {
box-shadow: 0 1px $border_color; box-shadow: 0 1px $border_color;
#pathbarbox {
border-bottom: 1px solid $border_color;
}
// Make the toolbar buttons flat like on an actual toolbar // Make the toolbar buttons flat like on an actual toolbar
#pathbarbox > stack > box > { #pathbarbox > stack > box > {
button, button,

View File

@@ -20,8 +20,8 @@ tabbar {
} }
tabbox { tabbox {
padding-bottom: 6px; padding-bottom: $base_padding;
padding-top: 6px; padding-top: $base_padding;
min-height: 34px; min-height: 34px;
> tabboxchild { > tabboxchild {
@@ -30,8 +30,8 @@ tabbar {
} }
> separator { > separator {
margin-top: 3px; margin-top: 5px;
margin-bottom: 3px; margin-bottom: 5px;
transition: opacity 150ms ease-in-out; transition: opacity 150ms ease-in-out;
&.hidden { &.hidden {
@@ -69,7 +69,7 @@ tabbar {
.start-action, .start-action,
.end-action { .end-action {
padding: 6px 5px; padding: $base_padding;
} }
.start-action:dir(ltr), .start-action:dir(ltr),
@@ -110,8 +110,8 @@ tabbar {
tabbox, tabbox,
.start-action, .start-action,
.end-action { .end-action {
padding-top: 3px; padding-top: 0;
padding-bottom: 3px; padding-bottom: $base_padding;
} }
} }
@@ -139,7 +139,7 @@ dnd {
margin: 0; margin: 0;
min-width: 24px; min-width: 24px;
min-height: 24px; min-height: 24px;
border-radius: 99px; border-radius: $circular_radius;
} }
indicator { indicator {
@@ -159,7 +159,7 @@ tabthumbnail {
border-radius: $card_radius + 4px; border-radius: $card_radius + 4px;
> box { > box {
margin: 6px; margin: $base_padding;
} }
&:drop(active) { &:drop(active) {
@@ -178,7 +178,7 @@ tabthumbnail {
min-width: 12px; min-width: 12px;
min-height: 12px; min-height: 12px;
border-radius: 8px; border-radius: 8px;
margin: 3px; margin: $base_padding / 2;
box-shadow: 0 1px 2px gtkalpha($accent_color, .4); box-shadow: 0 1px 2px gtkalpha($accent_color, .4);
} }
} }
@@ -200,17 +200,17 @@ tabthumbnail {
} }
.icon-title-box { .icon-title-box {
border-spacing: 6px; border-spacing: $base_padding;
} }
.tab-unpin-icon { .tab-unpin-icon {
margin: 6px; margin: $base_padding;
min-width: 24px; min-width: 24px;
min-height: 24px; min-height: 24px;
} }
button.circular { button.circular {
margin: 6px; margin: $base_padding;
background-color: gtkalpha($thumbnail_bg_color, .75); background-color: gtkalpha($thumbnail_bg_color, .75);
min-width: 24px; min-width: 24px;
min-height: 24px; min-height: 24px;

View File

@@ -74,20 +74,20 @@
} }
.toolbar { .toolbar {
padding: 6px; padding: $base_padding;
border-spacing: 6px; border-spacing: $base_padding;
@extend %toolbar; @extend %toolbar;
// stand-alone OSD toolbars // stand-alone OSD toolbars
&.osd { &.osd {
padding: 12px; padding: $base_padding * 2;
border-radius: $card_radius; border-radius: $card_radius;
} }
} }
%toolbar-shrunk { %toolbar-shrunk {
padding-top: 3px; padding-top: $base_padding;
padding-bottom: 3px; padding-bottom: $base_padding;
} }
/**************** /****************
@@ -96,7 +96,7 @@
searchbar { searchbar {
> revealer > box { > revealer > box {
padding: 6px 6px 7px 6px; padding: $base_padding $base_padding $base_padding + 1px $base_padding;
background-color: $headerbar_backdrop_color; background-color: $headerbar_backdrop_color;
color: $headerbar_fg_color; color: $headerbar_fg_color;
box-shadow: inset 0 -1px $headerbar_border_color; box-shadow: inset 0 -1px $headerbar_border_color;
@@ -141,7 +141,7 @@ searchbar {
background-color: transparent; background-color: transparent;
color: inherit; color: inherit;
box-shadow: none; box-shadow: none;
padding-bottom: 6px; padding-bottom: $base_padding;
} }
%searchbar-inline { %searchbar-inline {
@@ -159,8 +159,8 @@ searchbar {
} }
%searchbar-shrunk > revealer > box { %searchbar-shrunk > revealer > box {
padding-top: 3px; padding-top: $base_padding;
padding-bottom: 3px; padding-bottom: $base_padding;
} }
/**************** /****************
@@ -171,7 +171,7 @@ actionbar > revealer > box {
background-color: $headerbar_backdrop_color; background-color: $headerbar_backdrop_color;
color: $headerbar_fg_color; color: $headerbar_fg_color;
box-shadow: inset 0 1px $headerbar_border_color; box-shadow: inset 0 1px $headerbar_border_color;
padding: 7px 6px 6px 6px; padding: $base_padding + 1px $base_padding $base_padding $base_padding;
@extend %toolbar; @extend %toolbar;
&, > box.start, > box.end { &, > box.start, > box.end {
@@ -207,8 +207,8 @@ actionbar > revealer > box {
} }
%actionbar-shrunk > revealer > box { %actionbar-shrunk > revealer > box {
padding-top: $base_padding / 2; padding-top: $base_padding;
padding-bottom: $base_padding / 2; padding-bottom: $base_padding;
} }
/************* /*************