This commit is contained in:
vinceliuice 2024-10-13 16:39:26 +08:00
parent e131037d66
commit 9c6b85c5bd
7 changed files with 153 additions and 159 deletions

134
README.md
View File

@ -64,8 +64,9 @@ Usage: `./install.sh [OPTIONS...]`
```bash ```bash
OPTIONS:
-d, --dest DIR -d, --dest DIR
Set destination directory. Default is '/home/USER/.themes' Set destination directory. Default is '/home/vince/.themes'
-n, --name NAME -n, --name NAME
Set theme name. Default is 'WhiteSur' Set theme name. Default is 'WhiteSur'
@ -73,7 +74,7 @@ Usage: `./install.sh [OPTIONS...]`
-o, --opacity [normal|solid] -o, --opacity [normal|solid]
Set theme opacity variants. Repeatable. Default is all variants Set theme opacity variants. Repeatable. Default is all variants
-c, --color [Light|Dark] -c, --color [light|dark]
Set theme color variants. Repeatable. Default is all variants Set theme color variants. Repeatable. Default is all variants
-a, --alt [normal|alt|all] -a, --alt [normal|alt|all]
@ -82,10 +83,13 @@ Usage: `./install.sh [OPTIONS...]`
-t, --theme [default|blue|purple|pink|red|orange|yellow|green|grey|all] -t, --theme [default|blue|purple|pink|red|orange|yellow|green|grey|all]
Set theme accent color. Repeatable. Default is BigSur-like theme Set theme accent color. Repeatable. Default is BigSur-like theme
-s, --size [default|180|220|240|260|280]
Set Nautilus (version lower than 40.0) sidebar minimum width. Default is 200px
-m, --monterey -m, --monterey
Set to MacOS Monterey style. Set to MacOS Monterey style.
-N, --nautilus [stable|normal|mojave|glassy] -N, --nautilus [stable|normal|mojave|glassy|right]
Set Nautilus style. Default is BigSur-like style (stabled sidebar) Set Nautilus style. Default is BigSur-like style (stabled sidebar)
-l, --libadwaita -l, --libadwaita
@ -94,7 +98,7 @@ Usage: `./install.sh [OPTIONS...]`
-HD, --highdefinition -HD, --highdefinition
Set to High Definition size. Default is laptop size Set to High Definition size. Default is laptop size
--shell, --gnome-shell --shell, --gnomeshell
Tweaks for gnome-shell. Options: Tweaks for gnome-shell. Options:
1. -i, -icon [apple|simple|gnome|ubuntu|tux|arch|manjaro|fedora|debian|void|opensuse|popos|mxlinux|zorin|budgie|gentoo] 1. -i, -icon [apple|simple|gnome|ubuntu|tux|arch|manjaro|fedora|debian|void|opensuse|popos|mxlinux|zorin|budgie|gentoo]
@ -106,11 +110,11 @@ Usage: `./install.sh [OPTIONS...]`
3. -p, -panelopacity [default|30|45|60|75] 3. -p, -panelopacity [default|30|45|60|75]
Set gnome-shell panel transparency. Default is 15% Set gnome-shell panel transparency. Default is 15%
4. -h, -height [default|smaller|bigger] 4. -h, -panelheight [default|smaller|bigger]
Set gnome-shell panel height size. Default is 32px Set gnome-shell panel height size. Default is 32px
5. -g, -general, -normal 5. -n, -normal
Set gnome-shell show apps button style to general/normal. Default is BigSur Set gnome-shell show apps button style to normal. Default is BigSur
6. -s, -smaller 6. -s, -smaller
Set gnome-shell font size to smaller (10pt). Default is 11pt Set gnome-shell font size to smaller (10pt). Default is 11pt
@ -118,9 +122,6 @@ Usage: `./install.sh [OPTIONS...]`
--round, --roundedmaxwindow --round, --roundedmaxwindow
Set maximized window to rounded. Default is square Set maximized window to rounded. Default is square
--right, --rightplacement
Set Nautilus title button placement to right. Default is left
--black, --blackfont --black, --blackfont
Set panel font color to black. Default is white Set panel font color to black. Default is white
@ -162,33 +163,17 @@ Run this command to install `WhiteSur` into `gtk-4.0 configuration folder` ($HOM
```bash ```bash
./install.sh -l # Default is the normal dark theme ./install.sh -l # Default is the normal dark theme
./install.sh -l -c Light # install light theme for libadwaita ./install.sh -l -c light # install light theme for libadwaita
``` ```
### Fix for Flatpak
```sh
sudo flatpak override --filesystem=xdg-config/gtk-3.0 && sudo flatpak override --filesystem=xdg-config/gtk-4.0
```
If you use flatpak apps, you can run this to fix theme issue
### Connect WhiteSur theme to Flatpak (gtk 3.0) (Snap not support)
Parameter: `--flatpak` `-F`
Example: `./tweaks.sh -F`
### <p align="center"> <b> Change theme color and accent </b> </p>
<p align="center"> <img src="https://github.com/vinceliuice/WhiteSur-gtk-theme/blob/pictures/pictures/colors-themes.png"/> </p>
#### Install theme color #### Install theme color
Parameter: `--color` `-c` (repeatable) Parameter: `--color` `-c` (repeatable)
Example: Example:
```bash ```bash
./install.sh -c Light # install light theme color only ./install.sh -c light # install light theme color only
./install.sh -c Dark -c Light # install dark and light theme colors ./install.sh -c dark -c light # install dark and light theme colors
``` ```
#### Install theme accent #### Install theme accent
@ -205,7 +190,7 @@ Example:
### <p align="center"> <b> Change Nautilus style </b> </p> ### <p align="center"> <b> Change Nautilus style </b> </p>
<p align="center"> <img src="https://github.com/vinceliuice/WhiteSur-gtk-theme/blob/pictures/pictures/nautilus.png"/> </p> <p align="center"> <img src="https://github.com/vinceliuice/WhiteSur-gtk-theme/blob/pictures/pictures/nautilus.png"/> </p>
Parameter: `--nautilus-style` `-N` Parameter: `--nautilus` `-N`
Example: `./install.sh -N mojave` Example: `./install.sh -N mojave`
@ -220,42 +205,40 @@ Usage: `./tweaks.sh [OPTIONS...]`
<details> <summary> Options <b>(click to open)</b> </summary> <details> <summary> Options <b>(click to open)</b> </summary>
```bash ```bash
[GDM theme]... options
-g, --gdm [default|x2]
Install 'WhiteSur' theme for GDM (scaling: 100%/200%, default is 100%). Requires to run this shell as root
OPTIONS:
-o, --opacity [normal|solid] -o, --opacity [normal|solid]
Set 'WhiteSur' GDM theme opacity variants. Default is 'normal' Set 'WhiteSur' GDM/Flatpak theme opacity variants. Default is 'normal'
-c, --color [Light|Dark] -c, --color [light|dark]
Set 'WhiteSur' GDM and Dash to Dock theme color variants. Default is 'light' Set 'WhiteSur' GDM/Flatpak theme color variants. Default is 'light'
-t, --theme [default|blue|purple|pink|red|orange|yellow|green|grey] -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/Flatpak theme accent color. Default is BigSur-like theme
-N, --no-darken
Don't darken 'WhiteSur' GDM theme background image.
-n, --no-blur Tweaks for GDM theme. options
Don't blur 'WhiteSur' GDM theme background image.
-b, --background [default|blank|IMAGE_PATH] -g, --gdm Without options default GDM theme will install...
Set 'WhiteSur' GDM theme background image. Default is BigSur-like wallpaper
-p, --panel-opacity [default|30|45|60|75] 1. -i, -icon [apple|simple|gnome|ubuntu|tux|arch|manjaro|fedora|debian|void|opensuse|popos|mxlinux|zorin|budgie|gentoo] Set GDM panel 'Activities' icon Default is 'standard'
Set 'WhiteSur' GDM (GNOME Shell) theme panel transparency. Default is 15%
-P, --panel-size [default|smaller|bigger] 2. -b, -background [default|blank|IMAGE_PATH] Set GDM background image Default is BigSur-like wallpaper
Set 'WhiteSur' Gnome shell panel height size. Default is 32px
-i, --icon [apple|simple|gnome|ubuntu|tux|arch|manjaro|fedora|debian|void|opensuse|popos|mxlinux|zorin|budgie|gentoo] 3. -p, -panelopacity [default|30|45|60|75] Set GDM panel transparency Default is 15%
Set 'WhiteSur' GDM (GNOME Shell) 'Activities' icon. Default is 'standard'
--nord, --nordcolor 4. -h, -panelheight [default|smaller|bigger] Set GDM panel height size Default is 32px
Install 'WhiteSur' Nord ColorScheme themes.
[Others]... options 5. -s, -smaller Set GDM font size to smaller (10pt) Default is 11pt
6. -nd, -nodarken Don't darken 'WhiteSur' GDM theme background image
7. -nb, -noblur Don't blur 'WhiteSur' GDM theme background image
8. -nord, -nordcolor Install 'WhiteSur' Nord ColorScheme gnome-shell themes
Tweaks for firefox. options
-f, --firefox [(monterey|flat)|alt|(darker|adaptive)] Without options default WhiteSur theme will install... Options: -f, --firefox [(monterey|flat)|alt|(darker|adaptive)] Without options default WhiteSur theme will install... Options:
@ -263,17 +246,25 @@ Usage: `./tweaks.sh [OPTIONS...]`
2. flat Monterey alt version Flat round tabs... 2. flat Monterey alt version Flat round tabs...
3. alt Alt window control buttons version Alt window control buttons style like gtk theme 3. alt Alt windows button version Alt windows button style like gtk theme
4. darker Darker Firefox theme version Darker theme according to darker gtk theme 4. darker Darker Firefox theme version Darker Firefox theme version
5. adaptive Adaptive color version You need install adaptive-tab-bar-colour plugin first https://addons.mozilla.org/firefox/addon/adaptive-tab-bar-colour/ 5. adaptive Adaptive color version You need install adaptive-tab-bar-colour plugin first https://addons.mozilla.org/firefox/addon/adaptive-tab-bar-colour/
-e, --edit-firefox [(monterey|flat)|alt|(darker|adaptive)] -e, --edit-firefox [(monterey|flat)|alt|(darker|adaptive)]
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 Support options: [-o, -c, -t...]
Connect 'WhiteSur' theme to Flatpak. Without options will only install default themes Others. options
-F, --flatpak Support options: [-o, -c, -t...] Connect 'WhiteSur' theme to Flatpak Without options will only install default themes
1. -o, --opacity [normal|solid] Set 'WhiteSur' flatpak theme opacity variants Default is 'normal'
2. -c, --color [Light|Dark] Set 'WhiteSur' flatpak theme color variants Default is 'light'
3. -t, --theme [default|blue|purple|pink|red|orange|yellow|green|grey] Set 'WhiteSur' flatpak theme accent color Default is BigSur-like theme
-d, --dash-to-dock -d, --dash-to-dock
Fixed Dash to Dock theme issue. Fixed Dash to Dock theme issue.
@ -286,6 +277,7 @@ Usage: `./tweaks.sh [OPTIONS...]`
-h, --help -h, --help
Show this help. Show this help.
``` ```
</details> </details>
@ -333,23 +325,23 @@ sudo ./tweaks.sh -g -b blank # make it blank
``` ```
#### Don't darken the background #### Don't darken the background
Parameter: `--no-darken` `-N` Parameter: `--nodarken` `-nd`
Example: Example:
```bash ```bash
sudo ./tweaks.sh -g -N # darken the default background sudo ./tweaks.sh -g -nd # darken the default background
sudo ./tweaks.sh -g -N -b "wallpapers/snow.jpg" # darken the custom background sudo ./tweaks.sh -g -nd -b "wallpapers/snow.jpg" # darken the custom background
``` ```
#### Don't blur the background #### Don't blur the background
Parameter: `--no-blur` `-n` Parameter: `--noblur` `-nb`
Example: Example:
```bash ```bash
sudo ./tweaks.sh -g -n # don't blur the default background sudo ./tweaks.sh -g -nb # don't blur the default background
sudo ./tweaks.sh -g -n -b "wallpapers/rocks.jpg" # don't blur the custom background sudo ./tweaks.sh -g -nb -b "wallpapers/rocks.jpg" # don't blur the custom background
``` ```
#### Do more GDM customizations #### Do more GDM customizations
@ -357,6 +349,22 @@ You can do [the similar customization features in `./install.sh`](#theres-so-man
like changing theme color (dark and light variant) and accent, GNOME Shell like changing theme color (dark and light variant) and accent, GNOME Shell
'Activities' icon, etc. related to GDM. Run `./tweaks.sh -h` to explore! 'Activities' icon, etc. related to GDM. Run `./tweaks.sh -h` to explore!
### Fix for Flatpak
```sh
sudo flatpak override --filesystem=xdg-config/gtk-3.0 && sudo flatpak override --filesystem=xdg-config/gtk-4.0
```
If you use flatpak apps, you can run this to fix theme issue
### Connect WhiteSur theme to Flatpak (gtk 3.0) (Snap not support)
Parameter: `--flatpak` `-F`
Example: `./tweaks.sh -F`
### <p align="center"> <b> Change theme color and accent </b> </p>
<p align="center"> <img src="https://github.com/vinceliuice/WhiteSur-gtk-theme/blob/pictures/pictures/colors-themes.png"/> </p>
## Other recommended stuff ## Other recommended stuff
### WhiteSur Icon Theme ### WhiteSur Icon Theme
<p align="center"> <a href="https://github.com/vinceliuice/WhiteSur-icon-theme"> <p align="center"> <a href="https://github.com/vinceliuice/WhiteSur-icon-theme">

View File

@ -26,26 +26,25 @@ usage() {
helpify "-d, --dest" "DIR" " Set destination directory" "Default is '${THEME_DIR}'" helpify "-d, --dest" "DIR" " Set destination directory" "Default is '${THEME_DIR}'"
helpify "-n, --name" "NAME" " Set theme name" "Default is '${THEME_NAME}'" helpify "-n, --name" "NAME" " Set theme name" "Default is '${THEME_NAME}'"
helpify "-o, --opacity" "[$(IFS='|'; echo "${OPACITY_VARIANTS[*]}")]" " Set theme opacity variants" "Repeatable. Default is all variants" helpify "-o, --opacity" "[$(IFS='|'; echo "${OPACITY_VARIANTS[*]}")]" " Set theme opacity variants" "Repeatable. Default is all variants"
helpify "-c, --color" "[$(IFS='|'; echo "${COLOR_VARIANTS[*]}")]" " Set theme color variants" "Repeatable. Default is all variants" helpify "-c, --color" "[$(IFS='|'; echo "${COMMAND_COLOR_VARIANTS[*]}")]" " Set theme color variants" "Repeatable. Default is all variants"
helpify "-a, --alt" "[$(IFS='|'; echo "${ALT_VARIANTS[*]}")|all]" " Set window control buttons variant" "Repeatable. Default is 'normal'" helpify "-a, --alt" "[$(IFS='|'; echo "${ALT_VARIANTS[*]}")|all]" " Set window control buttons variant" "Repeatable. Default is 'normal'"
helpify "-t, --theme" "[$(IFS='|'; echo "${THEME_VARIANTS[*]}")|all]" " Set theme accent color" "Repeatable. Default is BigSur-like theme" helpify "-t, --theme" "[$(IFS='|'; echo "${THEME_VARIANTS[*]}")|all]" " Set theme accent color" "Repeatable. Default is BigSur-like theme"
# helpify "-s, --size" "[$(IFS='|'; echo "${SIDEBAR_SIZE_VARIANTS[*]}")]" "Set Nautilus sidebar minimum width" "Default is 200px" helpify "-s, --size" "[$(IFS='|'; echo "${SIDEBAR_SIZE_VARIANTS[*]}")]" " Set Nautilus (version < 40.0) sidebar minimum width" "Default is 200px"
helpify "-m, --monterey" "" " Set to MacOS Monterey style" "" helpify "-m, --monterey" "" " Set to MacOS Monterey style" ""
helpify "-N, --nautilus" "[$(IFS='|'; echo "${NAUTILUS_STYLE_VARIANTS[*]}")]" " Set Nautilus style" "Default is BigSur-like style (stabled sidebar)" helpify "-N, --nautilus" "[$(IFS='|'; echo "${NAUTILUS_STYLE_VARIANTS[*]}")]" " Set Nautilus style" "Default is BigSur-like style (stabled sidebar)"
helpify "-l, --libadwaita" "" " Install theme into gtk4.0 config for libadwaita" "Default is dark version" helpify "-l, --libadwaita" "" " Install theme into gtk4.0 config for libadwaita" "Default is dark version"
helpify "-HD, --highdefinition" "" " Set to High Definition size" "Default is laptop size" helpify "-HD, --highdefinition" "" " Set to High Definition size" "Default is laptop size"
helpify "--shell, --gnome-shell" "" " Tweaks for gnome-shell" "Options:" helpify "--shell, --gnomeshell" "" " Tweaks for gnome-shell" "Options:"
helpify " 1. -i, -icon" "[$(IFS='|'; echo "${ICON_VARIANTS[*]}")]" " Set gnome-shell panel 'Activities' icon" "Default is 'standard'" helpify " 1. -i, -icon" "[$(IFS='|'; echo "${ICON_VARIANTS[*]}")]" " Set gnome-shell panel 'Activities' icon" "Default is 'standard'"
helpify " 2. -b, -background" "[default|blank|IMAGE_PATH]" " Set gnome-shell background image" "Default is BigSur-like wallpaper" helpify " 2. -b, -background" "[default|blank|IMAGE_PATH]" " Set gnome-shell background image" "Default is BigSur-like wallpaper"
helpify " 3. -p, -panelopacity" "[$(IFS='|'; echo "${PANEL_OPACITY_VARIANTS[*]}")]" " Set gnome-shell panel transparency" "Default is 15%" helpify " 3. -p, -panelopacity" "[$(IFS='|'; echo "${PANEL_OPACITY_VARIANTS[*]}")]" " Set gnome-shell panel transparency" "Default is 15%"
helpify " 4. -h, -height" "[$(IFS='|'; echo "${PANEL_SIZE_VARIANTS[*]}")]" " Set gnome-shell panel height size" "Default is 32px" helpify " 4. -h, -panelheight" "[$(IFS='|'; echo "${PANEL_SIZE_VARIANTS[*]}")]" " Set gnome-shell panel height size" "Default is 32px"
helpify " 5. -n, -normal" "" " Set gnome-shell show apps button style to normal" "Default is BigSur" helpify " 5. -n, -normal" "" " Set gnome-shell show apps button style to normal" "Default is BigSur"
helpify " 6. -s, -smaller" "" " Set gnome-shell font size to smaller (10pt)" "Default is 11pt" helpify " 6. -s, -smaller" "" " Set gnome-shell font size to smaller (10pt)" "Default is 11pt"
helpify "--round, --roundedmaxwindow" "" " Set maximized window to rounded" "Default is square" helpify "--round, --roundedmaxwindow" "" " Set maximized window to rounded" "Default is square"
helpify "--right, --rightplacement" "" " Set Nautilus title button placement to right" "Default is left"
helpify "--black, --blackfont" "" " Set panel font color to black" "Default is white" helpify "--black, --blackfont" "" " Set panel font color to black" "Default is white"
helpify "--darker, --darkercolor" "" " Install darker '${THEME_NAME}' dark themes" "" helpify "--darker, --darkercolor" "" " Install darker '${THEME_NAME}' dark themes" ""
helpify "--nord, --nordcolor" "" " Install '${THEME_NAME}' Nord ColorScheme themes" "" helpify "--nord, --nordcolor" "" " Install '${THEME_NAME}' Nord ColorScheme themes" ""
@ -104,9 +103,9 @@ while [[ $# -gt 0 ]]; do
check_param "${1}" "${1}" "${2}" "must" "must" "must" "false" && shift 2 || shift ;; check_param "${1}" "${1}" "${2}" "must" "must" "must" "false" && shift 2 || shift ;;
-p|-panelopacity) -p|-panelopacity)
check_param "${1}" "${1}" "${2}" "optional" "optional" "optional" && shift 2 || shift ;; check_param "${1}" "${1}" "${2}" "optional" "optional" "optional" && shift 2 || shift ;;
-h|-height) -h|-panelheight)
check_param "${1}" "${1}" "${2}" "optional" "optional" "optional" && shift 2 || shift ;; check_param "${1}" "${1}" "${2}" "optional" "optional" "optional" && shift 2 || shift ;;
-g|-general|-normal) -n|-normal)
showapps_normal="true"; shift ;; showapps_normal="true"; shift ;;
-s|-smaller) -s|-smaller)
smaller_font="true"; shift ;; smaller_font="true"; shift ;;

