-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbase16-spacemacs.dark.sh
executable file
·44 lines (35 loc) · 1.3 KB
/
base16-spacemacs.dark.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
# Base16 Spacemacs - Mate Terminal color scheme install script
# Nasser Alshammari (https://github.com/nashamri/spacemacs-theme)
[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME="Base 16 Spacemacs Dark"
[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG="base-16-spacemacs-dark"
[[ -z "$DCONFTOOL" ]] && DCONFTOOL=dconf
[[ -z "$BASE_KEY" ]] && BASE_KEY=/org/mate/terminal/profiles
PROFILE_KEY="$BASE_KEY/$PROFILE_SLUG"
dset() {
local key="$1"; shift
local val="$1"; shift
"$DCONFTOOL" write "$PROFILE_KEY/$key" "$val"
}
# Because gconftool doesn't have "append"
glist_append() {
local key="$1"; shift
local val="$1"; shift
local entries="$(
{
"$DCONFTOOL" read "$key" | tr -d '[]' | tr , "\n" | fgrep -v "$val"
echo "'$val'"
} | head -c-1 | tr "\n" ,
)"
"$DCONFTOOL" write "$key" "[$entries]"
}
# Append the Base16 profile to the profile list
glist_append /org/mate/terminal/global/profile-list "$PROFILE_SLUG"
dset visible-name "'$PROFILE_NAME'"
dset palette "'#1f2022:#f2241f:#67b11d:#b1951d:#4f97d7:#a31db1:#2d9574:#a3a3a3:#585858:#f2241f:#67b11d:#b1951d:#4f97d7:#a31db1:#2d9574:#f8f8f8'"
dset background-color "'#1f2022'"
dset foreground-color "'#a3a3a3'"
dset bold-color "'#a3a3a3'"
dset bold-color-same-as-fg "true"
dset use-theme-colors "false"
dset use-theme-background "false"