1
0
mirror of https://github.com/Mayccoll/Gogh.git synced 2023-08-10 21:12:46 +03:00

12 Commits
v223 ... v224

Author SHA1 Message Date
github-actions[bot]
a6296396f2 ------- Generate themes.json ------- 2022-01-20 17:45:19 +00:00
Mayccoll
534d61bcae Add sonakai to gogh.sh list 2022-01-20 12:44:42 -05:00
Mayccoll
2aa8bcda81 Merge pull request #326 from guigui64/master
Sonokai theme
2022-01-20 12:42:39 -05:00
Guillaume Comte
88293cf2cb Sonokai theme 2022-01-20 15:27:07 +01:00
Mayccoll
ead9e03605 update readme 2021-12-17 12:46:15 -05:00
Mayccoll
89c287fa4d Add konsole to readme 2021-12-17 12:42:56 -05:00
Mayccoll
553f8496b0 Merge pull request #323 from MisterCavespider/master
Added support for Konsole
2021-12-17 12:38:27 -05:00
github-actions[bot]
e9f0cd4077 ------- Generate themes.json ------- 2021-12-17 17:35:28 +00:00
m
0408e99b35 Added 'konsole' to the list of supported terminals 2021-12-17 17:07:10 +01:00
m
8f191c713e added support for konsole 2021-12-16 19:22:57 +01:00
m
ff15f921a4 Implemented support for Konsole; no profiles though 2021-12-16 18:52:06 +01:00
m
ec6bff26f9 Added skeleton code for Konsole support 2021-12-16 17:38:39 +01:00
5 changed files with 162 additions and 19 deletions

View File

