├── .gitignore ├── LICENSE ├── README.md ├── hyperterm-gruvbox-dark.png ├── hyperterm-gruvbox-light.png ├── index.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Edvinas Aleksejonokas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hyperterm-gruvbox 2 | 3 | A [HyperTerm](https://hyperterm.org) theme based on [gruvbox](https://github.com/morhetz/gruvbox). 4 | 5 | ![screenshot](hyperterm-gruvbox-dark.png) 6 | ![screenshot](hyperterm-gruvbox-light.png) 7 | 8 | ## Install 9 | 10 | Add `hyperterm-gruvbox` to the plugins list in `~/.hyperterm.js` config file. 11 | 12 | ## Configuration 13 | 14 | One can adjust theme `style` and `contrast` options in `~/.hyperterm.js` config file. 15 | 16 | ``` 17 | gruvboxTheme: { 18 | style: 'dark', // or 'light' 19 | contrast: 'normal' // or 'soft', 'hard' 20 | }, 21 | ``` 22 | 23 | ## Inspired by 24 | 25 | * [gruvbox](https://github.com/morhetz/gruvbox) 26 | * [hyperterm-gruvbox-dark](https://github.com/mcchrish/hyperterm-gruvbox-dark/) 27 | 28 | ## License 29 | 30 | MIT © Edvinas Aleksejonokas 31 | -------------------------------------------------------------------------------- /hyperterm-gruvbox-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rezonanc/hyperterm-gruvbox/ce99f66cb67f69ff56cc784da2fde9b20097496a/hyperterm-gruvbox-dark.png -------------------------------------------------------------------------------- /hyperterm-gruvbox-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rezonanc/hyperterm-gruvbox/ce99f66cb67f69ff56cc784da2fde9b20097496a/hyperterm-gruvbox-light.png -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const Color = require('color') 4 | 5 | const gruvboxRedColor = '#cc241d' 6 | const gruvboxGreenColor = '#98971a' 7 | const gruvboxYellowColor = '#d79921' 8 | const gruvboxBlueColor = '#458588' 9 | const gruvboxPurpleColor = '#b16286' 10 | const gruvboxAquaColor = '#689d6a' 11 | const gruvboxGreyColor = '#928374' 12 | const gruvboxOrangeColor = '#d65d0e' 13 | 14 | const gruvboxLightRedColor = '#fb4934' 15 | const gruvboxLightGreenColor = '#b8bb26' 16 | const gruvboxLightYellowColor = '#fabd2f' 17 | const gruvboxLightBlueColor = '#83a598' 18 | const gruvboxLightPurpleColor = '#d3869b' 19 | const gruvboxLightAquaColor = '#8ec07c' 20 | const gruvboxLightGreyColor = '#a89984' 21 | // const gruvboxLightOrangeColor = '#fe8019' 22 | 23 | const gruvboxDarkRedColor = '#9d0006' 24 | const gruvboxDarkGreenColor = '#79740e' 25 | const gruvboxDarkYellowColor = '#b57614' 26 | const gruvboxDarkBlueColor = '#076678' 27 | const gruvboxDarkPurpleColor = '#8f3f71' 28 | const gruvboxDarkAquaColor = '#427b58' 29 | const gruvboxDarkGreyColor = '#7c6f64' 30 | // const gruvboxDarkOrangeColor = '#af3a03' 31 | 32 | const gruvboxDarkColorSoftConstrast = '#32302f' 33 | const gruvboxDarkColor = '#282828' 34 | const gruvboxDarkColorHardConstrast = '#1d2021' 35 | const gruvboxDarkColorOption1 = '#3c3836' 36 | const gruvboxDarkColorOption2 = '#504945' 37 | const gruvboxDarkColorOption3 = '#665c54' 38 | const gruvboxDarkColorOption4 = '#7c6f64' 39 | 40 | const gruvboxLightColorSoftConstrast = '#f2e5bc' 41 | const gruvboxLightColor = '#fbf1c7' 42 | const gruvboxLightColorHardConstrast = '#f9f5d7' 43 | const gruvboxLightColorOption1 = '#ebdbb2' 44 | const gruvboxLightColorOption2 = '#d5c4a1' 45 | const gruvboxLightColorOption3 = '#bdae93' 46 | const gruvboxLightColorOption4 = '#a89984' 47 | 48 | const darkThemeTerminalBlack = gruvboxDarkColor 49 | const darkThemeTerminalRed = gruvboxRedColor 50 | const darkThemeTerminalGreen = gruvboxGreenColor 51 | const darkThemeTerminalYellow = gruvboxYellowColor 52 | const darkThemeTerminalBlue = gruvboxBlueColor 53 | const darkThemeTerminalMagenta = gruvboxPurpleColor 54 | const darkThemeTerminalCyan = gruvboxAquaColor 55 | const darkThemeTerminalWhite = gruvboxLightGreyColor 56 | 57 | const darkThemeTerminalBrightBlack = gruvboxGreyColor 58 | const darkThemeTerminalBrightRed = gruvboxLightRedColor 59 | const darkThemeTerminalBrightGreen = gruvboxLightGreenColor 60 | const darkThemeTerminalBrightYellow = gruvboxLightYellowColor 61 | const darkThemeTerminalBrightBlue = gruvboxLightBlueColor 62 | const darkThemeTerminalBrightMagenta = gruvboxLightPurpleColor 63 | const darkThemeTerminalBrightCyan = gruvboxLightAquaColor 64 | const darkThemeTerminalBrightWhite = gruvboxLightColorOption1 65 | 66 | const darkThemeTerminalForeground = gruvboxLightColorOption1 67 | const darkThemeTerminalBackgroundSoftContrast = gruvboxDarkColorSoftConstrast 68 | const darkThemeTerminalBackground = gruvboxDarkColor 69 | const darkThemeTerminalBackgroundHardContrast = gruvboxDarkColorHardConstrast 70 | 71 | const lightThemeTerminalBlack = gruvboxLightColor 72 | const lightThemeTerminalRed = gruvboxRedColor 73 | const lightThemeTerminalGreen = gruvboxGreenColor 74 | const lightThemeTerminalYellow = gruvboxYellowColor 75 | const lightThemeTerminalBlue = gruvboxBlueColor 76 | const lightThemeTerminalMagenta = gruvboxPurpleColor 77 | const lightThemeTerminalCyan = gruvboxAquaColor 78 | const lightThemeTerminalWhite = gruvboxDarkGreyColor 79 | 80 | const lightThemeTerminalBrightBlack = gruvboxGreyColor 81 | const lightThemeTerminalBrightRed = gruvboxDarkRedColor 82 | const lightThemeTerminalBrightGreen = gruvboxDarkGreenColor 83 | const lightThemeTerminalBrightYellow = gruvboxDarkYellowColor 84 | const lightThemeTerminalBrightBlue = gruvboxDarkBlueColor 85 | const lightThemeTerminalBrightMagenta = gruvboxDarkPurpleColor 86 | const lightThemeTerminalBrightCyan = gruvboxDarkAquaColor 87 | const lightThemeTerminalBrightWhite = gruvboxDarkColorOption1 88 | 89 | const lightThemeTerminalForeground = gruvboxDarkColorOption1 90 | const lightThemeTerminalBackgroundSoftContrast = gruvboxLightColorSoftConstrast 91 | const lightThemeTerminalBackground = gruvboxLightColor 92 | const lightThemeTerminalBackgroundHardContrast = gruvboxLightColorHardConstrast 93 | 94 | var terminalColors = { 95 | dark: { 96 | black: darkThemeTerminalBlack, 97 | red: darkThemeTerminalRed, 98 | green: darkThemeTerminalGreen, 99 | yellow: darkThemeTerminalYellow, 100 | blue: darkThemeTerminalBlue, 101 | magenta: darkThemeTerminalMagenta, 102 | cyan: darkThemeTerminalCyan, 103 | white: darkThemeTerminalWhite, 104 | lightBlack: darkThemeTerminalBrightBlack, 105 | lightRed: darkThemeTerminalBrightRed, 106 | lightGreen: darkThemeTerminalBrightGreen, 107 | lightYellow: darkThemeTerminalBrightYellow, 108 | lightBlue: darkThemeTerminalBrightBlue, 109 | lightMagenta: darkThemeTerminalBrightMagenta, 110 | lightCyan: darkThemeTerminalBrightCyan, 111 | lightWhite: darkThemeTerminalBrightWhite 112 | }, 113 | light: { 114 | black: lightThemeTerminalBlack, 115 | red: lightThemeTerminalRed, 116 | green: lightThemeTerminalGreen, 117 | yellow: lightThemeTerminalYellow, 118 | blue: lightThemeTerminalBlue, 119 | magenta: lightThemeTerminalMagenta, 120 | cyan: lightThemeTerminalCyan, 121 | white: lightThemeTerminalWhite, 122 | lightBlack: lightThemeTerminalBrightBlack, 123 | lightRed: lightThemeTerminalBrightRed, 124 | lightGreen: lightThemeTerminalBrightGreen, 125 | lightYellow: lightThemeTerminalBrightYellow, 126 | lightBlue: lightThemeTerminalBrightBlue, 127 | lightMagenta: lightThemeTerminalBrightMagenta, 128 | lightCyan: lightThemeTerminalBrightCyan, 129 | lightWhite: lightThemeTerminalBrightWhite 130 | } 131 | } 132 | 133 | var terminalBackgrounds = { 134 | dark: { 135 | soft: darkThemeTerminalBackgroundSoftContrast, 136 | normal: darkThemeTerminalBackground, 137 | hard: darkThemeTerminalBackgroundHardContrast 138 | }, 139 | light: { 140 | soft: lightThemeTerminalBackgroundSoftContrast, 141 | normal: lightThemeTerminalBackground, 142 | hard: lightThemeTerminalBackgroundHardContrast 143 | } 144 | } 145 | 146 | var terminalForegrounds = { 147 | dark: darkThemeTerminalForeground, 148 | light: lightThemeTerminalForeground 149 | } 150 | 151 | var backgroundColorOptions = { 152 | dark: { 153 | option1: gruvboxDarkColorOption1, 154 | option2: gruvboxDarkColorOption2, 155 | option3: gruvboxDarkColorOption3, 156 | option4: gruvboxDarkColorOption4 157 | }, 158 | light: { 159 | option1: gruvboxLightColorOption1, 160 | option2: gruvboxLightColorOption2, 161 | option3: gruvboxLightColorOption3, 162 | option4: gruvboxLightColorOption4 163 | } 164 | } 165 | 166 | exports.decorateConfig = config => { 167 | var themeStyle = config.gruvboxTheme.style || 'dark' 168 | var themeContrast = config.gruvboxTheme.contrast || 'normal' 169 | var terminalForegroundColor = terminalForegrounds[themeStyle] 170 | var terminalBackgroundColor = terminalBackgrounds[themeStyle][themeContrast] 171 | var backgroundColors = backgroundColorOptions[themeStyle] 172 | var backgroundColorForActiveTab = backgroundColors.option1 173 | var cursorMixBlendMode = themeStyle == 'dark' ? 'lighten' : 'darken' 174 | 175 | return Object.assign({}, config, { 176 | foregroundColor: terminalForegroundColor, 177 | backgroundColor: terminalBackgroundColor, 178 | colors: terminalColors[themeStyle], 179 | cursorColor: gruvboxOrangeColor, 180 | css: ` 181 | ${config.css || ''} 182 | .tabs_list, 183 | .tab_tab, 184 | .tabs_borderShim { 185 | color: ${terminalForegroundColor} !important; 186 | background-color: ${terminalBackgroundColor} !important; 187 | border-color: transparent !important; 188 | } 189 | .tab_active { 190 | background-color: ${backgroundColorForActiveTab} !important; 191 | box-shadow: 2px 0 0 0 ${gruvboxOrangeColor} inset; 192 | } 193 | `, 194 | termCSS: ` 195 | ${config.termCSS || ''} 196 | .cursor-node { 197 | mix-blend-mode: ${cursorMixBlendMode}; 198 | } 199 | ` 200 | }) 201 | } 202 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hyperterm-gruvbox", 3 | "version": "0.0.2", 4 | "description": "HyperTerm theme based on Gruvbox", 5 | "license": "MIT", 6 | "repository": "rezonanc/hyperterm-gruvbox", 7 | "author": { 8 | "name": "Edvinas Aleksejonokas", 9 | "email": "rezonanc@gmail.com" 10 | }, 11 | "files": [ 12 | "index.js" 13 | ], 14 | "keywords": [ 15 | "hyperterm", 16 | "hyperterm-theme", 17 | "gruvbox", 18 | "gruvbox-dark", 19 | "gruvbox-light" 20 | ], 21 | "scripts": { 22 | "lint": "standard ./**/*.js", 23 | "test": "npm run lint" 24 | }, 25 | "dependencies": { 26 | "color": "1.0.3" 27 | }, 28 | "devDependencies": { 29 | "standard": "^7.1.2" 30 | } 31 | } 32 | --------------------------------------------------------------------------------