-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
15573d6
commit 1079cdf
Showing
2 changed files
with
246 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
|
||
#!/usr/bin/env bash | ||
# Base16 - Gnome Terminal color scheme install script | ||
|
||
[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME="terminal.sexy" | ||
[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG="terminal-dot-sexy" | ||
[[ -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 "['#44495e', '#ebb9b9', '#b1dba4', '#e6dfb8', '#cddbf9', '#f6bbe7', '#cddbf9', '#c6d0e9', '#3b3b4d', '#cc9b9d', '#a3ccad', '#d1ba97', '#b8c9ea', '#b294bb', '#95c2d1', '#63718b']" | ||
dset background-color "'#20202a'" | ||
dset foreground-color "'#63718b'" | ||
dset bold-color "'#63718b'" | ||
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 "#44495e:#ebb9b9:#b1dba4:#e6dfb8:#cddbf9:#f6bbe7:#cddbf9:#c6d0e9:#3b3b4d:#cc9b9d:#a3ccad:#d1ba97:#b8c9ea:#b294bb:#95c2d1:#63718b" | ||
gset string background_color "#20202a" | ||
gset string foreground_color "#63718b" | ||
gset string bold_color "#63718b" | ||
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 |
123 changes: 123 additions & 0 deletions
123
extras/terminal-themes/gnome-terminal/aquarium-light.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
#!/usr/bin/env bash | ||
# Base16 - Gnome Terminal color scheme install script | ||
|
||
[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME="terminal.sexy" | ||
[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG="terminal-dot-sexy" | ||
[[ -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 "['#cccbd9', '#b7435e', '#7e8f80', '#d88b72', '#6e7ebf', '#cc99cc', '#728a9a', '#9ca6b9', '#d5d4e0', '#cd667b', '#7d9685', '#de956f', '#6a8cbc', '#8787bf', '#829fb0', '#afb5c6']" | ||
dset background-color "'#e6e6f1'" | ||
dset foreground-color "'#708190'" | ||
dset bold-color "'#708190'" | ||
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 "#cccbd9:#b7435e:#7e8f80:#d88b72:#6e7ebf:#cc99cc:#728a9a:#9ca6b9:#d5d4e0:#cd667b:#7d9685:#de956f:#6a8cbc:#8787bf:#829fb0:#afb5c6" | ||
gset string background_color "#e6e6f1" | ||
gset string foreground_color "#708190" | ||
gset string bold_color "#708190" | ||
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 | ||
|