Fix spelling and consistency

This commit is contained in:
Anton 2020-12-26 17:56:11 +02:00
parent 1c2933c8ef
commit bdac4727c7
No known key found for this signature in database
GPG key ID: 0EFE5D3DAF691779
3 changed files with 57 additions and 57 deletions

16
HACKING
View file

@ -1,23 +1,23 @@
Summary Summary
------- -------
* Do not edit the CSS directly, edit the source SCSS files and process them with SASS (run * Do not edit the CSS directly, edit the source SCSS files and process them with SASS (run
`./parse-sass.sh` when you have the required software installed, as described below) `./parse-sass.sh` when you have the required software installed, as described below)
* To be able to use the latest/adequate version of sass, install sassc. * To be able to use the latest/adequate version of sass, install sassc.
How to tweak the theme How to tweak the theme
---------------------- ----------------------
Adwaita is a complex theme, so to keep it maintainable it's written and processed in SASS. The Adwaita is a complex theme, so to keep it maintainable, it's written and processed in SASS. The
generated CSS is then transformed into a gresource file during gtk build and used at runtime in a generated CSS is then transformed into a gresource file during gtk build and used at runtime in a
non-legible or editable form. non-legible or editable form.
It is very likely your change will happen in the _common.scss file. That's where all the widget It is very likely your change will happen in the _common.scss file. That's where all the widget
selectors are defined. Here's a rundown of the "supporting" stylesheets, that are unlikely to be the selectors are defined. Here's a rundown of the "supporting" stylesheets, that are unlikely to be the
right place for a drive by stylesheet fix: right place for a drive by stylesheet fix:
_colors.scss - global color definitions. We keep the number of defined colors to a necessary minimum, _colors.scss - global color definitions. We keep the number of defined colors to a necessary minimum,
most colors are derived form a handful of basics. It covers both the light variant and most colors are derived from a handful of basics. It covers both the light variant and
the dark variant. the dark variant.
_colors-public.scss - SCSS colors exported through gtk to allow for 3rd party apps color mixing. _colors-public.scss - SCSS colors exported through gtk to allow for 3rd party apps color mixing.
@ -27,7 +27,7 @@ _drawing.scss - drawing helper mixings/functions to allow easier definitio
_common.scss - actual definitions of style for each widget. This is where you are likely to add/remove _common.scss - actual definitions of style for each widget. This is where you are likely to add/remove
your changes. your changes.
You can read about SASS at http://sass-lang.com/documentation/. Once you make your changes to the You can read about SASS at http://sass-lang.com/documentation/. Once you make your changes to the
_common.scss file, you can either run the ./parse-sass.sh script or keep SASS watching for changes as you _common.scss file, you can either run the ./parse-sass.sh script or keep SASS watching for changes as you
edit. edit.

View file

