Add monterey style

This commit is contained in:
Vince 2021-07-19 22:24:56 +08:00
parent b19f51e825
commit 7bf095f837
10 changed files with 125 additions and 64 deletions

100
README.md
View file

@ -47,39 +47,68 @@ Usage: `./install.sh [OPTIONS...]`
<details> <summary> Options </summary>
```bash
-d, --dest [DIR] # Set destination directory. Default is '/home/vince/.themes'
-d, --dest DIR
Set destination directory. Default is '/home/vince/.themes'
-n, --name [NAME] # Set theme name. Default is 'WhiteSur'
-n, --name NAME
Set theme name. Default is 'WhiteSur'
-o, --opacity [normal|solid] # Set theme opacity variants. Repeatable. Default is all variants
-o, --opacity [normal|solid]
Set theme opacity variants. Repeatable. Default is all variants
-c, --color [light|dark] # Set theme color variants. Repeatable. Default is all variants
-c, --color [light|dark]
Set theme color variants. Repeatable. Default is all variants
-a, --alt [normal|alt|all] # Set window control buttons variant. Repeatable. Default is 'normal'
-a, --alt [normal|alt|all]
Set window control buttons variant. Repeatable. Default is 'normal'
-t, --theme [default|blue|purple|pink|red|orange|yellow|green|grey|all] # Set theme accent color. Repeatable. Default is BigSur-like theme
-t, --theme [default|blue|purple|pink|red|orange|yellow|green|grey|all]
Set theme accent color. Repeatable. Default is BigSur-like theme
-p, --panel [default|30|45|60|75] # Set panel transparency. Default is 15%
-p, --panel [default|30|45|60|75]
Set panel transparency. Default is 15%
-s, --size [default|220|240|260|280] # Set Nautilus sidebar minimum width. Default is 200px
-s, --size [default|180|220|240|260|280]
Set Nautilus sidebar minimum width. Default is 200px
-i, --icon [standard|simple|gnome|ubuntu|arch|manjaro|fedora|debian|void] # Set 'Activities' icon. Default is 'standard'
-i, --icon [standard|simple|gnome|ubuntu|arch|manjaro|fedora|debian|void]
Set 'Activities' icon. Default is 'standard'
-b, --background [default|blank|IMAGE_PATH] # Set gnome-shell background image. Default is BigSur-like wallpaper
-b, --background [default|blank|IMAGE_PATH]
Set gnome-shell background image. Default is BigSur-like wallpaper
-N, --nautilus-style [stable|normal|mojave|glassy] # Set Nautilus style. Default is stable (stabled sidebar)
-m, --monterey
Set to MacOS Monterey style.
--round, --roundedmaxwindow # Set maximized window to rounded. Default is square
-N, --nautilus-style [stable|normal|mojave|glassy]
Set Nautilus style. Default is BigSur-like style (stabled sidebar)
--right, --rightplacement # Set Nautilus titlebutton placement style to right. Default is left
-HD, --highdefinition
Set to High Definition size. Default is laptop size
--normal, --normalshowapps # Set gnome-shell show apps button style to normal. Default is bigsur
--normal, --normalshowapps
Set gnome-shell show apps button style to normal. Default is bigsur
--dialog, --interactive # Run this installer interactively, with dialogs.
--round, --roundedmaxwindow
Set maximized window to rounded. Default is square
-r, --remove, -u, --uninstall # Remove all installed WhiteSur themes.
--right, --rightplacement
Set Nautilus titlebutton placement to right. Default is left
-h, --help # Show this help.
--black, --blackfont
Set panel font color to black. Default is white
--dialog, --interactive
Run this installer interactively, with dialogs.
--silent-mode
Meant for developers: ignore any confirm prompt and params become more strict.
-r, --remove, -u, --uninstall
Remove all installed WhiteSur themes.
-h, --help
Show this help.
```
</details>
@ -144,53 +173,56 @@ Usage: `./tweaks.sh [OPTIONS...]`
<details> <summary> Options </summary>
```bash
-f, --firefox
# Install 'WhiteSur' theme for Firefox and connect it to the current Firefox profiles.
-f, --firefox [default|monterey]
Install 'WhiteSur|Monterey' theme for Firefox and connect it to the current Firefox profiles. Default is WhiteSur
-e, --edit-firefox
# Edit 'WhiteSur' theme for Firefox settings and also connect the theme to the current Firefox profiles.
Edit 'WhiteSur' theme for Firefox settings and also connect the theme to the current Firefox profiles.
-F, --flatpak
# Connect 'WhiteSur' theme to Flatpak.
Connect 'WhiteSur' theme to Flatpak.
-s, --snap
# Connect 'WhiteSur' theme the currently installed snap apps.
Connect 'WhiteSur' theme the currently installed snap apps.
-g, --gdm
# Install 'WhiteSur' theme for GDM. Requires to run this shell as root
Install 'WhiteSur' theme for GDM. Requires to run this shell as root
-d, --dash-to-dock
# Install 'WhiteSur' theme for Dash to Dock and connect it to the current Dash to Dock installation(s).
Install 'WhiteSur' theme for Dash to Dock and connect it to the current Dash to Dock installation(s).
-N, --no-darken
# Don't darken 'WhiteSur' GDM theme background image.
Don't darken 'WhiteSur' GDM theme background image.
-n, --no-blur
# Don't blur 'WhiteSur' GDM theme background image.
Don't blur 'WhiteSur' GDM theme background image.
-b, --background [default|blank|IMAGE_PATH]
# Set 'WhiteSur' GDM theme background image. Default is BigSur-like wallpaper
Set 'WhiteSur' GDM theme background image. Default is BigSur-like wallpaper
-o, --opacity [normal|solid]
# Set 'WhiteSur' GDM theme opacity variants. Default is 'normal'
Set 'WhiteSur' GDM theme opacity variants. Default is 'normal'
-c, --color [light|dark]
# Set 'WhiteSur' GDM and Dash to Dock theme color variants. Default is 'light'
Set 'WhiteSur' GDM and Dash to Dock theme color variants. Default is 'light'
-t, --theme [default|blue|purple|pink|red|orange|yellow|green|grey]
# Set 'WhiteSur' GDM theme accent color. Default is BigSur-like theme
Set 'WhiteSur' GDM theme accent color. Default is BigSur-like theme
-p, --panel [default|30|45|60|75]
# Set 'WhiteSur' GDM (GNOME Shell) theme panel transparency. Default is 15%
Set 'WhiteSur' GDM (GNOME Shell) theme panel transparency. Default is 15%
-i, --icon [standard|simple|gnome|ubuntu|arch|manjaro|fedora|debian|void]
# Set 'WhiteSur' GDM (GNOME Shell) 'Activities' icon. Default is 'standard'
Set 'WhiteSur' GDM (GNOME Shell) 'Activities' icon. Default is 'standard'
-r, --remove, --revert
# Revert to the original themes, do the opposite things of install and connect.
Revert to the original themes, do the opposite things of install and connect.
--silent-mode
Meant for developers: ignore any confirm prompt and params become more strict.
-h, --help
# Show this help.
Show this help.
```
</details>