@@ -17,20 +17,6 @@ Color Schemes For Ubuntu, Linux Mint, Elementary OS and all distributions that u
----
## 💻 Terminals
- Gnome - [Web](https://help.gnome.org/users/gnome-terminal/stable/)
- Mintty - [Web](https://mintty.github.io/)
- Mate - [Web](https://github.com/mate-desktop/mate-terminal)
- Pantheon / Elementary - [Web](https://github.com/elementary/terminal)
- Tilix - [Web](https://gnunn1.github.io/tilix-web/)
- XFCE4 - [Web](https://docs.xfce.org/apps/terminal/start)
- iTerm - [Web](https://iterm2.com/)
- Cygwin - [Web](https://www.cygwin.com/)
- Guake - [Web](https://sw.kovidgoyal.net/kitty/)
- Foot - [Web](https://codeberg.org/dnkl/foot)
- Kitty - [Web](https://sw.kovidgoyal.net/kitty/)
## ⚙️ Pre-Install
In your terminal type:
@@ -81,6 +67,21 @@ export TERMINAL=gnome-terminal
./dracula.sh
```
## 💻 Terminals
- Cygwin - [Web](https://www.cygwin.com/)
- Foot - [Web](https://codeberg.org/dnkl/foot)
- Gnome - [Web](https://help.gnome.org/users/gnome-terminal/stable/)
- Guake - [Web](https://sw.kovidgoyal.net/kitty/)
- iTerm - [Web](https://iterm2.com/)
- Kitty - [Web](https://sw.kovidgoyal.net/kitty/)
- Konsole - [Web](https://konsole.kde.org/)
- Mate - [Web](https://github.com/mate-desktop/mate-terminal)
- Mintty - [Web](https://mintty.github.io/)
- Pantheon / Elementary - [Web](https://github.com/elementary/terminal)
- Tilix - [Web](https://gnunn1.github.io/tilix-web/)
- XFCE4 - [Web](https://docs.xfce.org/apps/terminal/start)
<br/>
## 🎨 [Themes](https://mayccoll.github.io/Gogh/)
@@ -128,6 +129,7 @@ If you want to create your own color scheme or contribute to the project, [start
- [SMYCK](http://color.smyck.org/) by [John-Paul Bader](https://github.com/hukl)
- [Snazzy](https://github.com/sindresorhus/hyper-snazzy) by [Sindre Sorhus](https://github.com/sindresorhus)
- [Solarized](https://ethanschoonover.com/solarized) by [Ethan Schoonover](https://github.com/altercation)
- [Sonokai](https://github.com/sainnhe/sonokai) by [Sainnhe Park](https://github.com/sainnhe)
- [Srcery](https://github.com/roosta/vim-srcery) by [Daniel Berg](https://github.com/roosta)
- [Summer Pop](https://github.com/guillermoap/Gogh) by [Guillermo Aguirre](https://github.com/guillermoap)
- [SynthWave '84 ](https://github.com/robb0wen/synthwave-vscode)

View File

@@ -39,7 +39,7 @@ GLOBAL_VAR_CLEANUP() {
unset PROFILE_NAME
}
# Note: Since all scripts gets invoked in a subshell the traps from the parent shell
# Note: Since all scripts gets invoked in a subshell the traps from the parent shell
# will not get inherited. Hence traps defined in gogh.sh and print-themes.sh will still trigger
trap 'GLOBAL_VAR_CLEANUP; trap - EXIT' EXIT HUP INT QUIT PIPE TERM
@@ -130,6 +130,14 @@ case "${TERMINAL}" in
exit 1
fi
;;
konsole )
CFGFILE="${HOME}/.config/konsolerc"
if [[ ! -f "${CFGFILE}" ]]; then
printf '\n%s\n' "Error: Couldn't find an existing configuration file for Konsole."
exit 1
fi
;;
esac
@@ -198,6 +206,26 @@ updateFootConfig () {
sed -i -r -e "s/^${name}=.+/${name}=${color/\#/}/g" "${config}"
}
createKonsoleEntry () {
local name="${1}"
local color="${2}"
set --
set -- $(hexRGBtoDecRGB "${color}")
R=${1}; shift; G=${1}; shift; B=${1}; shift
echo -e "[$name]\nColor=${R},${G},${B}\n"
}
createKonsoleTriple () {
local name="${1}"
local colorn="${2}" # normal and faint
local colori="${3}" # intense
createKonsoleEntry "${name}" "${colorn}"
createKonsoleEntry "${name}Faint" "${colorn}"
createKonsoleEntry "${name}Intense" "${colori}"
}
convertNameAndRGBtoITerm() {
local name="${1}"
local color="${2}"
@@ -220,7 +248,7 @@ dlist_append() {
local key="${1}"; shift
local val="${1}"; shift
local entries
entries="$(
{
"${DCONF}" read "${key}" | tr -d "[]" | tr , "\n" | grep -F -v "${val}"
@@ -540,6 +568,57 @@ apply_kitty() {
echo "Done - please reopen your kitty terminal to see the changes"
}
apply_konsole() {
# |
# | Applying values on Konsole
# | ===========================================
PARENT=$(grep -o "^DefaultProfile=.*$" ${CFGFILE} | cut -d '=' -f 2)
if [[ -z "${PARENT}" ]]; then
PARENT="FALLBACK/"
fi
if [[ -z "${XDG_DATA_HOME:-}" ]]; then
KDIR="${HOME}/.local/share/konsole"
else
KDIR="${XDG_DATA_HOME}/konsole"
fi
KPROFILE="${KDIR}/${PROFILE_NAME}.profile"
if [[ -f "${KPROFILE}" ]]; then
echo "Profile ${PROFILE_NAME} already exists in Konsole confiuration (${KONSOLE_DIR}); Skipping ..."
exit 0
fi
touch "${KPROFILE}"
echo -e "[Appearance]\nColorScheme=${PROFILE_NAME}\n" >> "${KPROFILE}"
echo -e "[General]\nName=${PROFILE_NAME}\nParent=$PARENT" >> "${KPROFILE}"
KCOLORSCHEME="${KDIR}/${PROFILE_NAME}.colorscheme"
if [[ -f "${KCOLORSCHEME}" ]]; then
echo "Color Scheme ${PROFILE_NAME} already exists in Konsole confiuration (${KONSOLE_DIR}); Skipping ..."
exit 0
fi
touch "${KCOLORSCHEME}"
createKonsoleTriple "Background" "${BACKGROUND_COLOR}" "${BACKGROUND_COLOR}" >> "${KCOLORSCHEME}"
createKonsoleTriple "Color0" "${COLOR_01}" "${COLOR_09}" >> "${KCOLORSCHEME}"
createKonsoleTriple "Color1" "${COLOR_02}" "${COLOR_10}" >> "${KCOLORSCHEME}"
createKonsoleTriple "Color2" "${COLOR_03}" "${COLOR_11}" >> "${KCOLORSCHEME}"
createKonsoleTriple "Color3" "${COLOR_04}" "${COLOR_12}" >> "${KCOLORSCHEME}"
createKonsoleTriple "Color4" "${COLOR_05}" "${COLOR_13}" >> "${KCOLORSCHEME}"
createKonsoleTriple "Color5" "${COLOR_06}" "${COLOR_14}" >> "${KCOLORSCHEME}"
createKonsoleTriple "Color6" "${COLOR_07}" "${COLOR_15}" >> "${KCOLORSCHEME}"
createKonsoleTriple "Color7" "${COLOR_08}" "${COLOR_16}" >> "${KCOLORSCHEME}"
createKonsoleTriple "Foreground" "${FOREGROUND_COLOR}" "${FOREGROUND_COLOR}" >> "${KCOLORSCHEME}"
echo "[General]" >> "${KCOLORSCHEME}"
echo "Blur=false" >> "${KCOLORSCHEME}"
echo "ColorRandomization=false" >> "${KCOLORSCHEME}"
echo "Description=${PROFILE_NAME}" >> "${KCOLORSCHEME}"
echo "Opacity=1" >> "${KCOLORSCHEME}"
echo "Wallpaper=" >> "${KCOLORSCHEME}"
}
apply_darwin() {
# |
# | Applying values on iTerm2
@@ -579,7 +658,7 @@ apply_gtk() {
# | ===========================================
local legacy="${1:-}"
# This is to avoid doing the profile loop definition twice
if [[ -z "${legacy}" ]]; then
CONFTOOL="${DCONF} read"
@@ -598,7 +677,7 @@ apply_gtk() {
fi
done
# Fallback if there is no default profile
# Fallback if there is no default profile
set -- $(${CONFTOOL} ${PROFILE_LIST_KEY} | tr "[]'," " ")
: ${DEFAULT_SLUG:="$1"}
@@ -898,6 +977,10 @@ case "${TERMINAL}" in
apply_kitty
;;
konsole )
apply_konsole
;;
* )
printf '%s\n' \
"Unsupported terminal!" \
@@ -913,6 +996,7 @@ case "${TERMINAL}" in
" xfce4-terminal" \
" foot" \
" kitty" \
" konsole" \
"" \
"If you believe you have recieved this message in error," \
"try manually setting \`TERMINAL', hint: ps -h -o comm -p \$PPID"

File diff suppressed because one or more lines are too long

View File

@@ -194,6 +194,7 @@ declare -a THEMES=(
'solarized-dark-higher-contrast.sh'
'solarized-dark.sh'
'solarized-light.sh'
'sonokai.sh'
'spacedust.sh'
'spacegray-eighties-dull.sh'
'spacegray-eighties.sh'

56
themes/sonokai.sh Normal file
View File

@@ -0,0 +1,56 @@
#!/usr/bin/env bash
# ====================CONFIG THIS =============================== #
# Regular text
export COLOR_01="#2C2E34" # Dark Gray
export COLOR_02="#FC5D7C" # Sonokai Red
export COLOR_03="#9ED072" # Sonokai Green
export COLOR_04="#E7C664" # Sonokai Yellow
export COLOR_05="#F39660" # Sonokai Orange
export COLOR_06="#B39DF3" # Sonokai Magenta
export COLOR_07="#76CCE0" # Sonokai Cyan
export COLOR_08="#E2E2E3" # Light Gray
# Bold text
export COLOR_09="#2C2E34" # Dark Gray
export COLOR_10="#FC5D7C" # Sonokai Red
export COLOR_11="#9ED072" # Sonokai Green
export COLOR_12="#E7C664" # Sonokai Yellow
export COLOR_13="#F39660" # Sonokai Orange
export COLOR_14="#B39DF3" # Sonokai Magenta
export COLOR_15="#76CCE0" # Sonokai Cyan
export COLOR_16="#E2E2E3" # Light Gray
# Text and background
export BACKGROUND_COLOR="#2C2E34" # Background Color
export FOREGROUND_COLOR="#E2E2E3" # Foreground Color (text)
export CURSOR_COLOR="$FOREGROUND_COLOR" # Cursor color
export PROFILE_NAME="Sonokai"
# =============================================================== #
# =============================================================== #
# | Apply Colors
# ===============================================================|#
SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
PARENT_PATH="$(dirname "${SCRIPT_PATH}")"
# Allow developer to change url to forked url for easier testing
# IMPORTANT: Make sure you export this variable if your main shell is not bash
BASE_URL=${BASE_URL:-"https://raw.githubusercontent.com/Mayccoll/Gogh/master"}
if [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then
bash "${PARENT_PATH}/apply-colors.sh"
else
if [[ "$(uname)" = "Darwin" ]]; then
# OSX ships with curl and ancient bash
bash -c "$(curl -so- "${BASE_URL}/apply-colors.sh")"
else
# Linux ships with wget
bash -c "$(wget -qO- "${BASE_URL}/apply-colors.sh")"
fi
fi