@ -4,19 +4,19 @@
WhiteSur is a MacOS Big Sur like theme for GTK 3, GTK 2 and Gnome-Shell which supports GTK 3 and GTK 2 based desktop environments like Gnome, Pantheon, XFCE, Mate, etc. WhiteSur is a MacOS Big Sur like theme for GTK 3, GTK 2 and Gnome-Shell which supports GTK 3 and GTK 2 based desktop environments like Gnome, Pantheon, XFCE, Mate, etc.
## Requirements ## Requirements
### GTK2 Murrine engine requirement. ### GTK2 Murrine engine requirements.
- gtk-murrine-engine `Fedora/RedHat` - gtk-murrine-engine `Fedora/RedHat`
- gtk2-engines-murrine `Ubuntu/Mint/Debian` - gtk2-engines-murrine `Ubuntu/Mint/Debian`
- gtk-engine-murrine `Arch/Manjaro` - gtk-engine-murrine `Arch/Manjaro`
### GTK2 pixbuf engine requirement. ### GTK2 pixbuf engine requirements.
- gtk2-engines `Fedora/RedHat` - gtk2-engines `Fedora/RedHat`
- gtk2-engines-pixbuf `Ubuntu/Mint/Debian` - gtk2-engines-pixbuf `Ubuntu/Mint/Debian`
- gtk-engines `Arch/Manjaro` - gtk-engines `Arch/Manjaro`
### Installation Depends requirement ### Installed Dependency requirements.
- sassc - sassc
- optipng - optipng
@ -31,13 +31,13 @@ WhiteSur is a MacOS Big Sur like theme for GTK 3, GTK 2 and Gnome-Shell which su
### From source ### From source
After all the dependencies are installed, you can Run After all dependencies are installed, you can run:
```bash
./install.sh ./install.sh
```
#### Install tips #### Install tips
Usage: `./Install` **[OPTIONS...]** Usage: `./install.sh` **[OPTIONS...]**
| OPTIONS: | | | OPTIONS: | |
|:--------------------|:-------------| |:--------------------|:-------------|
@ -49,46 +49,46 @@ Usage: `./Install` **[OPTIONS...]**
|-t, --theme | Run a terminal dialog to change the theme accent color (Default: blue)| |-t, --theme | Run a terminal dialog to change the theme accent color (Default: blue)|
|-p, --panel | Run a terminal dialog to change the panel transparency (Default: 85%)| |-p, --panel | Run a terminal dialog to change the panel transparency (Default: 85%)|
|-s, --size | Run a terminal dialog to change the nautilus sidebar width size (Default: 200px)| |-s, --size | Run a terminal dialog to change the nautilus sidebar width size (Default: 200px)|
|-i, --icon | activities icon variant(s) **[standard/normal/gnome/ubuntu/arch/manjaro/fedora/debian/void]** (Default: standard variant)| |-i, --icon | Activities icon variant(s) **[standard/normal/gnome/ubuntu/arch/manjaro/fedora/debian/void]** (Default: standard variant)|
|-g, --gdm | Install GDM theme, you should run this with sudo!| |-g, --gdm | Install GDM theme, you should run this with sudo!|
|-r, --remove | remove theme, this will remove all installed themes!| |-r, --remove | Remove theme, this will remove all installed themes!|
|-h, --help | Show this help| |-h, --help | Show this help|
### <p align="center" > 1. Change theme accent color </p> ### <p align="center" > 1. Change theme accent color </p>
If you want to change theme accent! (Default color is blue) If you want to change theme accent! (Default color is blue)
then you can run: ( `dialog` is required, install it first! ) then you can run: (`dialog` is required, install it first!)
```bash
./install.sh -t ./install.sh -t
```
![1](pictures/install-tip-01.png) ![1](pictures/install-tip-01.png)
### <p align="center" > 2. Install GDM theme </p> ### <p align="center" > 2. Install GDM theme </p>
If you want to install GDM theme! If you want to install GDM theme!
then you can run: then you can run:
```bash
sudo ./install.sh -g (install default dark version)
sudo ./install.sh -g (install default dark version) sudo ./install.sh -g -c light (install light version)
sudo ./install.sh -g -c light (install light version)
sudo ./install.sh -g -r (remove installed GDM theme)
sudo ./install.sh -g -r (remove installed GDM theme)
```
![2](pictures/install-tip-02.png) ![2](pictures/install-tip-02.png)
### <p align="center" > 3. Change nautilus sidebar width size </p> ### <p align="center" > 3. Change nautilus sidebar width size </p>
If you want to change nautilus sidebar width size! (Default size is 180px) If you want to change nautilus sidebar width size! (Default size is 180px)
(Nautilus cannot change the structure of the sidebar, so I added a picture as a background to achieve the effect of bigsur) (Nautilus cannot change the structure of the sidebar, so I added a picture as a background to achieve the effect of bigsur)
then you can run: ( `dialog` is required, install it first! ) then you can run: (`dialog` is required, install it first!)
```bash
./install.sh -s ./install.sh -s
```
![3](pictures/install-tip-03.png) ![3](pictures/install-tip-03.png)
### <p align="center" > 4. Change gnome-shell activities icon </p> ### <p align="center" > 4. Change gnome-shell activities icon </p>
If you want to change gnome-shell activities icon! (Default icon is Apple) If you want to change gnome-shell activities icon! (Default icon is Apple)
then you can run: (For example: Install Manjaro icon) then you can run: (For example: Install Manjaro icon)
```bash
./install.sh -i manjaro ./install.sh -i manjaro
```
![4](pictures/install-tip-04.png) ![4](pictures/install-tip-04.png)
### On Snapcraft ### On Snapcraft
@ -97,25 +97,25 @@ then you can run: (For example: Install Manjaro icon)
<img alt="Get it from the Snap Store" src="https://snapcraft.io/static/images/badges/en/snap-store-black.svg" /> <img alt="Get it from the Snap Store" src="https://snapcraft.io/static/images/badges/en/snap-store-black.svg" />
</a> </a>
You can install the theme from the Snap Store оr by running: You can install the theme from the Snap Store, or by running:
``` ```bash
sudo snap install whitesur-gtk-theme sudo snap install whitesur-gtk-theme
``` ```
To connect the theme to an app run: To connect the theme to an app, run:
``` ```bash
sudo snap connect [other snap]:gtk-3-themes whitesur-gtk-theme:gtk-3-themes sudo snap connect [other snap]:gtk-3-themes whitesur-gtk-theme:gtk-3-themes
``` ```
``` ```bash
sudo snap connect [other snap]:icon-themes whitesur-gtk-theme:icon-themes sudo snap connect [other snap]:icon-themes whitesur-gtk-theme:icon-themes
``` ```
To connect the theme to all apps which have available plugs to gtk-common-themes you can run: To connect the theme to all apps which have available plugs to gtk-common-themes, you can run:
``` ```bash
for i in $(snap connections | grep gtk-common-themes:gtk-3-themes | awk '{print $2}'); do sudo snap connect $i whitesur-gtk-theme:gtk-3-themes; done for i in $(snap connections | grep gtk-common-themes:gtk-3-themes | awk '{print $2}'); do sudo snap connect $i whitesur-gtk-theme:gtk-3-themes; done
``` ```
### Suggested themes ### Suggested themes
| Suggested themes | links | preview | | Suggested themes | Links | Preview |
|:--------------------|:-------------|:-------------| |:--------------------|:-------------|:-------------|
| Kde theme | [WhiteSur-kde](https://github.com/vinceliuice/WhiteSur-kde)| ![kde](pictures/whitesur-kde-theme.png) | | Kde theme | [WhiteSur-kde](https://github.com/vinceliuice/WhiteSur-kde)| ![kde](pictures/whitesur-kde-theme.png) |
| Icon theme | [WhiteSur-icon](https://github.com/vinceliuice/WhiteSur-icon-theme)| ![icon](pictures/whitesur-icon-theme.png) | | Icon theme | [WhiteSur-icon](https://github.com/vinceliuice/WhiteSur-icon-theme)| ![icon](pictures/whitesur-icon-theme.png) |

View file

@ -22,19 +22,19 @@ OPACITY_VARIANTS=('' '-solid')
ALT_VARIANTS=('' '-alt') ALT_VARIANTS=('' '-alt')
ICON_VARIANTS=('' '-normal' '-gnome' '-ubuntu' '-arch' '-manjaro' '-fedora' '-debian' '-void') ICON_VARIANTS=('' '-normal' '-gnome' '-ubuntu' '-arch' '-manjaro' '-fedora' '-debian' '-void')
#COLORS # COLORS
CDEF=" \033[0m" # default color CDEF=" \033[0m" # default color
CCIN=" \033[0;36m" # info color CCIN=" \033[0;36m" # info color
CGSC=" \033[0;32m" # success color CGSC=" \033[0;32m" # success color
CRER=" \033[0;31m" # error color CRER=" \033[0;31m" # error color
CWAR=" \033[0;33m" # waring color CWAR=" \033[0;33m" # warning color
b_CDEF=" \033[1;37m" # bold default color b_CDEF=" \033[1;37m" # bold default color
b_CCIN=" \033[1;36m" # bold info color b_CCIN=" \033[1;36m" # bold info color
b_CGSC=" \033[1;32m" # bold success color b_CGSC=" \033[1;32m" # bold success color
b_CRER=" \033[1;31m" # bold error color b_CRER=" \033[1;31m" # bold error color
b_CWAR=" \033[1;33m" # bold warning color b_CWAR=" \033[1;33m" # bold warning color
# echo like ... with flag type and display message colors # Echo like ... with flag type and display message colors
prompt () { prompt () {
case ${1} in case ${1} in
"-s"|"--success") "-s"|"--success")
@ -51,7 +51,7 @@ prompt () {
esac esac
} }
# Check command avalibility # Check command availability
function has_command() { function has_command() {
command -v $1 > /dev/null command -v $1 > /dev/null
} }
@ -70,12 +70,12 @@ usage() {
printf " %-25s%s\n" "-o, --opacity VARIANTS" "Specify theme opacity variant(s) [standard|solid] (Default: All variants)" printf " %-25s%s\n" "-o, --opacity VARIANTS" "Specify theme opacity variant(s) [standard|solid] (Default: All variants)"
printf " %-25s%s\n" "-c, --color VARIANTS" "Specify theme color variant(s) [light|dark] (Default: All variants)" printf " %-25s%s\n" "-c, --color VARIANTS" "Specify theme color variant(s) [light|dark] (Default: All variants)"
printf " %-25s%s\n" "-t, --theme VARIANTS" "Run a dialog to change the theme color (Default: blue)" printf " %-25s%s\n" "-t, --theme VARIANTS" "Run a dialog to change the theme color (Default: blue)"
printf " %-25s%s\n" "-a, --alt VARIANTS" "Specify theme titilebutton variant(s) [standard|alt] (Default: All variants)" printf " %-25s%s\n" "-a, --alt VARIANTS" "Specify theme titlebutton variant(s) [standard|alt] (Default: All variants)"
printf " %-25s%s\n" "-p, --panel VARIANTS" "Run a dialog to change the panel transparency (Default: 85%)" printf " %-25s%s\n" "-p, --panel VARIANTS" "Run a dialog to change the panel transparency (Default: 85%)"
printf " %-25s%s\n" "-s, --size VARIANTS" "Run a dialog to change the nautilus sidebar width size (Default: 200px)" printf " %-25s%s\n" "-s, --size VARIANTS" "Run a dialog to change the nautilus sidebar width size (Default: 200px)"
printf " %-25s%s\n" "-i, --icon VARIANTS" "Specify activities icon variant(s) for gnome-shell [standard|normal|gnome|ubuntu|arch|manjaro|fedora|debian|void] (Default: standard variant)" printf " %-25s%s\n" "-i, --icon VARIANTS" "Specify activities icon variant(s) for gnome-shell [standard|normal|gnome|ubuntu|arch|manjaro|fedora|debian|void] (Default: standard variant)"
printf " %-25s%s\n" "-g, --gdm" "Install GDM theme, this option need root user authority! please run this with sudo" printf " %-25s%s\n" "-g, --gdm" "Install GDM theme, this option needs root user authority! Please run this with sudo"
printf " %-25s%s\n" "-r, --remove" "remove theme, remove all installed themes" printf " %-25s%s\n" "-r, --remove" "Remove theme, remove all installed themes"
printf " %-25s%s\n" "-h, --help" "Show this help" printf " %-25s%s\n" "-h, --help" "Show this help"
} }
@ -102,7 +102,7 @@ install() {
echo "[Desktop Entry]" >> ${THEME_DIR}/index.theme echo "[Desktop Entry]" >> ${THEME_DIR}/index.theme
echo "Type=X-GNOME-Metatheme" >> ${THEME_DIR}/index.theme echo "Type=X-GNOME-Metatheme" >> ${THEME_DIR}/index.theme
echo "Name=${name}${color}${opacity}" >> ${THEME_DIR}/index.theme echo "Name=${name}${color}${opacity}" >> ${THEME_DIR}/index.theme
echo "Comment=An Stylish Gtk+ theme based on Elegant Design" >> ${THEME_DIR}/index.theme echo "Comment=A Stylish Gtk+ theme based on Elegant Design" >> ${THEME_DIR}/index.theme
echo "Encoding=UTF-8" >> ${THEME_DIR}/index.theme echo "Encoding=UTF-8" >> ${THEME_DIR}/index.theme
echo "" >> ${THEME_DIR}/index.theme echo "" >> ${THEME_DIR}/index.theme
echo "[X-GNOME-Metatheme]" >> ${THEME_DIR}/index.theme echo "[X-GNOME-Metatheme]" >> ${THEME_DIR}/index.theme
@ -236,25 +236,25 @@ remove_theme() {
revert_gdm() { revert_gdm() {
if [[ -f "$GS_THEME_FILE.bak" ]]; then if [[ -f "$GS_THEME_FILE.bak" ]]; then
prompt -w "reverting '$GS_THEME_FILE'..." prompt -w "Reverting '$GS_THEME_FILE'..."
rm -rf "$GS_THEME_FILE" rm -rf "$GS_THEME_FILE"
mv "$GS_THEME_FILE.bak" "$GS_THEME_FILE" mv "$GS_THEME_FILE.bak" "$GS_THEME_FILE"
fi fi
if [[ -f "$UBUNTU_THEME_FILE.bak" ]]; then if [[ -f "$UBUNTU_THEME_FILE.bak" ]]; then
prompt -w "reverting '$UBUNTU_THEME_FILE'..." prompt -w "Reverting '$UBUNTU_THEME_FILE'..."
rm -rf "$UBUNTU_THEME_FILE" rm -rf "$UBUNTU_THEME_FILE"
mv "$UBUNTU_THEME_FILE.bak" "$UBUNTU_THEME_FILE" mv "$UBUNTU_THEME_FILE.bak" "$UBUNTU_THEME_FILE"
fi fi
if [[ -f "$UBUNTU_NEW_THEME_FILE.bak" ]]; then if [[ -f "$UBUNTU_NEW_THEME_FILE.bak" ]]; then
prompt -w "reverting '$UBUNTU_NEW_THEME_FILE'..." prompt -w "Reverting '$UBUNTU_NEW_THEME_FILE'..."
rm -rf "$UBUNTU_NEW_THEME_FILE" "$SHELL_THEME_FOLDER"/{assets,no-events.svg,process-working.svg,no-notifications.svg} rm -rf "$UBUNTU_NEW_THEME_FILE" "$SHELL_THEME_FOLDER"/{assets,no-events.svg,process-working.svg,no-notifications.svg}
mv "$UBUNTU_NEW_THEME_FILE.bak" "$UBUNTU_NEW_THEME_FILE" mv "$UBUNTU_NEW_THEME_FILE.bak" "$UBUNTU_NEW_THEME_FILE"
fi fi
if [[ -f "$ETC_THEME_FILE.bak" ]]; then if [[ -f "$ETC_THEME_FILE.bak" ]]; then
prompt -w "reverting Ubuntu gnome-shell theme..." prompt -w "Reverting Ubuntu gnome-shell theme..."
rm -rf "$ETC_THEME_FILE" rm -rf "$ETC_THEME_FILE"
mv "$ETC_THEME_FILE.bak" "$ETC_THEME_FILE" mv "$ETC_THEME_FILE.bak" "$ETC_THEME_FILE"
[[ -d $SHELL_THEME_FOLDER/$THEME_NAME ]] && rm -rf $SHELL_THEME_FOLDER/$THEME_NAME [[ -d $SHELL_THEME_FOLDER/$THEME_NAME ]] && rm -rf $SHELL_THEME_FOLDER/$THEME_NAME
@ -313,7 +313,7 @@ run_shell_dialog() {
if [[ -x /usr/bin/dialog ]]; then if [[ -x /usr/bin/dialog ]]; then
tui=$(dialog --backtitle "${THEME_NAME} gtk theme installer" \ tui=$(dialog --backtitle "${THEME_NAME} gtk theme installer" \
--radiolist "Choose your panel transparency --radiolist "Choose your panel transparency
(default is 85%, 100% is full transparent!):" 20 50 10 \ (default is 85%, 100% is fully transparent!):" 20 50 10 \
1 "80%" on \ 1 "80%" on \
2 "75%" off \ 2 "75%" off \
3 "70%" off \ 3 "70%" off \
@ -473,7 +473,7 @@ restore_assets_files() {
mv -f toggle-on.svg.bak toggle-on.svg mv -f toggle-on.svg.bak toggle-on.svg
mv -f corner-ripple.svg.bak corner-ripple.svg mv -f corner-ripple.svg.bak corner-ripple.svg
prompt -w "restore assets files ..." prompt -w "Restore assets files ..."
} }
change_transparency() { change_transparency() {
@ -722,7 +722,7 @@ if [[ -f "${SRC_DIR}"/assets/gtk-3.0/thumbnail.svg.bak ]]; then
restore_assets_files restore_assets_files
fi fi
notify-send "Finished" "Enjoy you new WhiteSur theme!" -i face-smile notify-send "Finished" "Enjoy your new WhiteSur theme!" -i face-smile
echo echo
prompt -s Done. prompt -s Done.