Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge #2

Merged
merged 22 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,18 @@ A **vivid** and **colorful** 🎨 GTK theme based on [vinceliuice](https://githu
![dark-purple](preview/Edge-dark-purple.png)
</details>

> ⚠️ Since this theme is still a WIP here are some [things](https://github.com/xelser/edge-gtk/issues/1) that needs to be done

## Supports
- GTK 2,3, and 4
- Cinnamon
- XFCE (xfwm)
- MATE (metacity)
- GNOME (gnome-shell)
> Soon, using [Gradiance](https://github.com/GradienceTeam/Gradience).
> Because it has better support in the long run.
- Preferred icon theme: [Papirus](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme) with Edge's [Papirus Folders](https://github.com/xelser/edge-papirus-folders) theme
# Install
## Requirements for GTK2
#### Requirements for GTK2
- Arch: `sudo pacman -S gtk-engine-murrine gtk-engines`
- Fedora: `sudo dnf install gtk-murrine-engine gtk2-engines`
- Debian/Ubuntu: `sudo apt-get install gtk2-engines-murrine gtk2-engines-pixbuf`
### From Source
## From Source
1. Clone the Repo
```sh
git clone https://github.com/xelser/edge-gtk && cd edge-gtk
Expand All @@ -35,41 +31,48 @@ git clone https://github.com/xelser/edge-gtk && cd edge-gtk
- For user installation: `./install.sh` [OPTIONS...]
- For global installation: `sudo ./install.sh` [OPTIONS...]

#### OPTIONS:
##### OPTIONS:

```sh
-d, --dest DIR Specify theme destination directory (Default: $HOME/.themes)
-n, --name NAME Specify theme name (Default: Edge)
-c, --color VARIANTS Specify theme color variant(s) [standard|dark] (Default: All variants)
-c, --color VARIANTS Specify theme color variant(s) [standard|light|dark] (Default: All variants)
-t, --theme VARIANTS Specify hue theme variant(s) [red|yellow|green|cyan|blue|purple] (Default: All variants)
-r, --remove Remove(Uninstall) themes
-h, --help Show this help
```

## GTK4
Grab the directory of your selected theme (Ex. Edge-dark-blue). Either in `/usr/share/themes/` or in `$HOME/.themes/`
```sh
theme_dir="/usr/share/themes/Edge-dark-blue"

rm -rf "$HOME/.config/gtk-4.0/{assets,gtk.css,gtk-dark.css}"
mkdir -p "$HOME/.config/gtk-4.0"
ln -sf "${theme_dir}/gtk-4.0/assets" "$HOME/.config/gtk-4.0/"
ln -sf "${theme_dir}/gtk-4.0/gtk.css" "$HOME/.config/gtk-4.0/gtk.css"
ln -sf "${theme_dir}/gtk-4.0/gtk-dark.css" "$HOME/.config/gtk-4.0/gtk-dark.css"
```
> ${theme_dir} is the directory of your selected theme (Ex. Edge-light-purple). Either in `/usr/share/themes/` or in `$HOME/.themes/`


## Flatpak
The directory of the theme should be present in `$HOME/.local/share/themes/` as per [Flatpak Documentations](https://docs.flatpak.org/en/latest/desktop-integration.html) (anything in `/usr` is blacklisted). So you either have to copy from `/usr/share/themes` to `$HOME/.local/share/themes` ***OR*** if you installed it in `$HOME/.themes`, symlinking it to `$HOME/.local/share/themes` also works.
### Using The Official [Flatpak Documentations](https://docs.flatpak.org/en/latest/desktop-integration.html) Instructions:
The directory of the theme should be present in `$HOME/.local/share/themes/` (anything in `/usr` is blacklisted). So you either have to copy from `/usr/share/themes` to `$HOME/.local/share/themes` ***OR*** if you installed it in `$HOME/.themes`, symlinking it to `$HOME/.local/share/themes` also works.
```sh
flatpak override --user --filesystem=xdg-config/gtk-3.0 # for gtk3
flatpak override --user --filesystem=xdg-config/gtk-4.0 # for gtk4
flatpak override --user --filesystem=xdg-data/themes:ro # theme directory
flatpak override --user --filesystem=$HOME/.themes:ro # theme directory
flatpak override --user --env=GTK_THEME=${gtk_theme} # apply theme (Ex. Edge-light-purple)
flatpak override --user --env=GTK_THEME=Edge-dark-blue # apply theme
```
> "So why install it to `$HOME/.themes` if flatpak wants it in `$HOME/.local/share/themes`?" Because GTK2 likes it in `$HOME/.themes`

# Related Projects
- Preferred icon theme: [Papirus](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme)
> papirus-folder theme coming soon.
### Using [Stylepak](https://github.com/refi64/stylepak)
```sh
stylepak install-user Edge-dark-blue
```
# Recommended and Related Projects

- More Edge projects: https://github.com/sainnhe/edge/wiki/Related-Projects
# Credits
- The beautiful [Edge Colorscheme](https://github.com/sainnhe/edge) by [sainnhe](https://github.com/sainnhe)
Expand Down
8 changes: 4 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ usage() {
printf "\n%s\n" "OPTIONS:"
printf " %-25s%s\n" "-d, --dest DIR" "Specify theme destination directory (Default: ${DEST_DIR})"
printf " %-25s%s\n" "-n, --name NAME" "Specify theme name (Default: ${THEME_NAME})"
printf " %-25s%s\n" "-c, --color VARIANTS" "Specify theme color variant(s) [standard|dark] (Default: All variants)"
printf " %-25s%s\n" "-c, --color VARIANTS" "Specify theme color variant(s) [standard|light|dark] (Default: All variants)"
printf " %-25s%s\n" "-t, --theme VARIANTS" "Specify hue theme variant(s) [red|yellow|green|blue|purple|cyan] (Default: All variants)"
printf " %-25s%s\n" "-r, --remove" "Remove(Uninstall) themes"
printf " %-25s%s\n" "-h, --help" "Show this help"
Expand Down Expand Up @@ -111,7 +111,7 @@ install() {
if [[ "${color}" == '-light' ]] ; then
cp -r "themerc${color}" "${themedir}/xfwm4/themerc"
else
cp -r "themerc-dark" "${themedir}/xfwm4/themerc"
cp -r "themerc${theme}" "${themedir}/xfwm4/themerc"
fi

# Install xfwm4 hdpi Theme
Expand All @@ -121,7 +121,7 @@ install() {
if [[ "${color}" == '-light' ]] ; then
cp -r "themerc${color}" "${themedir}-hdpi/xfwm4/themerc"
else
cp -r "themerc-dark" "${themedir}-hdpi/xfwm4/themerc"
cp -r "themerc${theme}" "${themedir}-hdpi/xfwm4/themerc"
fi

# Install xfwm4 xhdpi Theme
Expand All @@ -131,7 +131,7 @@ install() {
if [[ "${color}" == '-light' ]] ; then
cp -r "themerc${color}" "${themedir}-xhdpi/xfwm4/themerc"
else
cp -r "themerc-dark" "${themedir}-xhdpi/xfwm4/themerc"
cp -r "themerc${theme}" "${themedir}-xhdpi/xfwm4/themerc"
fi
}

Expand Down
43 changes: 43 additions & 0 deletions make-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#! /bin/bash

THEME_DIR=$HOME/.themes/

THEME_NAME=Edge

_COLOR_VARIANTS=('' '-light' '-dark')
_THEME_VARIANTS=('-red' '-yellow' '-green' '-cyan' '-blue' '-purple')

if [ ! -z "${COLOR_VARIANTS:-}" ]; then
IFS=', ' read -r -a _COLOR_VARIANTS <<< "${COLOR_VARIANTS:-}"
fi

if [ ! -z "${THEME_VARIANTS:-}" ]; then
IFS=', ' read -r -a _THEME_VARIANTS <<< "${THEME_VARIANTS:-}"
fi

Tar_themes() {
for theme in "${_THEME_VARIANTS[@]}"; do
rm -rf ${THEME_NAME}${color}${theme}.tar.xz
done

for theme in "${_THEME_VARIANTS[@]}"; do
for color in "${_COLOR_VARIANTS[@]}"; do
tar -Jcvf ${THEME_NAME}${color}${theme}.tar.xz ${THEME_NAME}${color}${theme}{,-hdpi,-xhdpi}
done
done
}

Clear_theme() {
for theme in "${_THEME_VARIANTS[@]}"; do
for color in "${_COLOR_VARIANTS[@]}"; do
[[ -d "${THEME_NAME}${color}${theme}" ]] && rm -rf "${THEME_NAME}${color}${theme}"
[[ -d "${THEME_NAME}${color}${theme}-hdpi" ]] && rm -rf "${THEME_NAME}${color}${theme}-hdpi"
[[ -d "${THEME_NAME}${color}${theme}-xhdpi" ]] && rm -rf "${THEME_NAME}${color}${theme}-xhdpi"
done
done
}

./install.sh -d $THEME_DIR

cd $THEME_DIR && Tar_themes && Clear_theme

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/cinnamon/assets-blue/assets-dark/menu/menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/cinnamon/assets-blue/assets-dark/misc/button-box.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/cinnamon/assets-blue/assets-dark/switch/switch-off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/cinnamon/assets-blue/assets-dark/switch/switch-on.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/cinnamon/assets-blue/assets/checkbox/checkbox-checked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/cinnamon/assets-blue/assets/misc/button-box.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/cinnamon/assets-blue/assets/switch/switch-off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/cinnamon/assets-blue/assets/switch/switch-on.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/cinnamon/assets-blue/common-assets/misc/bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading