diff --git a/CHANGELOG.md b/CHANGELOG.md index 0890857..7732fc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,26 @@ --- +# 0.3.0 +*2017-03-09* +## Features +### [Configurations][readme-configuration] +❯ Added a configuration to set the [cursor blinking](https://github.com/arcticicestudio/nord-hyper#cursor-blinking). +The default value is `true` to enable the non-obtrusive cursor blinking feature. (@zovt, #7, 27820cf8) +```js +module.exports = { + config: { + //... + nordHyper: { + cursorBlink: true + } + //... + } +} +``` + +

+ # 0.2.0 *2017-03-08* ## Features @@ -43,3 +63,5 @@ Detailed information about features and install instructions can be found in the # 0.0.0 *2017-02-19* **Project Initialization** + +[readme-configuration]: https://github.com/arcticicestudio/nord-hyper#configuration diff --git a/README.md b/README.md index 899469c..241abd3 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,26 @@ hpm install nord-hyper

Non-obtrusive cursor blinking.

+## Configuration +All configurations are set in the `nordHyper` object in your `~/.hyper.js` file. + +### Cursor Blinking +The cursor blinking can be set with the `cursorBlink` attribute. +The default value is `true` to enable the non-obtrusive cursor blinking feature. +```js +module.exports = { + config: { + //... + nordHyper: { + cursorBlink: true, + } + //... + } +} +``` + ## Development -[![](https://img.shields.io/badge/Changelog-0.2.0-81A1C1.svg)](https://github.com/arcticicestudio/nord-hyper/blob/v0.2.0/CHANGELOG.md) [![](https://img.shields.io/badge/Workflow-gitflow--branching--model-81A1C1.svg)](http://nvie.com/posts/a-successful-git-branching-model) [![](https://img.shields.io/badge/Versioning-ArcVer_0.8.0-81A1C1.svg)](https://github.com/arcticicestudio/arcver) +[![](https://img.shields.io/badge/Changelog-0.3.0-81A1C1.svg)](https://github.com/arcticicestudio/nord-hyper/blob/v0.3.0/CHANGELOG.md) [![](https://img.shields.io/badge/Workflow-gitflow--branching--model-81A1C1.svg)](http://nvie.com/posts/a-successful-git-branching-model) [![](https://img.shields.io/badge/Versioning-ArcVer_0.8.0-81A1C1.svg)](https://github.com/arcticicestudio/arcver) Continuous integration builds are running at [Travis-CI](https://travis-ci.org/arcticicestudio/nord-hyper) and [Circle CI](https://circleci.com/gh/arcticicestudio/nord-hyper). diff --git a/index.js b/index.js index 82792bb..c616637 100644 --- a/index.js +++ b/index.js @@ -53,7 +53,23 @@ const colors = { grayscale: foregroundColor }; +let cursorBlinkCSS = ` +@keyframes blink { + 10%, 50% { opacity: 0 } + 60%, 100% { opacity: 1 } +} +.cursor-node[focus=true] { + mix-blend-mode: difference; +} +.cursor-node[focus=true]:not([hyper-blink-moving]) { + box-sizing: content-box !important; + animation: blink 1s ease infinite; +} +`; + exports.decorateConfig = config => { + const nordHyper = Object.assign({cursorBlink: true}, config.nordHyper); + return Object.assign({}, config, { foregroundColor, backgroundColor, @@ -71,17 +87,7 @@ exports.decorateConfig = config => { .cursor-node { border-left-width: 2px; } - @keyframes blink { - 10%, 50% { opacity: 0 } - 60%, 100% { opacity: 1 } - } - .cursor-node[focus=true] { - mix-blend-mode: difference; - } - .cursor-node[focus=true]:not([hyper-blink-moving]) { - box-sizing: content-box !important; - animation: blink 1s ease infinite; - } + ${nordHyper.cursorBlink ? cursorBlinkCSS : ""} `, css: ` ${config.css || ""} diff --git a/package.json b/package.json index 2d8bd77..489d4bd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nord-hyper", "title": "Nord Hyper", - "version": "0.2.0", + "version": "0.3.0", "description": "A arctic, north-bluish clean and elegant Hyper theme plugin", "author": { "name": "Arctic Ice Studio",