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

Ubuntu 15.04 support

This commit is contained in:
Mayccoll 2015-10-17 18:22:44 -05:00
parent b40553c12c
commit e39a089b5c
3 changed files with 144 additions and 24 deletions

View File

@ -46,7 +46,8 @@ You also can execute this script this will list all available themas allowing yo
## What's New
**Now Thanks to [RafaelCz](https://github.com/RafaelCz) Gogh fully supports pantheon-terminal (Elementary OS Freya)** and we have new themes.
- **Support Ubuntu 15.04** thanks to [Terminal Sexy](https://terminal.sexy) script
- **Now Thanks to [RafaelCz](https://github.com/RafaelCz) Gogh fully supports pantheon-terminal (Elementary OS Freya)** and we have new themes.
#### One Dark
@ -95,7 +96,7 @@ If you want to create your own color scheme or contribute to the project. [Here.
## Credits:
- http://ciembor.github.io/4bit/
- [4bit}(http://ciembor.github.io/4bit/)
- Flat Theme - inspired by https://dribbble.com/shots/1021755-Flat-UI-Terminal-Theme
- https://github.com/zenorocha/dracula-theme
- http://ethanschoonover.com/solarized
@ -109,6 +110,7 @@ If you want to create your own color scheme or contribute to the project. [Here.
- [Mitchel van Eijgen](https://gist.github.com/mvaneijgen/4c56701215847dd5ddcf) and [Liu Xinan](https://gist.github.com/xinan/ca2b82fef6aaa0d1e099).
- [Tomorrow color theme set](https://github.com/chriskempson/tomorrow-theme) by [Chris Kempson](https://github.com/chriskempson).
- [One Dark & Light theme set](https://github.com/nathanbuchar/one-dark-terminal) by [Nathan Buchar](https://github.com/nathanbuchar).
- [Terminal Sexy](https://terminal.sexy)
<br/>

View File

@ -52,11 +52,127 @@ else
# |
# | Apply Variables
# | ===========================================
gconftool-2 --set /apps/gnome-terminal/profiles/Default/use_theme_background --type bool false
gconftool-2 --set /apps/gnome-terminal/profiles/Default/use_theme_colors --type bool false
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/background_color "${BACKGROUND_COLOR}"
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/foreground_color "${FOREGROUND_COLOR}"
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/palette "${COLOR_01}:${COLOR_02}:${COLOR_03}:${COLOR_04}:${COLOR_05}:${COLOR_06}:${COLOR_07}:${COLOR_08}:${COLOR_09}:${COLOR_10}:${COLOR_11}:${COLOR_12}:${COLOR_13}:${COLOR_14}:${COLOR_15}:${COLOR_16}"
[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME="Default"
[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG="Default"
[[ -z "$DCONF" ]] && DCONF=dconf
[[ -z "$UUIDGEN" ]] && UUIDGEN=uuidgen
dset() {
local key="$1"; shift
local val="$1"; shift
if [[ "$type" == "string" ]]; then
val="'$val'"
fi
"$DCONF" write "$PROFILE_KEY/$key" "$val"
}
# because dconf still doesn't have "append"
dlist_append() {
local key="$1"; shift
local val="$1"; shift
local entries="$(
{
"$DCONF" read "$key" | tr -d '[]' | tr , "\n" | fgrep -v "$val"
echo "'$val'"
} | head -c-1 | tr "\n" ,
)"
"$DCONF" write "$key" "[$entries]"
}
# Newest versions of gnome-terminal use dconf
if which "$DCONF" > /dev/null 2>&1; then
[[ -z "$BASE_KEY_NEW" ]] && BASE_KEY_NEW=/org/gnome/terminal/legacy/profiles:
if [[ -n "`$DCONF list $BASE_KEY_NEW/`" ]]; then
if which "$UUIDGEN" > /dev/null 2>&1; then
PROFILE_SLUG=`uuidgen`
fi
if [[ -n "`$DCONF read $BASE_KEY_NEW/default`" ]]; then
DEFAULT_SLUG=`$DCONF read $BASE_KEY_NEW/default | tr -d \'`
else
DEFAULT_SLUG=`$DCONF list $BASE_KEY_NEW/ | grep '^:' | head -n1 | tr -d :/`
fi
DEFAULT_KEY="$BASE_KEY_NEW/:$DEFAULT_SLUG"
PROFILE_KEY="$BASE_KEY_NEW/:$PROFILE_SLUG"
# copy existing settings from default profile
$DCONF dump "$DEFAULT_KEY/" | $DCONF load "$PROFILE_KEY/"
# add new copy to list of profiles
dlist_append $BASE_KEY_NEW/list "$PROFILE_SLUG"
# update profile values with theme options
dset visible-name "'$PROFILE_NAME'"
dset palette "['${COLOR_01}', '${COLOR_02}', '${COLOR_03}', '${COLOR_04}', '${COLOR_05}', '${COLOR_06}', '${COLOR_07}', '${COLOR_08}', '${COLOR_09}', '${COLOR_10}', '${COLOR_11}', '${COLOR_12}', '${COLOR_13}', '${COLOR_14}', '${COLOR_15}', '${COLOR_16}']"
dset background-color "'${BACKGROUND_COLOR}'"
dset foreground-color "'${FOREGROUND_COLOR}'"
dset bold-color "'${COLOR_08}'"
dset bold-color-same-as-fg "true"
dset use-theme-colors "false"
dset use-theme-background "false"
unset PROFILE_NAME
unset PROFILE_SLUG
unset DCONF
unset UUIDGEN
exit 0
fi
fi
# Fallback for Gnome 2 and early Gnome 3
[[ -z "$GCONFTOOL" ]] && GCONFTOOL=gconftool
[[ -z "$BASE_KEY" ]] && BASE_KEY=/apps/gnome-terminal/profiles
PROFILE_KEY="$BASE_KEY/$PROFILE_SLUG"
gset() {
local type="$1"; shift
local key="$1"; shift
local val="$1"; shift
"$GCONFTOOL" --set --type "$type" "$PROFILE_KEY/$key" -- "$val"
}
# Because gconftool doesn't have "append"
glist_append() {
local type="$1"; shift
local key="$1"; shift
local val="$1"; shift
local entries="$(
{
"$GCONFTOOL" --get "$key" | tr -d '[]' | tr , "\n" | fgrep -v "$val"
echo "$val"
} | head -c-1 | tr "\n" ,
)"
"$GCONFTOOL" --set --type list --list-type $type "$key" "[$entries]"
}
# Append the Base16 profile to the profile list
glist_append string /apps/gnome-terminal/global/profile_list "$PROFILE_SLUG"
gset string visible_name "$PROFILE_NAME"
gset string palette "${COLOR_01}:${COLOR_02}:${COLOR_03}:${COLOR_04}:${COLOR_05}:${COLOR_06}:${COLOR_07}:${COLOR_08}:${COLOR_09}:${COLOR_10}:${COLOR_11}:${COLOR_12}:${COLOR_13}:${COLOR_14}:${COLOR_15}:${COLOR_16}"
gset string background_color "${BACKGROUND_COLOR}"
gset string foreground_color "${FOREGROUND_COLOR}"
gset string bold_color "${FOREGROUND_COLOR}"
gset bool bold_color_same_as_fg "true"
gset bool use_theme_colors "false"
gset bool use_theme_background "false"
unset PROFILE_NAME
unset PROFILE_SLUG
unset DCONF
unset UUIDGEN
fi

36
base.sh
View File

@ -1,30 +1,32 @@
#!/bin/bash
# ====================CONFIG THIS =============================== #
COLOR_01="#073642" # HOST
COLOR_02="#DC322F" # SYNTAX_STRING
COLOR_03="#859900" # COMMAND
COLOR_04="#B58900" # COMMAND_COLOR2
COLOR_05="#268BD2" # PATH
COLOR_06="#EC0048" # SYNTAX_VAR
COLOR_07="#2AA198" # PROMP
COLOR_01="#44475a" # HOST
COLOR_02="#ff5555" # SYNTAX_STRING
COLOR_03="#50fa7b" # COMMAND
COLOR_04="#ffb86c" # COMMAND_COLOR2
COLOR_05="#8be9fd" # PATH
COLOR_06="#bd93f9" # SYNTAX_VAR
COLOR_07="#ff79c6" # PROMP
COLOR_08="#94A3A5" #
COLOR_09="#000000" #
COLOR_10="#CB4B16" # COMMAND_ERROR
COLOR_11="#859900" # EXEC
COLOR_12="#B58900" #
COLOR_13="#268BD2" # FOLDER
COLOR_14="#D33682" #
COLOR_15="#2AA198" #
COLOR_10="#ff5555" # COMMAND_ERROR
COLOR_11="#50fa7b" # EXEC
COLOR_12="#ffb86c" #
COLOR_13="#8be9fd" # FOLDER
COLOR_14="#bd93f9" #
COLOR_15="#ff79c6" #
COLOR_16="#ffffff" #
BACKGROUND_COLOR="#2F373B" # Background Color
FOREGROUND_COLOR="#d9e6f2" # Text
BACKGROUND_COLOR="#282a36" # Background Color
FOREGROUND_COLOR="#94A3A5" # Text
CURSOR_COLOR="$FOREGROUND_COLOR" # Cursor
# =============================================================== #
# =============================================
# |
# | Apply Colors
# | ===========================================
source <(wget -O - http://git.io/vY8Qq)
# . _apply-colors.sh