View file

@ -32,17 +32,17 @@ usage() {
helpify "-p, --panel" "[$(IFS='|'; echo "${PANEL_OPACITY_VARIANTS[*]}")]" "Set panel transparency" "Default is 15%"
helpify "-s, --size" "[$(IFS='|'; echo "${SIDEBAR_SIZE_VARIANTS[*]}")]" "Set Nautilus sidebar minimum width" "Default is 200px"
helpify "-i, --icon" "[$(IFS='|'; echo "${ICON_VARIANTS[*]}")]" "Set 'Activities' icon" "Default is 'standard'"
# Not sure if "background" is even needed here
helpify "-b, --background" "[default|blank|IMAGE_PATH]" "Set gnome-shell background image" "Default is BigSur-like wallpaper"
helpify "-m, --monterey" "" "Set to MacOS Monterey style"
helpify "-N, --nautilus-style" "[$(IFS='|'; echo "${NAUTILUS_STYLE_VARIANTS[*]}")]" "Set Nautilus style" "Default is BigSur-like style (stabled sidebar)"
helpify "-HD, --highdefinition" "" "Set to High Definition size" "Default is laptop size"
helpify "--normal, --normalshowapps" "" "Set gnome-shell show apps button style to normal" "Default is bigsur"
helpify "--round, --roundedmaxwindow" "" "Set maximized window to rounded" "Default is square"
helpify "--right, --rightplacement" "" "Set Nautilus titlebutton placement style to right" "Default is left"
helpify "--normal, --normalshowapps" "" "Set gnome-shell show apps button style to normal" "Default is bigsur"
helpify "--right, --rightplacement" "" "Set Nautilus titlebutton placement to right" "Default is left"
helpify "--black, --blackfont" "" "Set panel font color to black" "Default is white"
helpify "--dialog, --interactive" "" "Run this installer interactively, with dialogs" ""
helpify "-r, --remove, -u, --uninstall" "" "Remove all installed ${THEME_NAME} themes" ""
helpify "--silent-mode" "" "Meant for developers: ignore any confirm prompt and params become more strict" ""
helpify "-r, --remove, -u, --uninstall" "" "Remove all installed ${THEME_NAME} themes" ""
helpify "-h, --help" "" "Show this help" ""
}
@ -72,16 +72,18 @@ while [[ $# -gt 0 ]]; do
full_sudo "${1}"; silent_mode='true'; shift ;;
--dialog|--interactive)
interactive='true'; shift ;;
-h|--help)
need_help="true"; shift ;;
--normal|--normalshowapps)
showapps_normal="true"; shift ;;
--right|--rightplacement)
right_placement="true"; shift ;;
--round|--roundedmaxwindow)
max_round="true"; shift ;;
--black|--blackfont)
black_font="true"; shift ;;
-HD|--highdefinition)
compact="false"; shift ;;
-m|--monterey)
monterey="true"; shift ;;
# Parameters that require value, single use
-b|--background)
check_param "${1}" "${1}" "${2}" "must" "must" "must" "false" && shift 2 || shift ;;
@ -106,6 +108,8 @@ while [[ $# -gt 0 ]]; do
check_param "${1}" "${1}" "${2}" "not-at-all" "must" "must" && shift 2 || shift ;;
-t|--theme)
check_param "${1}" "${1}" "${2}" "not-at-all" "must" "must" && shift 2 || shift ;;
-h|--help)
need_help="true"; shift ;;
*)
prompt -e "ERROR: Unrecognized installation option '${1}'."
has_any_error="true"; shift ;;

