diff --git a/HACKING b/HACKING index 915e2d3..d17e28e 100644 --- a/HACKING +++ b/HACKING @@ -1,23 +1,23 @@ 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) * To be able to use the latest/adequate version of sass, install sassc. How to tweak the theme ---------------------- -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 +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 non-legible or editable form. -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 +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 right place for a drive by stylesheet fix: -_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 +_colors.scss - global color definitions. We keep the number of defined colors to a necessary minimum, + most colors are derived from a handful of basics. It covers both the light variant and the dark variant. _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 your changes. - + 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 edit. diff --git a/README.md b/README.md index 61837d1..0ab959e 100644 --- a/README.md +++ b/README.md @@ -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. ## Requirements -### GTK2 Murrine engine requirement. +### GTK2 Murrine engine requirements. - gtk-murrine-engine `Fedora/RedHat` - gtk2-engines-murrine `Ubuntu/Mint/Debian` - gtk-engine-murrine `Arch/Manjaro` -### GTK2 pixbuf engine requirement. +### GTK2 pixbuf engine requirements. - gtk2-engines `Fedora/RedHat` - gtk2-engines-pixbuf `Ubuntu/Mint/Debian` - gtk-engines `Arch/Manjaro` -### Installation Depends requirement +### Installed Dependency requirements. - sassc - 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 -After all the dependencies are installed, you can Run - - ./install.sh - +After all dependencies are installed, you can run: +```bash +./install.sh +``` #### Install tips -Usage: `./Install` **[OPTIONS...]** +Usage: `./install.sh` **[OPTIONS...]** | OPTIONS: | | |:--------------------|:-------------| @@ -49,46 +49,46 @@ Usage: `./Install` **[OPTIONS...]** |-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%)| |-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!| -|-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| ###

1. Change theme accent color

If you want to change theme accent! (Default color is blue) -then you can run: ( `dialog` is required, install it first! ) - - ./install.sh -t - +then you can run: (`dialog` is required, install it first!) +```bash +./install.sh -t +``` ![1](pictures/install-tip-01.png) ###

2. Install GDM theme

If you want to install GDM theme! 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 -r (remove installed GDM theme) +sudo ./install.sh -g -c light (install light version) +sudo ./install.sh -g -r (remove installed GDM theme) +``` ![2](pictures/install-tip-02.png) ###

3. Change nautilus sidebar width size

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) -then you can run: ( `dialog` is required, install it first! ) - - ./install.sh -s - +then you can run: (`dialog` is required, install it first!) +```bash +./install.sh -s +``` ![3](pictures/install-tip-03.png) ###

4. Change gnome-shell activities icon

If you want to change gnome-shell activities icon! (Default icon is Apple) then you can run: (For example: Install Manjaro icon) - - ./install.sh -i manjaro - +```bash +./install.sh -i manjaro +``` ![4](pictures/install-tip-04.png) ### On Snapcraft @@ -97,25 +97,25 @@ then you can run: (For example: Install Manjaro icon) Get it from the Snap Store -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 ``` -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 ``` -``` +```bash 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 ``` ### 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) | | Icon theme | [WhiteSur-icon](https://github.com/vinceliuice/WhiteSur-icon-theme)| ![icon](pictures/whitesur-icon-theme.png) | diff --git a/install.sh b/install.sh index b1a3628..e854035 100755 --- a/install.sh +++ b/install.sh @@ -22,19 +22,19 @@ OPACITY_VARIANTS=('' '-solid') ALT_VARIANTS=('' '-alt') ICON_VARIANTS=('' '-normal' '-gnome' '-ubuntu' '-arch' '-manjaro' '-fedora' '-debian' '-void') -#COLORS +# COLORS CDEF=" \033[0m" # default color CCIN=" \033[0;36m" # info color CGSC=" \033[0;32m" # success 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_CCIN=" \033[1;36m" # bold info color b_CGSC=" \033[1;32m" # bold success color b_CRER=" \033[1;31m" # bold error 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 () { case ${1} in "-s"|"--success") @@ -51,7 +51,7 @@ prompt () { esac } -# Check command avalibility +# Check command availability function has_command() { 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" "-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" "-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" "-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" "-g, --gdm" "Install GDM theme, this option need root user authority! please run this with sudo" - printf " %-25s%s\n" "-r, --remove" "remove theme, remove all installed themes" + 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" "-h, --help" "Show this help" } @@ -102,7 +102,7 @@ install() { echo "[Desktop Entry]" >> ${THEME_DIR}/index.theme echo "Type=X-GNOME-Metatheme" >> ${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 "" >> ${THEME_DIR}/index.theme echo "[X-GNOME-Metatheme]" >> ${THEME_DIR}/index.theme @@ -247,26 +247,28 @@ remove_theme() { revert_gdm() { if [[ -f "$GS_THEME_FILE.bak" ]]; then - prompt -w "reverting '$GS_THEME_FILE'..." + prompt -w "Reverting '$GS_THEME_FILE'..." rm -rf "$GS_THEME_FILE" mv "$GS_THEME_FILE.bak" "$GS_THEME_FILE" fi if [[ -f "$UBUNTU_THEME_FILE.bak" ]]; then - prompt -w "reverting '$UBUNTU_THEME_FILE'..." + prompt -w "Reverting '$UBUNTU_THEME_FILE'..." rm -rf "$UBUNTU_THEME_FILE" mv "$UBUNTU_THEME_FILE.bak" "$UBUNTU_THEME_FILE" fi 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} mv "$UBUNTU_NEW_THEME_FILE.bak" "$UBUNTU_NEW_THEME_FILE" fi # > Ubuntu 18.04 if [[ -f "$ETC_THEME_FILE.bak" ]]; then + prompt -w "reverting Ubuntu GDM theme..." + rm -rf "$ETC_THEME_FILE" mv "$ETC_THEME_FILE.bak" "$ETC_THEME_FILE" [[ -d $SHELL_THEME_FOLDER/$THEME_NAME ]] && rm -rf $SHELL_THEME_FOLDER/$THEME_NAME @@ -338,7 +340,7 @@ run_shell_dialog() { if [[ -x /usr/bin/dialog ]]; then tui=$(dialog --backtitle "${THEME_NAME} gtk theme installer" \ --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 \ 2 "75%" off \ 3 "70%" off \ @@ -498,7 +500,7 @@ restore_assets_files() { mv -f toggle-on.svg.bak toggle-on.svg mv -f corner-ripple.svg.bak corner-ripple.svg - prompt -w "restore assets files ..." + prompt -w "Restore assets files ..." } change_transparency() { @@ -746,7 +748,7 @@ if [[ -f "${SRC_DIR}"/assets/gtk-3.0/thumbnail.svg.bak ]]; then restore_assets_files fi -notify-send "Finished" "Enjoy you new WhiteSur theme!" -i face-smile +notify-send "Finished" "Enjoy your new WhiteSur theme!" -i face-smile echo prompt -s Done.