View File

@ -88,6 +88,7 @@ GS_GR_XML_FILE="${THEME_SRC_DIR}/main/gnome-shell/gnome-shell-theme.gresource.xm
#-------------Theme---------------# #-------------Theme---------------#
THEME_NAME="WhiteSur" THEME_NAME="WhiteSur"
COMMAND_COLOR_VARIANTS=('light' 'dark')
COLOR_VARIANTS=('Light' 'Dark') COLOR_VARIANTS=('Light' 'Dark')
OPACITY_VARIANTS=('normal' 'solid') OPACITY_VARIANTS=('normal' 'solid')
ALT_VARIANTS=('normal' 'alt') ALT_VARIANTS=('normal' 'alt')
@ -96,7 +97,7 @@ ICON_VARIANTS=('apple' 'simple' 'gnome' 'ubuntu' 'tux' 'arch' 'manjaro' 'fedora'
SIDEBAR_SIZE_VARIANTS=('default' '180' '220' '240' '260' '280') SIDEBAR_SIZE_VARIANTS=('default' '180' '220' '240' '260' '280')
PANEL_OPACITY_VARIANTS=('default' '30' '45' '60' '75') PANEL_OPACITY_VARIANTS=('default' '30' '45' '60' '75')
PANEL_SIZE_VARIANTS=('default' 'smaller' 'bigger') PANEL_SIZE_VARIANTS=('default' 'smaller' 'bigger')
NAUTILUS_STYLE_VARIANTS=('stable' 'normal' 'mojave' 'glassy') NAUTILUS_STYLE_VARIANTS=('stable' 'normal' 'mojave' 'glassy' 'right')
#--------Customization, default values----------# #--------Customization, default values----------#
dest="${THEME_DIR}" dest="${THEME_DIR}"
@ -115,8 +116,8 @@ compact="true"
colorscheme="" colorscheme=""
#--Ambigous arguments checking and overriding default values--# #--Ambigous arguments checking and overriding default values--#
declare -A has_set=([-b]="false" [-s]="false" [-p]="false" [-P]="false" [-d]="false" [-n]="false" [-a]="false" [-o]="false" [-c]="false" [-i]="false" [-t]="false" [-N]="false") declare -A has_set=([-b]="false" [-s]="false" [-p]="false" [-h]="false" [-s]="false" [-d]="false" [-n]="false" [-a]="false" [-o]="false" [-c]="false" [-i]="false" [-t]="false" [-N]="false")
declare -A need_dialog=([-b]="false" [-s]="false" [-p]="false" [-P]="false" [-d]="false" [-n]="false" [-a]="false" [-o]="false" [-c]="false" [-i]="false" [-t]="false" [-N]="false") declare -A need_dialog=([-b]="false" [-s]="false" [-p]="false" [-h]="false" [-s]="false" [-d]="false" [-n]="false" [-a]="false" [-o]="false" [-c]="false" [-i]="false" [-t]="false" [-N]="false")
#------------Tweaks---------------# #------------Tweaks---------------#
need_help="false" need_help="false"
@ -422,8 +423,6 @@ parsimplify() {
echo "~-n" | cut -c 2- ;; echo "~-n" | cut -c 2- ;;
--dest) --dest)
echo "-d" ;; echo "-d" ;;
--size)
echo "-s" ;;
--alt) --alt)
echo "-a" ;; echo "-a" ;;
--opacity) --opacity)
@ -434,20 +433,16 @@ parsimplify() {
echo "-i" ;; echo "-i" ;;
--theme) --theme)
echo "-t" ;; echo "-t" ;;
-height) --size)
echo "-s" ;;
--nautilus)
echo "-N" ;;
-background)
echo "-b" ;;
-panelheight)
echo "-h" ;; echo "-h" ;;
-panelopacity) -panelopacity)
echo "-p" ;; echo "-p" ;;
--panel-opacity)
echo "-p" ;;
--panel-size)
echo "-P" ;;
--nautilus)
echo "-N" ;;
--nautilus-style)
echo "-N" ;;
--background)
echo "-b" ;;
*) *)
echo "${1}" ;; echo "${1}" ;;
esac esac
@ -553,12 +548,6 @@ check_param() {
panel_opacity="${value}"; variant_found="true"; break panel_opacity="${value}"; variant_found="true"; break
fi fi
done ;; done ;;
-P)
for i in {0..2}; do
if [[ "${value}" == "${PANEL_SIZE_VARIANTS[i]}" ]]; then
panel_size="${value}"; variant_found="true"; break
fi
done ;;
-h) -h)
for i in {0..2}; do for i in {0..2}; do
if [[ "${value}" == "${PANEL_SIZE_VARIANTS[i]}" ]]; then if [[ "${value}" == "${PANEL_SIZE_VARIANTS[i]}" ]]; then
@ -589,6 +578,8 @@ check_param() {
for i in {0..1}; do for i in {0..1}; do
if [[ "${value}" == "${COLOR_VARIANTS[i]}" ]]; then if [[ "${value}" == "${COLOR_VARIANTS[i]}" ]]; then
colors+=("${COLOR_VARIANTS[i]}"); variant_found="true"; break colors+=("${COLOR_VARIANTS[i]}"); variant_found="true"; break
elif [[ "${value}" == "${COMMAND_COLOR_VARIANTS[i]}" ]]; then
colors+=("${COLOR_VARIANTS[i]}"); variant_found="true"; break
fi fi
done ;; done ;;
-i) -i)
@ -614,7 +605,7 @@ check_param() {
done done
fi ;; fi ;;
-N) -N)
for i in {0..3}; do for i in {0..4}; do
if [[ "${value}" == "${NAUTILUS_STYLE_VARIANTS[i]}" ]]; then if [[ "${value}" == "${NAUTILUS_STYLE_VARIANTS[i]}" ]]; then
nautilus_style="${NAUTILUS_STYLE_VARIANTS[i]}"; variant_found="true"; break nautilus_style="${NAUTILUS_STYLE_VARIANTS[i]}"; variant_found="true"; break
fi fi

