Skip to content

Commit

Permalink
Merge branch 'release/0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
arcticicestudio committed Nov 19, 2016
2 parents e92b8a9 + b8068d0 commit 81c35a9
Show file tree
Hide file tree
Showing 8 changed files with 281 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": [
"json"
]
}
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# title Travis CI Build Configuration +
# project nord-terminix +
# repository https://github.com/arcticicestudio/nord-terminix +
# author Arctic Ice Studio +
# email [email protected] +
# copyright Copyright (C) 2016 +
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# [References]
# Travis CI Documentation
# (https://docs.travis-ci.com)
language: node_js
node_js: "6"
cache:
directories:
- $HOME/node_modules
before_script:
- npm install
script: npm run --silent lint
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@
<p align="center"><img src="https://assets-cdn.github.com/favicon.ico" width=24 height=24/> <a href="https://github.com/arcticicestudio/nord-terminix/releases/latest"><img src="https://img.shields.io/github/release/arcticicestudio/nord-terminix.svg"/></a> <a href="https://github.com/arcticicestudio/nord/releases/tag/v0.1.0"><img src="https://img.shields.io/badge/Nord-v0.1.0-blue.svg"/></a></p>

---

# 0.1.0 (2016-11-19)
## Features
Implemented the main JSON color scheme file.
Detailed instructions to install the scheme file can be found in the [README](https://github.com/arcticicestudio/nord-terminix/blob/develop/README.md#installation).
(@arcticicestudio, #1, b4179195)

<p align="center"><img src="https://raw.githubusercontent.com/arcticicestudio/nord-terminix/develop/src/assets/scrot-colortest.png"/><br><strong>htop</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-terminix/develop/src/assets/scrot-htop.png"/></p>

# 0.0.0 (2016-11-19)
**Project Initialization**
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,8 @@ Based on the <a href="https://github.com/arcticicestudio/nord">Nord</a> color pa
#### Manual
Copy the [`nord.json`](https://github.com/arcticicestudio/nord-terminix/tree/develop/src/json/nord-json) file to the color schemes directory according to the desired installation type.

**Local User**
```
~/.config/terminix/schemes
```
**Global**
```
/usr/share/terminix/schemes
```
Local: `~/.config/terminix/schemes`
Global: `/usr/share/terminix/schemes`

#### Install Script
The included `install.sh` shell script can be used for an automated installation.
Expand Down Expand Up @@ -55,6 +49,8 @@ Syntax: `install.sh [OPTIONS]`
## Development
[![](https://img.shields.io/badge/Changelog-0.1.0-blue.svg)](https://github.com/arcticicestudio/nord-terminix/blob/v0.1.0/CHANGELOG.md) [![](https://img.shields.io/badge/Workflow-gitflow--branching--model-blue.svg)](http://nvie.com/posts/a-successful-git-branching-model) [![](https://img.shields.io/badge/Versioning-ArcVer_0.8.0-blue.svg)](https://github.com/arcticicestudio/arcver)

Continuous integration builds are running at [Travis-CI](https://travis-ci.org/arcticicestudio/nord-terminix) and [Circle CI](https://circleci.com/bb/arcticicestudio/nord-terminix).

### Contribution
Please report issues/bugs, feature requests and suggestions for improvements to the [issue tracker](https://github.com/arcticicestudio/nord-terminix/issues).

Expand Down
21 changes: 21 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# title Circle CI Build Configuration +
# project nord-terminix +
# repository https://github.com/arcticicestudio/nord-terminix +
# author Arctic Ice Studio +
# email [email protected] +
# copyright Copyright (C) 2016 +
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# [References]
# Circle CI
# (https://circleci.com/docs)
machine:
node:
version: 6.1.0
dependencies:
override:
- npm install
test:
override:
- npm run --silent lint
157 changes: 157 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
#!/usr/bin/env bash
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# title Install Script +
# project nord-terminix +
# repository https://github.com/arcticicestudio/nord-terminix +
# author Arctic Ice Studio +
# email [email protected] +
# copyright Copyright (C) 2016 +
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
set -e

_ct_error="\e[0;31m"
_ct_success="\e[0;32m"
_ct_warning="\e[0;33m"
_ct_highlight="\e[0;34m"
_ct_primary="\e[0;36m"
_ct="\e[0;37m"
_ctb_subtle="\e[1;30m"
_ctb_error="\e[1;31m"
_ctb_success="\e[1;32m"
_ctb_warning="\e[1;33m"
_ctb_highlight="\e[1;34m"
_ctb_primary="\e[1;36m"
_ctb="\e[1;37m"
_c_reset="\e[0m"

__help() {
printf "${_ctb}Usage: ${_ct_primary}install.sh ${_ctb_subtle}[OPTIONS]\n"
printf " ${_ctb_highlight}-h${_ct},${_ctb_highlight} --help ${_ct}Help\n"
printf " ${_ctb_highlight}-v${_ct},${_ctb_highlight} --verbose ${_ct}Verbose output\n${_ctb_reset}"
printf " ${_ctb_highlight}-g${_ct},${_ctb_highlight} --global \
${_ct}Install global\n${_ctb_reset}"
printf " ${_ctb_highlight}-s${_ct},${_ctb_highlight} --schemefile <SCHEME_FILE> \
${_ct}Use the specified scheme file\n${_ctb_reset}"
}

__cleanup() {
trap '' SIGINT SIGTERM
unset -v _ct_error _ct_success _ct_warning _ct_highlight _ct_primary _ct
unset -v _ctb_error _ctb_success _ctb_warning _ctb_highlight _ctb_primary _ctb _c_reset
unset -v NORD_TERMINIX_SCRIPT_OPTS COLOR_SCHEME_FILE VERBOSE GLOBAL_INSTALL LOCAL_INSTALL
unset -f __help __cleanup __log_error __log_success __log_warning __log_info
unset -f __validate_file __local_install __global_install
}

__log_error() {
printf "${_ctb_error}[ERROR] ${_ct}$1${_c_reset}\n"
}

__log_success() {
printf "${_ctb_success}[OK] ${_ct}$1${_c_reset}\n"
}

__log_warning() {
printf "${_ctb_warning}[WARN] ${_ct}$1${_c_reset}\n"
}

__log_info() {
printf "${_ctb}[INFO] ${_ct}$1${_c_reset}\n"
}

__summary_success() {
if [ $GLOBAL_INSTALL = true ]; then
__log_success "Global installation completed"
else
__log_success "Local installation completed"
fi
__cleanup
exit 0
}

__summary_error() {
__log_error "An error occurred during the installation!"
__log_error "Exit code: $1"
__cleanup
exit 1
}

__global_install() {
__validate_file
if [ ! -d $GLOBAL_INSTALL_DIR ]; then
sudo mkdir -p $GLOBAL_INSTALL_DIR
if [ $? -eq 0 ]; then
if [ $VERBOSE = true ]; then __log_info "Created global directory $GLOBAL_INSTALL_DIR"; fi
else
__log_error "Could not create global directory $GLOBAL_INSTALL_DIR"
__summary_error 1
fi
fi
sudo cp -f $COLOR_SCHEME_FILE $GLOBAL_INSTALL_DIR
if [ $? -eq 0 ]; then
if [ $VERBOSE = true ]; then __log_success "Copied color scheme file to $GLOBAL_INSTALL_DIR"; fi
__summary_success
else
__log_error "Could not copy color scheme file to $GLOBAL_INSTALL_DIR"
__summary_error 1
fi
}

__local_install() {
__validate_file
if [ ! -d $LOCAL_INSTALL_DIR ]; then
mkdir -p $LOCAL_INSTALL_DIR
if [ $? -eq 0 ]; then
if [ $VERBOSE = true ]; then __log_info "Created local directory $LOCAL_INSTALL_DIR"; fi
else
__log_error "Could not create local directory $LOCAL_INSTALL_DIR"
__summary_error 1
fi
fi
cp -f $COLOR_SCHEME_FILE $LOCAL_INSTALL_DIR
if [ $? -eq 0 ]; then
if [ $VERBOSE = true ]; then __log_success "Copied color scheme file to $LOCAL_INSTALL_DIR"; fi
__summary_success
else
__log_error "Could not copy color scheme file to $LOCAL_INSTALL_DIR"
__summary_error 1
fi
}

__validate_file() {
if [ ! -f $COLOR_SCHEME_FILE ]; then
__log_error "Color scheme file not found: $COLOR_SCHEME_FILE"
__summary_error 1
fi
}

trap "printf '${_ctb_error}User aborted.${_ctb_reset}\n' && exit 1" SIGINT SIGTERM

NORD_TERMINIX_SCRIPT_OPTS=`getopt -o vghs: --long verbose,global,help,schemefile: -n 'install.sh' -- "$@"`
COLOR_SCHEME_FILE=src/json/nord.json
VERBOSE=false
GLOBAL_INSTALL=false
LOCAL_INSTALL_DIR=~/.config/terminix/schemes
GLOBAL_INSTALL_DIR=/usr/share/terminix/schemes

eval set -- "$NORD_TERMINIX_SCRIPT_OPTS"
while true; do
case "$1" in
-v | --verbose ) VERBOSE=true; shift ;;
-g | --global ) GLOBAL_INSTALL=true; shift ;;
-h | --help ) __help; exit 0; break ;;
-s | --schemefile )
COLOR_SCHEME_FILE="$2"; shift 2 ;;
-- ) shift; break ;;
* ) break ;;
esac
done

if [ $GLOBAL_INSTALL = true ]; then
__global_install
else
__local_install
fi

__cleanup
exit 0
38 changes: 38 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "nord-terminix",
"title": "Nord Terminix",
"version": "0.1.0",
"description": "A arctic, north-bluish clean and elegant Terminix color scheme.",
"author": {
"name": "Arctic Ice Studio",
"email": "[email protected]",
"url": "http://arcticicestudio.com"
},
"homepage": "https://github.com/arcticicestudio/nord-terminix",
"repository": {
"type": "git",
"url": "git+https://github.com/arcticicestudio/nord-terminix.git"
},
"bugs": {
"url": "https://github.com/arcticicestudio/nord-terminix/issues"
},
"license" : "(Apache-2.0 AND CC-BY-SA-4.0)",
"keywords": [
"nord",
"arctic",
"north",
"bluish",
"clean",
"elegant",
"terminix",
"color",
"scheme"
],
"devDependencies": {
"eslint": "3.10.2",
"eslint-plugin-json": "1.2.0"
},
"scripts": {
"lint": "eslint src/json/nord.json"
}
}
25 changes: 25 additions & 0 deletions src/json/nord.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Nord",
"comment": "A arctic, north-bluish clean and elegant Terminix color scheme.",
"use-theme-colors": false,
"foreground-color": "#D8DEE9",
"background-color": "#2E3440",
"palette": [
"#3B4252",
"#BF616A",
"#A3BE8C",
"#EBCB8B",
"#81A1C1",
"#B48EAD",
"#88C0D0",
"#E5E9F0",
"#4C566A",
"#BF616A",
"#A3BE8C",
"#EBCB8B",
"#81A1C1",
"#B48EAD",
"#8FBCBB",
"#ECEFF4"
]
}

0 comments on commit 81c35a9

Please sign in to comment.