Skip to content

Commit 79021f7

Browse files
Merge branch 'release/0.1.0'
2 parents 092f74b + ae4250d commit 79021f7

File tree

2 files changed

+130
-0
lines changed

2 files changed

+130
-0
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,13 @@
44

55
---
66

7+
# 0.1.0 (2016-12-24)
8+
## Features
9+
Implemented the main shell script theme file [`nord.sh`](https://github.com/arcticicestudio/nord-gnome-terminal/blob/develop/src/sh/nord.sh). (@arcticicestudio, #1, c2282cd9)
10+
11+
Detailed information about features and install instructions can be found in the [README](https://github.com/arcticicestudio/nord-gnome-terminal/blob/develop/README.md#installation) and in the [project wiki](https://github.com/arcticicestudio/nord-gnome-terminal/wiki).
12+
13+
<p align="center"><img src="https://raw.githubusercontent.com/arcticicestudio/nord-gnome-terminal/develop/src/assets/scrot-colortest.png"/><br><strong>htop</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-gnome-terminal/develop/src/assets/scrot-htop.png"/></p>
14+
715
# 0.0.0 (2016-12-22)
816
**Project Initialization**

src/sh/nord.sh

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
#!/usr/bin/env bash
2+
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3+
# title Nord GNOME Terminal +
4+
# project nord-gnome-terminal +
5+
# repository https://github.com/arcticicestudio/nord-gnome-terminal +
6+
# author Arctic Ice Studio +
7+
# email development@arcticicestudio.com +
8+
# copyright Copyright (C) 2016 +
9+
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10+
[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME="Nord"
11+
[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG="nord"
12+
[[ -z "$DCONF" ]] && DCONF=dconf
13+
[[ -z "$UUIDGEN" ]] && UUIDGEN=uuidgen
14+
15+
NORD_GNOME_TERMINAL_VERSION=0.1.0
16+
17+
dset() {
18+
local key="$1"; shift
19+
local val="$1"; shift
20+
21+
if [[ "$type" == "string" ]]; then
22+
val="'$val'"
23+
fi
24+
25+
"$DCONF" write "$PROFILE_KEY/$key" "$val"
26+
}
27+
28+
dlist_append() {
29+
local key="$1"; shift
30+
local val="$1"; shift
31+
32+
local entries="$(
33+
{
34+
"$DCONF" read "$key" | tr -d '[]' | tr , "\n" | fgrep -v "$val"
35+
echo "'$val'"
36+
} | head -c-1 | tr "\n" ,
37+
)"
38+
39+
"$DCONF" write "$key" "[$entries]"
40+
}
41+
42+
if which "$DCONF" > /dev/null 2>&1; then
43+
[[ -z "$BASE_KEY_NEW" ]] && BASE_KEY_NEW=/org/gnome/terminal/legacy/profiles:
44+
45+
if [[ -n "`$DCONF list $BASE_KEY_NEW/`" ]]; then
46+
if which "$UUIDGEN" > /dev/null 2>&1; then
47+
PROFILE_SLUG=`uuidgen`
48+
fi
49+
50+
if [[ -n "`$DCONF read $BASE_KEY_NEW/default`" ]]; then
51+
DEFAULT_SLUG=`$DCONF read $BASE_KEY_NEW/default | tr -d \'`
52+
else
53+
DEFAULT_SLUG=`$DCONF list $BASE_KEY_NEW/ | grep '^:' | head -n1 | tr -d :/`
54+
fi
55+
56+
DEFAULT_KEY="$BASE_KEY_NEW/:$DEFAULT_SLUG"
57+
PROFILE_KEY="$BASE_KEY_NEW/:$PROFILE_SLUG"
58+
59+
$DCONF dump "$DEFAULT_KEY/" | $DCONF load "$PROFILE_KEY/"
60+
dlist_append $BASE_KEY_NEW/list "$PROFILE_SLUG"
61+
62+
dset visible-name "'$PROFILE_NAME'"
63+
dset palette "['#3B4252', '#BF616A', '#A3BE8C', '#EBCB8B', '#81A1C1', '#B48EAD', '#88C0D0', '#E5E9F0', '#4C566A', '#BF616A', '#A3BE8C', '#EBCB8B', '#81A1C1', '#B48EAD', '#8FBCBB', '#ECEFF4']"
64+
dset background-color "'#2E3440'"
65+
dset foreground-color "'#D8DEE9'"
66+
dset bold-color "'#D8DEE9'"
67+
dset bold-color-same-as-fg "true"
68+
dset use-theme-colors "false"
69+
dset use-theme-background "false"
70+
71+
unset PROFILE_NAME
72+
unset PROFILE_SLUG
73+
unset DCONF
74+
unset UUIDGEN
75+
exit 0
76+
fi
77+
fi
78+
79+
[[ -z "$GCONFTOOL" ]] && GCONFTOOL=gconftool
80+
[[ -z "$BASE_KEY" ]] && BASE_KEY=/apps/gnome-terminal/profiles
81+
82+
PROFILE_KEY="$BASE_KEY/$PROFILE_SLUG"
83+
84+
gset() {
85+
local type="$1"; shift
86+
local key="$1"; shift
87+
local val="$1"; shift
88+
89+
"$GCONFTOOL" --set --type "$type" "$PROFILE_KEY/$key" -- "$val"
90+
}
91+
92+
glist_append() {
93+
local type="$1"; shift
94+
local key="$1"; shift
95+
local val="$1"; shift
96+
97+
local entries="$(
98+
{
99+
"$GCONFTOOL" --get "$key" | tr -d '[]' | tr , "\n" | fgrep -v "$val"
100+
echo "$val"
101+
} | head -c-1 | tr "\n" ,
102+
)"
103+
104+
"$GCONFTOOL" --set --type list --list-type $type "$key" "[$entries]"
105+
}
106+
107+
glist_append string /apps/gnome-terminal/global/profile_list "$PROFILE_SLUG"
108+
109+
gset string visible_name "$PROFILE_NAME"
110+
gset string palette "#3B4252:#BF616A:#A3BE8C:#EBCB8B:#81A1C1:#B48EAD:#88C0D0:#E5E9F0:#4C566A:#BF616A:#A3BE8C:#EBCB8B:#81A1C1:#B48EAD:#8FBCBB:#ECEFF4"
111+
gset string background_color "#2E3440"
112+
gset string foreground_color "#D8DEE9"
113+
gset string bold_color "#D8DEE9"
114+
gset bool bold_color_same_as_fg "true"
115+
gset bool use_theme_colors "false"
116+
gset bool use_theme_background "false"
117+
118+
unset PROFILE_NAME
119+
unset PROFILE_SLUG
120+
unset DCONF
121+
unset UUIDGEN
122+
unset NORD_GNOME_TERMINAL_VERSION

0 commit comments

Comments
 (0)