Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,22 @@ module.exports = {
}
```

In addition, you can set `borderColors` to `'random'` (string value) instead of an array of objects:

```javascript
module.exports = {
config: {
...
hyperBorder: {
borderColors: 'random',
borderWidth: '8px'
}
...
}
}
```

By that, every newly opened HyperTerm window will have a different colored border.

## download HyperTerm here
https://hyperterm.org/
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ module.exports.decorateConfig = (config) => {
borderWidth: '4px',
borderColors: ['#fc1da7', '#fba506']
}, config.hyperBorder);

if(typeof configObj.borderColors === 'string'
&& configObj.borderColors.toLowerCase() === 'random') {
var randomColor = function() {
return '#'+Math.floor(Math.random()*16777215).toString(16);
};

configObj.borderColors = [
randomColor(),
randomColor()
];
}

var colors = configObj.borderColors.join(',');
var borderWidth = configObj.borderWidth;
return Object.assign({}, config, {
Expand Down