Skip to content

Commit

Permalink
feat(extras): add termux colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Juhan280 committed Oct 14, 2024
1 parent 2c85fad commit 7863699
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/tokyonight/extra/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ M.extras = {
spotify_player = { ext = "toml", url = "https://github.com/aome510/spotify-player", label = "Spotify Player" },
terminator = { ext = "conf", url = "https://gnome-terminator.readthedocs.io/en/latest/config.html", label = "Terminator" },
tilix = { ext = "json", url = "https://github.com/gnunn1/tilix", label = "Tilix" },
termux = { ext = "properties", url = "https://termux.dev/", label = "Termux" },
tmux = { ext = "tmux", url = "https://github.com/tmux/tmux/wiki", label = "Tmux" },
wezterm = { ext = "toml", url = "https://wezfurlong.org/wezterm/config/files.html", label = "WezTerm" },
windows_terminal = { ext = "json", url = "https://aka.ms/terminal-documentation", label = "Windows Terminal" },
Expand Down
56 changes: 56 additions & 0 deletions lua/tokyonight/extra/termux.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
local util = require("tokyonight.util")

local M = {}

--- @param colors ColorScheme
function M.generate(colors)
local extended_colors = vim.tbl_extend("force", colors, {
red_bright = util.blend_fg(colors.red, 0.5),
green_bright = util.blend_fg(colors.green, 0.5),
yellow_bright = util.blend_fg(colors.yellow, 0.5),
blue_bright = util.blend_fg(colors.blue, 0.5),
magenta_bright = util.blend_fg(colors.magenta, 0.5),
cyan_bright = util.blend_fg(colors.cyan, 0.5),
})

local termux = util.template(
[[
# -----------------------------------------------------------------------------
# Theme: ${_style_name}
# Upstream: ${_upstream_url}
# -----------------------------------------------------------------------------
background: ${bg}
foreground: ${fg}
# Normal colors
color0: ${black}
color1: ${red}
color2: ${green}
color3: ${yellow}
color4: ${blue}
color5: ${magenta}
color6: ${cyan}
color7: ${fg_dark}
# Bright colors
color8: ${terminal_black}
color9: ${red_bright}
color10: ${green_bright}
color11: ${yellow_bright}
color12: ${blue_bright}
color13: ${magenta_bright}
color14: ${cyan_bright}
color15: ${fg}
# Extended colors
color16: ${orange}
color17: ${red1}
]],
extended_colors
)

return termux
end

return M

0 comments on commit 7863699

Please sign in to comment.