Skip to content

Commit 8605183

Browse files
faeb5folkegithub-actions[bot]
authored
feat(extras): add GNOME terminal (#489)
* merge * chore(build): auto-generate extras --------- Co-authored-by: Folke Lemaitre <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent ecc1143 commit 8605183

File tree

6 files changed

+119
-0
lines changed

6 files changed

+119
-0
lines changed
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Import this theme as follows:
2+
# 1. Create a new profile for GNOME Terminal
3+
# 2. Copy the UUID of the new profile (bottom right corner of the preferences window)
4+
# 3. Replace <PROFILE_UUID> below with the copied UUID
5+
# 4. Execute `dconf load /org/gnome/terminal/legacy/profiles:/ < tokyonight_day.dconf`
6+
7+
[:<PROFILE_UUID>]
8+
background-color='rgb(225, 226, 231)'
9+
cursor-background-color='rgb(55, 96, 191)'
10+
cursor-colors-set=true
11+
cursor-foreground-color='rgb(225, 226, 231)'
12+
foreground-color='rgb(55, 96, 191)'
13+
highlight-background-color='rgb(55, 96, 191)'
14+
highlight-colors-set=true
15+
highlight-foreground-color='rgb(225, 226, 231)'
16+
palette=['rgb(161, 166, 197)', 'rgb(245, 42, 101)', 'rgb(88, 117, 57)', 'rgb(140, 108, 62)', 'rgb(46, 125, 233)', 'rgb(152, 84, 241)', 'rgb(0, 113, 151)', 'rgb(55, 96, 191)', 'rgb(161, 166, 197)', 'rgb(245, 42, 101)', 'rgb(88, 117, 57)', 'rgb(140, 108, 62)', 'rgb(46, 125, 233)', 'rgb(152, 84, 241)', 'rgb(0, 113, 151)', 'rgb(55, 96, 191)']
17+
use-theme-colors=false
18+
visible-name='Tokyo Night Day'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Import this theme as follows:
2+
# 1. Create a new profile for GNOME Terminal
3+
# 2. Copy the UUID of the new profile (bottom right corner of the preferences window)
4+
# 3. Replace <PROFILE_UUID> below with the copied UUID
5+
# 4. Execute `dconf load /org/gnome/terminal/legacy/profiles:/ < tokyonight_moon.dconf`
6+
7+
[:<PROFILE_UUID>]
8+
background-color='rgb(34, 36, 54)'
9+
cursor-background-color='rgb(200, 211, 245)'
10+
cursor-colors-set=true
11+
cursor-foreground-color='rgb(34, 36, 54)'
12+
foreground-color='rgb(200, 211, 245)'
13+
highlight-background-color='rgb(200, 211, 245)'
14+
highlight-colors-set=true
15+
highlight-foreground-color='rgb(34, 36, 54)'
16+
palette=['rgb(68, 74, 115)', 'rgb(255, 117, 127)', 'rgb(195, 232, 141)', 'rgb(255, 199, 119)', 'rgb(130, 170, 255)', 'rgb(192, 153, 255)', 'rgb(134, 225, 252)', 'rgb(200, 211, 245)', 'rgb(68, 74, 115)', 'rgb(255, 117, 127)', 'rgb(195, 232, 141)', 'rgb(255, 199, 119)', 'rgb(130, 170, 255)', 'rgb(192, 153, 255)', 'rgb(134, 225, 252)', 'rgb(200, 211, 245)']
17+
use-theme-colors=false
18+
visible-name='Tokyo Night Moon'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Import this theme as follows:
2+
# 1. Create a new profile for GNOME Terminal
3+
# 2. Copy the UUID of the new profile (bottom right corner of the preferences window)
4+
# 3. Replace <PROFILE_UUID> below with the copied UUID
5+
# 4. Execute `dconf load /org/gnome/terminal/legacy/profiles:/ < tokyonight_night.dconf`
6+
7+
[:<PROFILE_UUID>]
8+
background-color='rgb(26, 27, 38)'
9+
cursor-background-color='rgb(192, 202, 245)'
10+
cursor-colors-set=true
11+
cursor-foreground-color='rgb(26, 27, 38)'
12+
foreground-color='rgb(192, 202, 245)'
13+
highlight-background-color='rgb(192, 202, 245)'
14+
highlight-colors-set=true
15+
highlight-foreground-color='rgb(26, 27, 38)'
16+
palette=['rgb(65, 72, 104)', 'rgb(247, 118, 142)', 'rgb(158, 206, 106)', 'rgb(224, 175, 104)', 'rgb(122, 162, 247)', 'rgb(187, 154, 247)', 'rgb(125, 207, 255)', 'rgb(192, 202, 245)', 'rgb(65, 72, 104)', 'rgb(247, 118, 142)', 'rgb(158, 206, 106)', 'rgb(224, 175, 104)', 'rgb(122, 162, 247)', 'rgb(187, 154, 247)', 'rgb(125, 207, 255)', 'rgb(192, 202, 245)']
17+
use-theme-colors=false
18+
visible-name='Tokyo Night'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Import this theme as follows:
2+
# 1. Create a new profile for GNOME Terminal
3+
# 2. Copy the UUID of the new profile (bottom right corner of the preferences window)
4+
# 3. Replace <PROFILE_UUID> below with the copied UUID
5+
# 4. Execute `dconf load /org/gnome/terminal/legacy/profiles:/ < tokyonight_storm.dconf`
6+
7+
[:<PROFILE_UUID>]
8+
background-color='rgb(36, 40, 59)'
9+
cursor-background-color='rgb(192, 202, 245)'
10+
cursor-colors-set=true
11+
cursor-foreground-color='rgb(36, 40, 59)'
12+
foreground-color='rgb(192, 202, 245)'
13+
highlight-background-color='rgb(192, 202, 245)'
14+
highlight-colors-set=true
15+
highlight-foreground-color='rgb(36, 40, 59)'
16+
palette=['rgb(65, 72, 104)', 'rgb(247, 118, 142)', 'rgb(158, 206, 106)', 'rgb(224, 175, 104)', 'rgb(122, 162, 247)', 'rgb(187, 154, 247)', 'rgb(125, 207, 255)', 'rgb(192, 202, 245)', 'rgb(65, 72, 104)', 'rgb(247, 118, 142)', 'rgb(158, 206, 106)', 'rgb(224, 175, 104)', 'rgb(122, 162, 247)', 'rgb(187, 154, 247)', 'rgb(125, 207, 255)', 'rgb(192, 202, 245)']
17+
use-theme-colors=false
18+
visible-name='Tokyo Night Storm'
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
local util = require("tokyonight.util")
2+
3+
local M = {}
4+
5+
function M.generate(colors)
6+
local gnome_colors = {}
7+
for k, v in pairs(colors) do
8+
local is_color = type(v) == "string" and v:find("^#[%x]") ~= nil
9+
if is_color then
10+
local hex = v:gsub("^#", "")
11+
local r = tonumber(hex:sub(1, 2), 16)
12+
local g = tonumber(hex:sub(3, 4), 16)
13+
local b = tonumber(hex:sub(5, 6), 16)
14+
gnome_colors[k] = string.format("rgb(%d, %d, %d)", r, g, b)
15+
else
16+
gnome_colors[k] = v
17+
end
18+
end
19+
20+
local gnome_terminal = util.template(
21+
[[
22+
# Import this theme as follows:
23+
# 1. Create a new profile for GNOME Terminal
24+
# 2. Copy the UUID of the new profile (bottom right corner of the preferences window)
25+
# 3. Replace <PROFILE_UUID> below with the copied UUID
26+
# 4. Execute `dconf load /org/gnome/terminal/legacy/profiles:/ < ${_name}.dconf`
27+
28+
[:<PROFILE_UUID>]
29+
background-color='${bg}'
30+
cursor-background-color='${fg}'
31+
cursor-colors-set=true
32+
cursor-foreground-color='${bg}'
33+
foreground-color='${fg}'
34+
highlight-background-color='${fg}'
35+
highlight-colors-set=true
36+
highlight-foreground-color='${bg}'
37+
palette=['${terminal_black}', '${red}', '${green}', '${yellow}', '${blue}', '${magenta}', '${cyan}', '${fg}', '${terminal_black}', '${red}', '${green}', '${yellow}', '${blue}', '${magenta}', '${cyan}', '${fg}']
38+
use-theme-colors=false
39+
visible-name='${_style_name}'
40+
]],
41+
gnome_colors
42+
)
43+
return gnome_terminal
44+
end
45+
46+
return M

lua/tokyonight/extra/init.lua

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ M.extras = {
1414
foot = { ext = "ini", url = "https://codeberg.org/dnkl/foot", label = "Foot" },
1515
fzf = { ext = "sh", url = "https://github.com/junegunn/fzf", label = "Fzf" },
1616
gitui = { ext = "ron", url = "https://github.com/extrawurst/gitui", label = "GitUI" },
17+
gnome_terminal = { ext = "dconf", url = "https://gitlab.gnome.org/GNOME/gnome-terminal", label = "GNOME Terminal"},
1718
helix = { ext = "toml", url = "https://helix-editor.com/", label = "Helix" },
1819
iterm = { ext = "itermcolors", url = "https://iterm2.com/", label = "iTerm" },
1920
kitty = { ext = "conf", url = "https://sw.kovidgoyal.net/kitty/conf.html", label = "Kitty" },

0 commit comments

Comments
 (0)