Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add KDE Konsole colorscheme #265

Merged
merged 2 commits into from
Jun 22, 2021
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
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Here are the locations of the files that are generated by the build system, alon
| `term/One Dark.itermcolors` | `build/templates/One Dark.itermcolors` |
| `term/One Dark.terminal` | `build/templates/One Dark.terminal` |
| `term/One Dark.alacritty` | `build/templates/One Dark.alacritty` |
| `term/One Dark.colorscheme` | `build/templates/One Dark.colorscheme` |

### Configure It

Expand Down
11 changes: 10 additions & 1 deletion build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ try {
const xresources = readFileSync(resolve(__dirname, '../term/One Dark.Xresources'), 'utf8')
const terminalPalette = termcolors.xresources.import(xresources)

let alacrittyTemplate, itermTemplate, kittyTemplate, terminalAppTemplate
let alacrittyTemplate, itermTemplate, kittyTemplate, konsoleTemplate, terminalAppTemplate

// Compile custom terminal color templates based on ones that ship with termcolors
try {
Expand All @@ -129,6 +129,14 @@ try {
})
)

konsoleTemplate = termcolors.export(
// From termcolors/lib/formats/konsole.js
readFileSync(resolve(__dirname, 'templates/One Dark.colorscheme')),
_.partialRight(_.mapValues, function (color) {
return color.toRgbArray().join()
})
)

// From termcolors/lib/formats/terminal-app.js
const code = [
Buffer.from('62706c6973743030d40102030405061516582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a307080f55246e756c6cd3090a0b0c0d0e554e535247425c4e53436f6c6f7253706163655624636c6173734f1027', 'hex'),
Expand Down Expand Up @@ -157,6 +165,7 @@ try {
writeFileSync(resolve(__dirname, '../term/One Dark.alacritty'), alacrittyTemplate(terminalPalette))
writeFileSync(resolve(__dirname, '../term/One Dark.itermcolors'), itermTemplate(terminalPalette))
writeFileSync(resolve(__dirname, '../term/One Dark.kitty'), kittyTemplate(terminalPalette))
writeFileSync(resolve(__dirname, '../term/One Dark.colorscheme'), konsoleTemplate(terminalPalette))
writeFileSync(resolve(__dirname, '../term/One Dark.terminal'), terminalAppTemplate(terminalPalette))
} catch (e) {
handleError('Error writing terminal color file', e)
Expand Down
96 changes: 96 additions & 0 deletions build/templates/One Dark.colorscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
[Background]
Color={{=c.background}}

[BackgroundFaint]
Color={{=c.background}}

[BackgroundIntense]
Color={{=c.background}}

[Color0]
Color={{=c[0]}}

[Color0Faint]
Color={{=c[0]}}

[Color0Intense]
Color={{=c[8]}}

[Color1]
Color={{=c[1]}}

[Color1Faint]
Color={{=c[1]}}

[Color1Intense]
Color={{=c[9]}}

[Color2]
Color={{=c[2]}}

[Color2Faint]
Color={{=c[2]}}

[Color2Intense]
Color={{=c[10]}}

[Color3]
Color={{=c[3]}}

[Color3Faint]
Color={{=c[3]}}

[Color3Intense]
Color={{=c[11]}}

[Color4]
Color={{=c[4]}}

[Color4Faint]
Color={{=c[4]}}

[Color4Intense]
Color={{=c[12]}}

[Color5]
Color={{=c[5]}}

[Color5Faint]
Color={{=c[5]}}

[Color5Intense]
Color={{=c[13]}}

[Color6]
Color={{=c[6]}}

[Color6Faint]
Color={{=c[6]}}

[Color6Intense]
Color={{=c[14]}}

[Color7]
Color={{=c[7]}}

[Color7Faint]
Color={{=c[7]}}

[Color7Intense]
Color={{=c[15]}}

[Foreground]
Color={{=c.foreground}}

[ForegroundFaint]
Color={{=c.foreground}}

[ForegroundIntense]
Color={{=c.foreground}}

[General]
Blur=false
ColorRandomization=false
Description=One Dark
Opacity=1
Wallpaper=
96 changes: 96 additions & 0 deletions term/One Dark.colorscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
[Background]
Color=40,44,52

[BackgroundFaint]
Color=40,44,52

[BackgroundIntense]
Color=40,44,52

[Color0]
Color=92,99,112

[Color0Faint]
Color=92,99,112

[Color0Intense]
Color=75,82,99

[Color1]
Color=224,108,117

[Color1Faint]
Color=224,108,117

[Color1Intense]
Color=190,80,70

[Color2]
Color=152,195,121

[Color2Faint]
Color=152,195,121

[Color2Intense]
Color=152,195,121

[Color3]
Color=229,192,123

[Color3Faint]
Color=229,192,123

[Color3Intense]
Color=209,154,102

[Color4]
Color=97,175,239

[Color4Faint]
Color=97,175,239

[Color4Intense]
Color=97,175,239

[Color5]
Color=198,120,221

[Color5Faint]
Color=198,120,221

[Color5Intense]
Color=198,120,221

[Color6]
Color=86,182,194

[Color6Faint]
Color=86,182,194

[Color6Intense]
Color=86,182,194

[Color7]
Color=171,178,191

[Color7Faint]
Color=171,178,191

[Color7Intense]
Color=62,68,82

[Foreground]
Color=171,178,191

[ForegroundFaint]
Color=171,178,191

[ForegroundIntense]
Color=171,178,191

[General]
Blur=false
ColorRandomization=false
Description=One Dark
Opacity=1
Wallpaper=