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 support for Ghostty terminal emulator #160

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion lua/nordic/colors/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
local U = require('nordic.utils')
local P = require('nordic.colors.nordic')

---@class NordicPalette: NordicColors
local C = {}

function C.build_palette()
Expand Down Expand Up @@ -28,7 +29,7 @@ function C.build_palette()
-- Some of the format is from @folke/tokyonight.nvim.

-- Backgrounds
C.bg = (options.transparent.bg and C.none) or ((options.swap_backgrounds and C.black1) or C.gray0)
C.bg = (options.transparent.bg and C.none) or ((options.swap_backgrounds and C.black1) or C.black2)
C.bg_dark = (options.transparent.bg and C.none) or C.black0
C.bg_sidebar = (options.transparent.bg and C.none) or C.bg
C.bg_statusline = C.black0
Expand Down
7 changes: 4 additions & 3 deletions lua/nordic/colors/nordic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
-- This file has a bunch of added colors.

-- NOTE: All hex codes must be uppercase (for testing)

---@class NordicColors
local palette = {

none = 'NONE',

-- Blacks. Not in base Nord.
black0 = '#191D24',
black1 = '#1E222A',
-- Slightly darker than bg. Very useful for certain popups
black2 = '#222630',
black2 = '#222630', -- bg

-- Grays
-- This color is used on their website's dark theme.
gray0 = '#242933', -- bg
gray0 = '#242933',
-- Polar Night.
gray1 = '#2E3440',
gray2 = '#3B4252',
Expand Down
12 changes: 12 additions & 0 deletions platforms/ghostty/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
To use this theme you have 2 options to install it:

- Clone the theme file and set the theme option in your config to the absolute path of the theme file.
Example:

```ini
theme = "/home/jbef/.config/ghostty/nordic"
```

- Copy the code directly inside your `ghostty` configuration file, usually located at `$HOME/.config/ghostty/config`


27 changes: 27 additions & 0 deletions platforms/ghostty/nordic
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Nordic Colorscheme for Ghostty.
# Based on https://github.com/AlexvZyl/nordic.nvim
# Author: @jorgebef

palette = 0=#191D24
palette = 1=#BF616A
palette = 2=#A3BE8C
palette = 3=#EBCB8B
palette = 4=#81A1C1
palette = 5=#B48EAD
palette = 6=#8FBCBB
palette = 7=#D8DEE9

palette = 8=#3B4252
palette = 9=#D06F79
palette = 10=#B1D196
palette = 11=#F0D399
palette = 12=#88C0D0
palette = 13=#C895BF
palette = 14=#93CCDC
palette = 15=#E5E9F0

background = #242933
foreground = #D8DEE9
cursor-color = #D8DEE9
selection-background = #2E3440
selection-foreground = #D8DEE9