View file

@ -345,6 +345,7 @@ install_shelly() {
cp -r "${THEME_SRC_DIR}/assets/gnome-shell/assets${color}/"*".svg" "${TARGET_DIR}/assets"
cp -r "${THEME_SRC_DIR}/assets/gnome-shell/activities/activities${icon}.svg" "${TARGET_DIR}/assets/activities.svg"
cp -r "${THEME_SRC_DIR}/assets/gnome-shell/activities/activities${icon}.svg" "${TARGET_DIR}/assets/activities-white.svg"
cp -r "${WHITESUR_TMP_DIR}/beggy.png" "${TARGET_DIR}/assets/background.png"
(
@ -354,9 +355,8 @@ install_shelly() {
mv -f "assets/no-notifications.svg" "no-notifications.svg"
)
if [[ "${alt}" == '-alt' || "${opacity}" == '-solid' ]] && [[ "${color}" == '-light' ]]; then
if [[ "${black_font:-}" == 'true' || "${opacity}" == '-solid' ]] && [[ "${color}" == '-light' ]]; then
cp -r "${THEME_SRC_DIR}/assets/gnome-shell/activities-black/activities${icon}.svg" "${TARGET_DIR}/assets/activities.svg"
cp -r "${THEME_SRC_DIR}/assets/gnome-shell/activities/activities${icon}.svg" "${TARGET_DIR}/assets/activities-white.svg"
fi
}
@ -716,16 +716,14 @@ gtk_base() {
cp -rf "${THEME_SRC_DIR}/sass/_gtk-base"{".scss","-temp.scss"}
# Theme base options
sed $SED_OPT "/\$laptop/s/false/${compact}/" "${THEME_SRC_DIR}/sass/_gtk-base-temp.scss"
if [[ "${compact}" == 'false' ]]; then
sed $SED_OPT "/\$laptop/s/true/false/" "${THEME_SRC_DIR}/sass/_gtk-base-temp.scss"
fi
if [[ "${opacity}" == 'solid' ]]; then
sed $SED_OPT "/\$trans/s/true/false/" "${THEME_SRC_DIR}/sass/_gtk-base-temp.scss"
fi
if [[ "${color}" == 'light' && ${opacity} == 'solid' ]]; then
sed $SED_OPT "/\$black/s/false/true/" "${THEME_SRC_DIR}/sass/_gtk-base-temp.scss"
fi
if [[ "${theme}" != '' ]]; then
sed $SED_OPT "/\$theme/s/default/${theme}/" "${THEME_SRC_DIR}/sass/_gtk-base-temp.scss"
fi
@ -774,6 +772,20 @@ customize_theme() {
sed $SED_OPT "/\$max_window_style/s/square/round/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss"
fi
# Change panel font color
if [[ "${monterey}" == 'true' ]]; then
black_font="true"
prompt -s "Changing to montery style ..."
sed $SED_OPT "/\$monterey/s/false/true/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss"
sed $SED_OPT "/\$panel_opacity/s/0.15/0.5/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss"
fi
# Change panel font color
if [[ "${black_font}" == 'true' ]]; then
prompt -s "Changing panel font color ..."
sed $SED_OPT "/\$panel_font/s/white/black/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss"
fi
if [[ "${compact}" == 'false' ]]; then
prompt -s "Changing Definition mode to HD (Bigger font, Bigger size) ..."
#FIXME: @vince is it not implemented yet? (Only Gnome-shell and Gtk theme finished!)

View file

@ -16,6 +16,7 @@
<file>assets/window-close-active.svg</file>
<file>assets/window-close-symbolic.svg</file>
<file>assets/activities.svg</file>
<file>assets/activities-white.svg</file>
<file>assets/view-app-grid.svg</file>
<file>assets/background.png</file>
<file>icons/scalable/actions/color-pick.svg</file>

View file

@ -158,10 +158,18 @@ $submenu_bg_color: if($variant == 'light', rgba(white, 1), rgba
// Panel colors
$panel_bg: if($variant == 'light', #f1f1f1, #2a2a2a);
$panel_fg: if($trans == 'true', white, $text_color);
@if $trans == 'true' { $panel_bg: if($variant == 'light', rgba(white, $panel_opacity/2 + 0.08), rgba(black, $panel_opacity)); }
@if $black == 'true' { $panel_fg: $text_color; }
@if $trans == 'true' {
$panel_bg: if($variant == 'light', rgba(white, $panel_opacity/2 + 0.08), rgba(black, $panel_opacity));
}
$panel_fg: if($trans == 'true' and $panel_font == 'white', $light_fg_color, $text_color);
$panel_alt_fg: if($trans == 'true' and $panel_font == 'white', $light_alt_fg_color, $alt_fg_color);
$panel_hint_fg: if($trans == 'true' and $panel_font == 'white', $light_hint_fg_color, $hint_fg_color);
$panel_disabled_fg: if($trans == 'true' and $panel_font == 'white', $light_disabled_fg_color, $disabled_fg_color);
$panel_alt_disabled_fg: if($trans == 'true' and $panel_font == 'white', $light_alt_disabled_fg_color, $alt_disabled_fg_color);
$panel_track: if($trans == 'true' and $panel_font == 'white', $light_track_color, $track_color);
$panel_divider: if($trans == 'true' and $panel_font == 'white', $light_divider_color, $divider_color);
$dash_bg: if($variant == 'light', rgba(#d1d1d1, $panel_opacity + 0.33), rgba(#222222, $panel_opacity/2 + 0.6));
$dash_fg: if($variant == 'light', black, white);

View file

@ -1,5 +1,4 @@
// Theme base options
$laptop: 'false';
$laptop: 'true';
$trans: 'true';
$black: 'false'; // panel font color
$theme: 'default';

View file

@ -17,5 +17,11 @@ $panel_opacity: 0.15;
// Gnome-shell show apps button style
$showapps_button: 'bigsur';
// maximized window radius
// Maximized window radius
$max_window_style: 'square';
// Panel font color
$panel_font: 'white';
// Monterey style
$monterey: 'false';

View file

@ -77,8 +77,6 @@ $button_transition: all $shorter_duration $ease-out-quad;
$backdrop_transition: $longer_duration ease-out;
// Shadow
$panel_shadow: 0 0 10px rgba(black, 0.35), 0 0 24px rgba(black, 0.30);
$panel_asset_shadow: 0 1px 3px 3px rgba(black, 0.15);
$shadow_0: 0 1px 2px 0 rgba(black, 0.1), 0 2px 2px 0 rgba(black, 0.05); // Slider hover shadow
$shadow_1: 0 1px 1px 0 rgba(black, 0.12), 0 1px 2px 0 rgba(black, 0.06); // Header-button shadow
$shadow_2: 0 1px 1px 0 rgba(black, 0.1), 0 1px 2px 0 rgba(black, 0.05); // Slider normal shadow
@ -86,6 +84,5 @@ $shadow_3: 0 1px 1px 0 rgba(black, 0.03), 0 1px 2px 0 rgba(black, 0.01); // N
$shadow_4: 0 2px 3px 0 rgba(black, 0.2), 0 3px 5px 0 rgba(black, 0.15); // Switch-slider hover shadow
$shadow_5: 0 1px 2px 0 rgba(black, 0.15), 0 2px 3px 0 rgba(black, 0.1); // Switch-slider normal shadow
$shadow_6: 0 0 8px rgba(black, 0.2), 0 0 4px rgba(black, 0.3); // Switch-slider normal shadow
$text_shadow: 0 -1px rgba(white, 0.04), -1px 0 rgba(black, 0.05),
1px 0 rgba(black, 0.05), 0 1px rgba(black, 0.3),
0 2px rgba(black, 0.05); // text and icon shadow
$panel_asset_shadow: if($monterey == 'true' or $trans == 'false', none, 0 1px 3px 3px rgba(black, 0.15));

View file

@ -12,7 +12,7 @@ $popover_bubble_bg: if($variant == 'light', rgba(white, 0.95), rgba(lighten($bas
&:hover, &:focus {
color: $fg_color;
background-color: if($variant == 'light', rgba($popover_bubble_bg, 1), rgba(lighten($popover_bubble_bg, 5%), 1));
box-shadow: 0 3px 5px rgba(black, 0.1);
box-shadow: 0 2px 3px rgba(black, 0.1) !important;
}
&:active {

View file

@ -80,12 +80,12 @@
&:hover {
color: $panel_fg;
background-color: if($trans == 'false' and $variant == 'light', $divider_color, $light_divider_color);
background-color: $panel_divider;
}
&:active, &:overview, &:focus, &:checked {
&, &:hover {
background-color: if($trans == 'false' and $variant == 'light', $track_color, $light_track_color);
background-color: $panel_track;
color: $panel_fg;
box-shadow: none;
}
@ -217,9 +217,11 @@
// > * { background-image: url("assets/activities-active.svg"); }
}
@if $variant == 'light' and $black == 'true' {
&:overview {
> * { background-image: url("assets/activities-white.svg"); }
@if $variant == 'light' {
@if $panel_font == 'black' or $trans == 'false' {
&:overview {
> * { background-image: url("assets/activities-white.svg"); }
}
}
}
}