mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 13:48:41 -09:00
configurable cursor opacity (#76)
This commit is contained in:
parent
c83f1563b4
commit
51b72325f2
3 changed files with 6 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
/* global Blob,URL,requestAnimationFrame */
|
/* global Blob,URL,requestAnimationFrame */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import Color from 'color';
|
||||||
import hterm from '../hterm';
|
import hterm from '../hterm';
|
||||||
import Component from '../component';
|
import Component from '../component';
|
||||||
|
|
||||||
|
|
@ -26,7 +27,7 @@ export default class Term extends Component {
|
||||||
this.term.prefs_.set('font-family', props.fontFamily);
|
this.term.prefs_.set('font-family', props.fontFamily);
|
||||||
this.term.prefs_.set('font-size', props.fontSize);
|
this.term.prefs_.set('font-size', props.fontSize);
|
||||||
this.term.prefs_.set('font-smoothing', props.fontSmoothing);
|
this.term.prefs_.set('font-smoothing', props.fontSmoothing);
|
||||||
this.term.prefs_.set('cursor-color', props.cursorColor);
|
this.term.prefs_.set('cursor-color', Color(props.cursorColor).rgbString());
|
||||||
this.term.prefs_.set('enable-clipboard-notice', false);
|
this.term.prefs_.set('enable-clipboard-notice', false);
|
||||||
this.term.prefs_.set('foreground-color', props.foregroundColor);
|
this.term.prefs_.set('foreground-color', props.foregroundColor);
|
||||||
this.term.prefs_.set('background-color', props.backgroundColor);
|
this.term.prefs_.set('background-color', props.backgroundColor);
|
||||||
|
|
@ -181,7 +182,7 @@ export default class Term extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.cursorColor !== nextProps.cursorColor) {
|
if (this.props.cursorColor !== nextProps.cursorColor) {
|
||||||
this.term.prefs_.set('cursor-color', nextProps.cursorColor);
|
this.term.prefs_.set('cursor-color', Color(nextProps.cursorColor).rgbString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.colors !== nextProps.colors) {
|
if (this.props.colors !== nextProps.colors) {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
"repository": "zeit/hyperterm",
|
"repository": "zeit/hyperterm",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"aphrodite-simple": "0.4.1",
|
"aphrodite-simple": "0.4.1",
|
||||||
|
"color": "^0.11.3",
|
||||||
"hterm-umdjs": "1.1.3",
|
"hterm-umdjs": "1.1.3",
|
||||||
"json-loader": "0.5.4",
|
"json-loader": "0.5.4",
|
||||||
"mousetrap": "1.6.0",
|
"mousetrap": "1.6.0",
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ module.exports = {
|
||||||
// font family with optional fallbacks
|
// font family with optional fallbacks
|
||||||
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
|
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
|
||||||
|
|
||||||
// terminal cursor background color (hex)
|
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
|
||||||
cursorColor: '#F81CE5',
|
cursorColor: 'rgba(248,28,229,0.75)',
|
||||||
|
|
||||||
// color of the text
|
// color of the text
|
||||||
foregroundColor: '#fff',
|
foregroundColor: '#fff',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue