feat: add Ghostty terminal support (#225)

Add shipwright runner for Ghostty terminal emulator with example themes.

- Add ghostty.lua runner with Ghostty-specific color format
- Update init.lua to include ghostty in runner_files
- Add zenbones_dark and zenbones_light example themes

Ghostty uses a similar format to Kitty but with `=` separators and
`palette = N=COLOR` syntax for the 16 ANSI colors.

Tested and working with Ghostty terminal.
This commit is contained in:
Fredrik Averpil
2025-12-01 15:27:32 +01:00
committed by GitHub
parent a934bc07d2
commit 3da02e553a
21 changed files with 772 additions and 0 deletions

37
extras/ghostty/duckbones Normal file
View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#EBEFC0"
background = "#0E101A"
# Selection colors
selection-foreground = "#EBEFC0"
selection-background = "#37382D"
# Cursor colors
cursor-color = "#EDF2C2"
cursor-text = "#0E101A"
# The basic 16 colors
# black
palette = 0=#0E101A
palette = 8=#2B2F46
# red
palette = 1=#E03600
palette = 9=#FF4821
# green
palette = 2=#5DCD97
palette = 10=#58DB9E
# yellow
palette = 3=#E39500
palette = 11=#F6A100
# blue
palette = 4=#00A3CB
palette = 12=#00B4E0
# magenta
palette = 5=#795CCC
palette = 13=#B3A1E6
# cyan
palette = 6=#00A3CB
palette = 14=#00B4E0
# white
palette = 7=#EBEFC0
palette = 15=#B3B692

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#E7DCC4"
background = "#2C343A"
# Selection colors
selection-foreground = "#E7DCC4"
selection-background = "#615B51"
# Cursor colors
cursor-color = "#EBE2CF"
cursor-text = "#2C343A"
# The basic 16 colors
# black
palette = 0=#2C343A
palette = 8=#45525C
# red
palette = 1=#E67C7F
palette = 9=#ED9294
# green
palette = 2=#A9C181
palette = 10=#B0CE7B
# yellow
palette = 3=#DDBD7F
palette = 11=#EDC77A
# blue
palette = 4=#7FBCB4
palette = 12=#7AC9C0
# magenta
palette = 5=#D69AB7
palette = 13=#E5A7C4
# cyan
palette = 6=#83C193
palette = 14=#7DD093
# white
palette = 7=#E7DCC4
palette = 15=#B2A790

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#4F5B62"
background = "#FAF3E1"
# Selection colors
selection-foreground = "#4F5B62"
selection-background = "#D3DFE6"
# Cursor colors
cursor-color = "#4F5B62"
cursor-text = "#FAF3E1"
# The basic 16 colors
# black
palette = 0=#FAF3E1
palette = 8=#DBC988
# red
palette = 1=#F85550
palette = 9=#E6271C
# green
palette = 2=#8DA200
palette = 10=#758700
# yellow
palette = 3=#DEA000
palette = 11=#B98500
# blue
palette = 4=#3A94C4
palette = 12=#297CA6
# magenta
palette = 5=#DF69BA
palette = 13=#CA43A3
# cyan
palette = 6=#36A87E
palette = 14=#258C67
# white
palette = 7=#4F5B62
palette = 15=#6E7F88

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#DDD8BB"
background = "#1F1F28"
# Selection colors
selection-foreground = "#DDD8BB"
selection-background = "#49473E"
# Cursor colors
cursor-color = "#E6E0C2"
cursor-text = "#1F1F28"
# The basic 16 colors
# black
palette = 0=#1F1F28
palette = 8=#3C3C51
# red
palette = 1=#E46A78
palette = 9=#EC818C
# green
palette = 2=#98BC6D
palette = 10=#9EC967
# yellow
palette = 3=#E5C283
palette = 11=#F1C982
# blue
palette = 4=#7EB3C9
palette = 12=#7BC2DF
# magenta
palette = 5=#957FB8
palette = 13=#A98FD2
# cyan
palette = 6=#7EB3C9
palette = 14=#7BC2DF
# white
palette = 7=#DDD8BB
palette = 15=#A8A48D

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#C6D5CF"
background = "#0F191F"
# Selection colors
selection-foreground = "#C6D5CF"
selection-background = "#3A3E3D"
# Cursor colors
cursor-color = "#CEDDD7"
cursor-text = "#0F191F"
# The basic 16 colors
# black
palette = 0=#0F191F
palette = 8=#263945
# red
palette = 1=#DE6E7C
palette = 9=#E8838F
# green
palette = 2=#90FF6B
palette = 10=#A0FF85
# yellow
palette = 3=#B77E64
palette = 11=#D68C67
# blue
palette = 4=#8190D4
palette = 12=#92A0E2
# magenta
palette = 5=#B279A7
palette = 13=#CF86C1
# cyan
palette = 6=#66A5AD
palette = 14=#65B8C1
# white
palette = 7=#C6D5CF
palette = 15=#98A39E

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#202E18"
background = "#E5EDE6"
# Selection colors
selection-foreground = "#202E18"
selection-background = "#ADE48C"
# Cursor colors
cursor-color = "#202E18"
cursor-text = "#E5EDE6"
# The basic 16 colors
# black
palette = 0=#E5EDE6
palette = 8=#B3C6B6
# red
palette = 1=#A8334C
palette = 9=#94253E
# green
palette = 2=#567A30
palette = 10=#3F5A22
# yellow
palette = 3=#944927
palette = 11=#803D1C
# blue
palette = 4=#286486
palette = 12=#1D5573
# magenta
palette = 5=#88507D
palette = 13=#7B3B70
# cyan
palette = 6=#3B8992
palette = 14=#2B747C
# white
palette = 7=#202E18
palette = 15=#415934

37
extras/ghostty/nordbones Normal file
View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#EBEEF3"
background = "#2F3541"
# Selection colors
selection-foreground = "#EBEEF3"
selection-background = "#545F70"
# Cursor colors
cursor-color = "#EEF1F5"
cursor-text = "#2F3541"
# The basic 16 colors
# black
palette = 0=#2F3541
palette = 8=#475063
# red
palette = 1=#C1616A
palette = 9=#D6787F
# green
palette = 2=#A4BE8D
palette = 10=#A8CC86
# yellow
palette = 3=#CF866F
palette = 11=#E09680
# blue
palette = 4=#8FBCBA
palette = 12=#89CAC8
# magenta
palette = 5=#B38DAC
palette = 13=#CF97C5
# cyan
palette = 6=#87BFCE
palette = 14=#82CCE0
# white
palette = 7=#EBEEF3
palette = 15=#A5B4CD

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#E1D4D4"
background = "#1A1825"
# Selection colors
selection-foreground = "#E1D4D4"
selection-background = "#523A39"
# Cursor colors
cursor-color = "#E7DDDD"
cursor-text = "#1A1825"
# The basic 16 colors
# black
palette = 0=#1A1825
palette = 8=#3A3651
# red
palette = 1=#EB7193
palette = 9=#F289A4
# green
palette = 2=#317490
palette = 10=#358DAF
# yellow
palette = 3=#F6C074
palette = 11=#F9CA8E
# blue
palette = 4=#9CCFD8
palette = 12=#94DAE6
# magenta
palette = 5=#C4A7E7
palette = 13=#CEB3EF
# cyan
palette = 6=#9CCFD8
palette = 14=#94DAE6
# white
palette = 7=#E1D4D4
palette = 15=#BF9B99

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#724341"
background = "#FBF6F0"
# Selection colors
selection-foreground = "#724341"
selection-background = "#EADDDC"
# Cursor colors
cursor-color = "#724341"
cursor-text = "#FBF6F0"
# The basic 16 colors
# black
palette = 0=#FBF6F0
palette = 8=#E8C48B
# red
palette = 1=#B5637A
palette = 9=#A54A66
# green
palette = 2=#286A84
palette = 10=#1C5970
# yellow
palette = 3=#EC9D33
palette = 11=#C68223
# blue
palette = 4=#5795A0
palette = 12=#407D88
# magenta
palette = 5=#917BA9
palette = 13=#855AAC
# cyan
palette = 6=#5795A0
palette = 14=#407D88
# white
palette = 7=#724341
palette = 15=#A4635F

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#DDDDDD"
background = "#4B4B4B"
# Selection colors
selection-foreground = "#DDDDDD"
selection-background = "#777777"
# Cursor colors
cursor-color = "#E2E2E2"
cursor-text = "#4B4B4B"
# The basic 16 colors
# black
palette = 0=#4B4B4B
palette = 8=#6C6465
# red
palette = 1=#E388A3
palette = 9=#EB99B1
# green
palette = 2=#98BD99
palette = 10=#8FCD92
# yellow
palette = 3=#FFDF9B
palette = 11=#FFE5B3
# blue
palette = 4=#97BDDE
palette = 12=#A2C8E9
# magenta
palette = 5=#A5A6C5
palette = 13=#B2B3DA
# cyan
palette = 6=#6FBDBE
palette = 14=#6BCACB
# white
palette = 7=#DDDDDD
palette = 15=#A8A8A8

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#555555"
background = "#E2E2E2"
# Selection colors
selection-foreground = "#555555"
selection-background = "#CCCCCC"
# Cursor colors
cursor-color = "#555555"
cursor-text = "#E2E2E2"
# The basic 16 colors
# black
palette = 0=#E2E2E2
palette = 8=#BFBABB
# red
palette = 1=#DC5284
palette = 9=#BE3C6D
# green
palette = 2=#628562
palette = 10=#487249
# yellow
palette = 3=#C48562
palette = 11=#A76B48
# blue
palette = 4=#0084A3
palette = 12=#006F89
# magenta
palette = 5=#896788
palette = 13=#7F4C7E
# cyan
palette = 6=#008586
palette = 14=#006F70
# white
palette = 7=#555555
palette = 15=#777777

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#C0CAF5"
background = "#1A1B26"
# Selection colors
selection-foreground = "#C0CAF5"
selection-background = "#2C4075"
# Cursor colors
cursor-color = "#CED6F7"
cursor-text = "#1A1B26"
# The basic 16 colors
# black
palette = 0=#1A1B26
palette = 8=#36384D
# red
palette = 1=#F77890
palette = 9=#F98EA0
# green
palette = 2=#74DBCB
palette = 10=#6DE5D3
# yellow
palette = 3=#E1B068
palette = 11=#F2BA64
# blue
palette = 4=#7BA2F7
palette = 12=#90AFFA
# magenta
palette = 5=#BB9BF7
palette = 13=#C6ACFA
# cyan
palette = 6=#2BC4DE
palette = 14=#74DBCB
# white
palette = 7=#C0CAF5
palette = 15=#7E98EB

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#333A57"
background = "#D6D7DC"
# Selection colors
selection-foreground = "#333A57"
selection-background = "#BBC0D8"
# Cursor colors
cursor-color = "#333A57"
cursor-text = "#D6D7DC"
# The basic 16 colors
# black
palette = 0=#D6D7DC
palette = 8=#ADB0BD
# red
palette = 1=#8B4351
palette = 9=#7E3242
# green
palette = 2=#34645D
palette = 10=#26554F
# yellow
palette = 3=#8F5E14
palette = 11=#794E0D
# blue
palette = 4=#34548C
palette = 12=#26467A
# magenta
palette = 5=#5A4A79
palette = 13=#503875
# cyan
palette = 6=#176775
palette = 14=#34645D
# white
palette = 7=#333A57
palette = 15=#56618D

37
extras/ghostty/vimbones Normal file
View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#353535"
background = "#F0F0CA"
# Selection colors
selection-foreground = "#353535"
selection-background = "#D7D7D7"
# Cursor colors
cursor-color = "#353535"
cursor-text = "#F0F0CA"
# The basic 16 colors
# black
palette = 0=#F0F0CA
palette = 8=#C6C6A3
# red
palette = 1=#A8334C
palette = 9=#94253E
# green
palette = 2=#4F6C31
palette = 10=#3F5A22
# yellow
palette = 3=#944927
palette = 11=#803D1C
# blue
palette = 4=#286486
palette = 12=#1D5573
# magenta
palette = 5=#88507D
palette = 13=#7B3B70
# cyan
palette = 6=#3B8992
palette = 14=#2B747C
# white
palette = 7=#353535
palette = 15=#5C5C5C

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#B4BDC3"
background = "#1C1917"
# Selection colors
selection-foreground = "#B4BDC3"
selection-background = "#3D4042"
# Cursor colors
cursor-color = "#C4CACF"
cursor-text = "#1C1917"
# The basic 16 colors
# black
palette = 0=#1C1917
palette = 8=#403833
# red
palette = 1=#DE6E7C
palette = 9=#E8838F
# green
palette = 2=#819B69
palette = 10=#8BAE68
# yellow
palette = 3=#B77E64
palette = 11=#D68C67
# blue
palette = 4=#6099C0
palette = 12=#61ABDA
# magenta
palette = 5=#B279A7
palette = 13=#CF86C1
# cyan
palette = 6=#66A5AD
palette = 14=#65B8C1
# white
palette = 7=#B4BDC3
palette = 15=#888F94

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#2C363C"
background = "#F0EDEC"
# Selection colors
selection-foreground = "#2C363C"
selection-background = "#CBD9E3"
# Cursor colors
cursor-color = "#2C363C"
cursor-text = "#F0EDEC"
# The basic 16 colors
# black
palette = 0=#F0EDEC
palette = 8=#CFC1BA
# red
palette = 1=#A8334C
palette = 9=#94253E
# green
palette = 2=#4F6C31
palette = 10=#3F5A22
# yellow
palette = 3=#944927
palette = 11=#803D1C
# blue
palette = 4=#286486
palette = 12=#1D5573
# magenta
palette = 5=#88507D
palette = 13=#7B3B70
# cyan
palette = 6=#3B8992
palette = 14=#2B747C
# white
palette = 7=#2C363C
palette = 15=#4F5E68

37
extras/ghostty/zenburned Normal file
View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#F0E4CF"
background = "#404040"
# Selection colors
selection-foreground = "#F0E4CF"
selection-background = "#746956"
# Cursor colors
cursor-color = "#F3EADB"
cursor-text = "#404040"
# The basic 16 colors
# black
palette = 0=#404040
palette = 8=#625A5B
# red
palette = 1=#E3716E
palette = 9=#EC8685
# green
palette = 2=#819B69
palette = 10=#8BAE68
# yellow
palette = 3=#B77E64
palette = 11=#D68C67
# blue
palette = 4=#6099C0
palette = 12=#61ABDA
# magenta
palette = 5=#B279A7
palette = 13=#CF86C1
# cyan
palette = 6=#66A5AD
palette = 14=#65B8C1
# white
palette = 7=#F0E4CF
palette = 15=#C0AB86

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#BBBBBB"
background = "#191919"
# Selection colors
selection-foreground = "#BBBBBB"
selection-background = "#404040"
# Cursor colors
cursor-color = "#C9C9C9"
cursor-text = "#191919"
# The basic 16 colors
# black
palette = 0=#191919
palette = 8=#3D3839
# red
palette = 1=#DE6E7C
palette = 9=#E8838F
# green
palette = 2=#819B69
palette = 10=#8BAE68
# yellow
palette = 3=#B77E64
palette = 11=#D68C67
# blue
palette = 4=#6099C0
palette = 12=#61ABDA
# magenta
palette = 5=#B279A7
palette = 13=#CF86C1
# cyan
palette = 6=#66A5AD
palette = 14=#65B8C1
# white
palette = 7=#BBBBBB
palette = 15=#8E8E8E

View File

@@ -0,0 +1,37 @@
# This file is auto-generated by shipwright.nvim
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "#353535"
background = "#EEEEEE"
# Selection colors
selection-foreground = "#353535"
selection-background = "#D7D7D7"
# Cursor colors
cursor-color = "#353535"
cursor-text = "#EEEEEE"
# The basic 16 colors
# black
palette = 0=#EEEEEE
palette = 8=#C6C3C3
# red
palette = 1=#A8334C
palette = 9=#94253E
# green
palette = 2=#4F6C31
palette = 10=#3F5A22
# yellow
palette = 3=#944927
palette = 11=#803D1C
# blue
palette = 4=#286486
palette = 12=#1D5573
# magenta
palette = 5=#88507D
palette = 13=#7B3B70
# cyan
palette = 6=#3B8992
palette = 14=#2B747C
# white
palette = 7=#353535
palette = 15=#5C5C5C

View File

@@ -82,6 +82,7 @@ M.run = function()
"iterm", "iterm",
"alacritty", "alacritty",
"kitty", "kitty",
"ghostty",
"wezterm", "wezterm",
"tmux", "tmux",
"windows_terminal", "windows_terminal",

View File

@@ -0,0 +1,68 @@
local helpers = require "shipwright.transform.helpers"
local base_template = [[
# Ghostty color configuration
# See: https://ghostty.org/docs/config/reference
# Basic colors
foreground = "$fg"
background = "$bg"
# Selection colors
selection-foreground = "$selection_fg"
selection-background = "$selection_bg"
# Cursor colors
cursor-color = "$cursor_bg"
cursor-text = "$cursor_fg"
# The basic 16 colors
# black
palette = 0=$black
palette = 8=$bright_black
# red
palette = 1=$red
palette = 9=$bright_red
# green
palette = 2=$green
palette = 10=$bright_green
# yellow
palette = 3=$yellow
palette = 11=$bright_yellow
# blue
palette = 4=$blue
palette = 12=$bright_blue
# magenta
palette = 5=$magenta
palette = 13=$bright_magenta
# cyan
palette = 6=$cyan
palette = 14=$bright_cyan
# white
palette = 7=$white
palette = 15=$bright_white]]
local function ghostty_conf(colors)
local text = helpers.apply_template(base_template, colors)
return helpers.split_newlines(text)
end
---@diagnostic disable: undefined-global
-- selene: allow(undefined_variable)
run(
{ specs, p, term },
transform.colorscheme_to_term_colors,
ghostty_conf,
{ prepend, "# This file is auto-generated by shipwright.nvim" },
{ overwrite, string.format("extras/ghostty/%s", name) }
)
-- selene: deny(undefined_variable)
---@diagnostic enable: undefined-global