diff --git a/README.md b/README.md
index 899469c..751f6e1 100644
--- a/README.md
+++ b/README.md
@@ -39,6 +39,24 @@ hpm install nord-hyper
Non-obtrusive cursor blinking.
![](https://raw.githubusercontent.com/arcticicestudio/nord-hyper/develop/assets/scrcast-feature-cursor-blink.gif)
+## 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)
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 || ""}