View File

@ -923,7 +923,7 @@ customize_theme() {
fi fi
# Change Nautilus titlebutton placement style # Change Nautilus titlebutton placement style
if [[ "${right_placement}" == 'true' ]]; then if [[ "${nautilus_style}" == 'right' ]]; then
prompt -s "Changing Nautilus titlebutton placement style ...\n" prompt -s "Changing Nautilus titlebutton placement style ...\n"
sed $SED_OPT "/\$placement/s/left/right/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss" sed $SED_OPT "/\$placement/s/left/right/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss"
fi fi

View File

@ -11,9 +11,6 @@ $sidebar_size: 200px;
// Nautilus style // Nautilus style
$nautilus_style: 'stable'; $nautilus_style: 'stable';
// Nautilus titlebuttons placement
$placement: 'left';
// Gnome-shell panel opacity // Gnome-shell panel opacity
$panel_opacity: 0.15; $panel_opacity: 0.15;

View File

@ -88,7 +88,7 @@ $nautilus_sidebar_image: image($dark_sidebar_bg);
> .linked > button.disclosure-button { margin-left: $container_padding / 2; } > .linked > button.disclosure-button { margin-left: $container_padding / 2; }
@if $placement == 'left' { @if $nautilus_style != 'right' {
> box > stack > box { > box > stack > box {
margin-left: 18px; margin-left: 18px;
} }
@ -122,7 +122,7 @@ $nautilus_sidebar_image: image($dark_sidebar_bg);
} }
@if $nautilus_style == 'normal' or $nautilus_style == 'stable' { @if $nautilus_style == 'normal' or $nautilus_style == 'stable' {
@if $placement == 'left' { @if $nautilus_style != 'right' {
> .linked.raised > button:first-child { margin-left: $nautilus_sidebar_size - (48px + $container_padding * 6); } > .linked.raised > button:first-child { margin-left: $nautilus_sidebar_size - (48px + $container_padding * 6); }
} }
} }

113
tweaks.sh
View File

@ -30,20 +30,22 @@ usage() {
# Please specify their default value manually, some of them are come from _variables.scss # Please specify their default value manually, some of them are come from _variables.scss
# You also have to check and update them regurally # You also have to check and update them regurally
helpify_title helpify_title
helpify "" "" "[GDM theme].." "options" helpify "-o, --opacity" "[$(IFS='|'; echo "${OPACITY_VARIANTS[*]}")]" " Set '${THEME_NAME}' GDM/Flatpak theme opacity variants" "Default is 'normal'"
helpify "-g, --gdm" "[default|x2]" " Install '${THEME_NAME}' theme for GDM (scaling: 100%/200%, default is 100%)" "Requires to run this shell as root" helpify "-c, --color" "[$(IFS='|'; echo "${COMMAND_COLOR_VARIANTS[*]}")]" " Set '${THEME_NAME}' GDM/Flatpak theme color variants" "Default is 'light'"
helpify "-o, --opacity" "[$(IFS='|'; echo "${OPACITY_VARIANTS[*]}")]" " Set '${THEME_NAME}' GDM theme opacity variants" "Default is 'normal'" helpify "-t, --theme" "[$(IFS='|'; echo "${THEME_VARIANTS[*]}")]" " Set '${THEME_NAME}' GDM/Flatpak theme accent color" "Default is BigSur-like theme"
helpify "-c, --color" "[$(IFS='|'; echo "${COLOR_VARIANTS[*]}")]" " Set '${THEME_NAME}' GDM and Dash to Dock theme color variants" "Default is 'light'"
helpify "-t, --theme" "[$(IFS='|'; echo "${THEME_VARIANTS[*]}")]" " Set '${THEME_NAME}' GDM theme accent color" "Default is BigSur-like theme"
helpify "-N, --no-darken" "" " Don't darken '${THEME_NAME}' GDM theme background image" ""
helpify "-n, --no-blur" "" " Don't blur '${THEME_NAME}' GDM theme background image" ""
helpify "-b, --background" "[default|blank|IMAGE_PATH]" " Set '${THEME_NAME}' GDM theme background image" "Default is BigSur-like wallpaper"
helpify "-p, --panel-opacity" "[$(IFS='|'; echo "${PANEL_OPACITY_VARIANTS[*]}")]" " Set '${THEME_NAME}' GDM (GNOME Shell) theme panel transparency" "Default is 15%"
helpify "-P, --panel-size" "[$(IFS='|'; echo "${PANEL_SIZE_VARIANTS[*]}")]" " Set '${THEME_NAME}' Gnome shell panel height size" "Default is 32px"
helpify "-i, --icon" "[$(IFS='|'; echo "${ICON_VARIANTS[*]}")]" " Set '${THEME_NAME}' GDM (GNOME Shell) 'Activities' icon" "Default is 'standard'"
helpify "--nord, --nordcolor" "" " Install '${THEME_NAME}' Nord ColorScheme themes" ""
helpify "" "" "[Others].." "options" helpify "" "" "Tweaks for GDM theme" "options"
sec_title "-g, --gdm" "" " Without options default GDM theme will install..." ""
sec_helpify "1. -i, -icon" "[$(IFS='|'; echo "${ICON_VARIANTS[*]}")]" " Set GDM panel 'Activities' icon" "Default is 'standard'"
sec_helpify "2. -b, -background" "[default|blank|IMAGE_PATH]" " Set GDM background image" "Default is BigSur-like wallpaper"
sec_helpify "3. -p, -panelopacity" "[$(IFS='|'; echo "${PANEL_OPACITY_VARIANTS[*]}")]" " Set GDM panel transparency" "Default is 15%"
sec_helpify "4. -h, -panelheight" "[$(IFS='|'; echo "${PANEL_SIZE_VARIANTS[*]}")]" " Set GDM panel height size" "Default is 32px"
sec_helpify "5. -s, -smaller" "" " Set GDM font size to smaller (10pt)" "Default is 11pt"
sec_helpify "6. -nd, -nodarken" "" " Don't darken '${THEME_NAME}' GDM theme background image" ""
sec_helpify "7. -nb, -noblur" "" " Don't blur '${THEME_NAME}' GDM theme background image" ""
sec_helpify "8. -nord, -nordcolor" "" " Install '${THEME_NAME}' Nord ColorScheme gnome-shell themes" ""
helpify "" "" "Tweaks for firefox" "options"
sec_title "-f, --firefox" " [(monterey|flat)|alt|(darker|adaptive)]" " Without options default WhiteSur theme will install..." " Options:" sec_title "-f, --firefox" " [(monterey|flat)|alt|(darker|adaptive)]" " Without options default WhiteSur theme will install..." " Options:"
sec_helpify "1. monterey" " [3+3|3+4|3+5|4+3|4+4|4+5|5+3|5+4|5+5]" " Topbar buttons number: 'a+b'" " a: left side buttons number, b: right side buttons number" sec_helpify "1. monterey" " [3+3|3+4|3+5|4+3|4+4|4+5|5+3|5+4|5+5]" " Topbar buttons number: 'a+b'" " a: left side buttons number, b: right side buttons number"
sec_helpify "2. flat" " Monterey alt version" "" " Flat round tabs..." sec_helpify "2. flat" " Monterey alt version" "" " Flat round tabs..."
@ -53,9 +55,14 @@ usage() {
helpify "-e, --edit-firefox" "[(monterey|flat)|alt|(darker|adaptive)]" " Edit '${THEME_NAME}' theme for Firefox settings and also connect the theme to the current Firefox profiles" "" helpify "-e, --edit-firefox" "[(monterey|flat)|alt|(darker|adaptive)]" " Edit '${THEME_NAME}' theme for Firefox settings and also connect the theme to the current Firefox profiles" ""
helpify "-F, --flatpak" "Support options: [-o, -c, -t...]" " Connect '${THEME_NAME}' theme to Flatpak" "Without options will only install default themes" helpify "" "" "Others" "options"
sec_title "-F, --flatpak" "Support options: [-o, -c, -t...]" " Connect '${THEME_NAME}' theme to Flatpak" "Without options will only install default themes"
sec_helpify "1. -o, --opacity" "[$(IFS='|'; echo "${OPACITY_VARIANTS[*]}")]" " Set '${THEME_NAME}' flatpak theme opacity variants" "Default is 'normal'"
sec_helpify "2. -c, --color" "[$(IFS='|'; echo "${COLOR_VARIANTS[*]}")]" " Set '${THEME_NAME}' flatpak theme color variants" "Default is 'light'"
sec_helpify "3. -t, --theme" "[$(IFS='|'; echo "${THEME_VARIANTS[*]}")]" " Set '${THEME_NAME}' flatpak theme accent color" "Default is BigSur-like theme"
#helpify "-s, --snap" "" " Connect '${THEME_NAME}' theme the currently installed snap apps" "" #helpify "-s, --snap" "" " Connect '${THEME_NAME}' theme the currently installed snap apps" ""
helpify "-d, --dash-to-dock" "" " Fixed Dash to Dock theme issue" "" helpify "-d, --dash-to-dock" "" " Fixed Dash to Dock theme issue" ""
helpify "-r, --remove, --revert" "" " Revert to the original themes, do the opposite things of install and connect" "" helpify "-r, --remove, --revert" "" " Revert to the original themes, do the opposite things of install and connect" ""
@ -138,8 +145,7 @@ while [[ $# -gt 0 ]]; do
4+5) 4+5)
left_button="4" left_button="4"
right_button="5" right_button="5"
shift shift ;;
;;
5+3) 5+3)
left_button="5" left_button="5"
right_button="3" right_button="3"
@ -147,8 +153,7 @@ while [[ $# -gt 0 ]]; do
5+4) 5+4)
left_button="5" left_button="5"
right_button="4" right_button="4"
shift shift ;;
;;
5+5) 5+5)
left_button="5" left_button="5"
right_button="5" right_button="5"
@ -187,6 +192,39 @@ while [[ $# -gt 0 ]]; do
prompt -e "'${1}' ERROR: Firefox is running, please close it" prompt -e "'${1}' ERROR: Firefox is running, please close it"
has_any_error="true" has_any_error="true"
fi; shift ;; fi; shift ;;
-g|--gdm)
gdm="true"; full_sudo "${1}"
showapps_normal="true" # use normal showapps icon
background="default"
for variant in "${@}"; do
case "${variant}" in
-i|-icon)
activities_icon="true";
check_param "${1}" "${1}" "${2}" "must" "must" "must" && shift 2 || shift ;;
-b|-background)
check_param "${1}" "${1}" "${2}" "must" "must" "must" "false" && shift 2 || shift ;;
-p|-panelopacity)
check_param "${1}" "${1}" "${2}" "optional" "optional" "optional" && shift 2 || shift ;;
-h|-panelheight)
check_param "${1}" "${1}" "${2}" "optional" "optional" "optional" && shift 2 || shift ;;
-s|-smaller)
smaller_font="true"; shift ;;
-nd|--nodarken)
gdm_info ${1}
no_darken="true"; shift ;;
-nb|--noblur)
gdm_info ${1}
no_blur="true"; shift ;;
-nord|--nordcolor)
colorscheme="-nord"; shift ;;
esac
done
if ! has_command gdm && ! has_command gdm3 && [[ ! -e /usr/sbin/gdm3 ]]; then
prompt -e "'${1}' ERROR: There's no GDM installed in your system"
has_any_error="true"
fi; shift ;;
-F|--flatpak) -F|--flatpak)
flatpak="true"; signal_exit flatpak="true"; signal_exit
prompt -w "Without options it will only install default themes\n" prompt -w "Without options it will only install default themes\n"
@ -202,25 +240,7 @@ while [[ $# -gt 0 ]]; do
# prompt -e "'${1}' ERROR: There's no Snap installed in your system" # prompt -e "'${1}' ERROR: There's no Snap installed in your system"
# has_any_error="true" # has_any_error="true"
# fi; shift ;; # fi; shift ;;
-g|--gdm)
gdm="true"; full_sudo "${1}"
showapps_normal="true" # use normal showapps icon
background="default"
for variant in "${@}"; do
case "${variant}" in
default)
shift ;;
x2)
scale="x2"
shift ;;
esac
done
if ! has_command gdm && ! has_command gdm3 && [[ ! -e /usr/sbin/gdm3 ]]; then
prompt -e "'${1}' ERROR: There's no GDM installed in your system"
has_any_error="true"
fi; shift ;;
-d|--dash-to-dock) -d|--dash-to-dock)
if [[ ! -d "${DASH_TO_DOCK_DIR_HOME}" && ! -d "${DASH_TO_DOCK_DIR_ROOT}" ]]; then if [[ ! -d "${DASH_TO_DOCK_DIR_HOME}" && ! -d "${DASH_TO_DOCK_DIR_ROOT}" ]]; then
prompt -e "'${1}' ERROR: There's no Dash to Dock installed in your system" prompt -e "'${1}' ERROR: There's no Dash to Dock installed in your system"
@ -228,27 +248,6 @@ while [[ $# -gt 0 ]]; do
else else
dash_to_dock="true" dash_to_dock="true"
fi; shift ;; fi; shift ;;
-N|--no-darken)
gdm_info ${1}
no_darken="true"; shift ;;
-n|--no-blur)
gdm_info ${1}
no_blur="true"; shift ;;
--nord|--nordcolor)
colorscheme="-nord"; shift ;;
# Parameters that require value, single use
-b|--background)
gdm_info ${1}
check_param "${1}" "${1}" "${2}" "must" "must" "must" "false" && shift 2 || shift ;;
-i|--icon)
gdm_info ${1}
check_param "${1}" "${1}" "${2}" "must" "must" "must" "false" && shift 2 || shift ;;
-p|--panel-opacity)
gdm_info ${1}
check_param "${1}" "${1}" "${2}" "optional" "optional" "optional" && shift 2 || shift ;;
-P|--panel-size)
gdm_info ${1}
check_param "${1}" "${1}" "${2}" "optional" "optional" "optional" && shift 2 || shift ;;
-o|--opacity) -o|--opacity)
check_param "${1}" "${1}" "${2}" "not-at-all" "must" "must" && shift 2 || shift ;; check_param "${1}" "${1}" "${2}" "not-at-all" "must" "must" && shift 2 || shift ;;
-c|--color) -c|--color)