local nugu_dark = require 'bugabinga/nugu/palette_dark' local nugu_light = require 'bugabinga/nugu/palette_light' local make_theme = function ( palette ) return { -- The default text color foreground = palette.content.normal, -- The default background color background = palette.content.backdrop, -- Overrides the cell background color when the current cell is occupied by the -- cursor and the cursor style is set to Block cursor_bg = palette.ui.accent, -- Overrides the text color when the current cell is occupied by the cursor cursor_fg = palette.ui.backdrop, -- Specifies the border color of the cursor when the cursor style is set to Block, -- or the color of the vertical or horizontal bar when the cursor style is set to -- Bar or Underline. cursor_border = palette.ui.accent, selection_fg = palette.ui.backdrop, selection_bg = palette.ui.focus, -- The color of the scrollbar 'thumb'; the portion that represents the current viewport scrollbar_thumb = palette.ui.unfocus, -- The color of the split lines between panes split = palette.ui.unfocus, ansi = { -- Predictable ANSI 0-7 for general terminal applications. palette.content.backdrop, -- Index 0: BLACK (terminal background) palette.error, -- Index 1: RED (error) palette.content.focus, -- Index 2: GREEN (success/focus) palette.warning, -- Index 3: YELLOW (warning) palette.content.important_local, -- Index 4: BLUE (link/primary) palette.content.accent, -- Index 5: MAGENTA (accent) palette.info, -- Index 6: CYAN (info) palette.content.normal, -- Index 7: WHITE (terminal foreground) }, brights = { -- Predictable ANSI 8-15. Nugu-specific UI colors live in indexed 16+. palette.content.minor, -- Index 8: BRIGHT BLACK (muted) palette.error, -- Index 9: BRIGHT RED palette.ui.focus, -- Index 10: BRIGHT GREEN palette.warning, -- Index 11: BRIGHT YELLOW palette.content.important_global, -- Index 12: BRIGHT BLUE palette.ui.accent, -- Index 13: BRIGHT MAGENTA palette.ui.important_local, -- Index 14: BRIGHT CYAN palette.ui.important_global, -- Index 15: BRIGHT WHITE }, -- Nugu semantic extras for apps explicitly coupled to this palette. indexed = { [16] = palette.debug, -- nugu semantic: debug [17] = palette.ui.normal, -- nugu semantic: ui.normal [18] = palette.ui.backdrop, -- nugu semantic: ui.backdrop [19] = palette.ui.minor, -- nugu semantic: ui.minor [20] = palette.ui.focus, -- nugu semantic: ui.focus [21] = palette.ui.unfocus, -- nugu semantic: ui.unfocus [22] = palette.content.unfocus, -- nugu semantic: content.unfocus }, -- When the IME, a dead key or a leader key are being processed and are effectively -- holding input pending the result of input composition, change the cursor -- to this color to give a visual cue about the compose state. compose_cursor = palette.ui.focus, -- Colors for copy_mode and quick_select -- available since: 20220807-113146-c2fee766 -- In copy_mode, the color of the active text is: -- 1. copy_mode_active_highlight_* if additional text was selected using the mouse -- 2. selection_* otherwise copy_mode_active_highlight_bg = { Color = palette.ui.accent, }, copy_mode_active_highlight_fg = { Color = palette.ui.backdrop, }, copy_mode_inactive_highlight_bg = { Color = palette.ui.unfocus, }, copy_mode_inactive_highlight_fg = { Color = palette.ui.normal, }, quick_select_label_bg = { Color = palette.ui.focus, }, quick_select_label_fg = { Color = palette.ui.backdrop, }, quick_select_match_bg = { Color = palette.ui.accent, }, quick_select_match_fg = { Color = palette.ui.backdrop, }, -- Command Palette / Input Selector -- input_selector_label_bg = { Color = palette.ui.backdrop }, -- input_selector_label_fg = { Color = palette.ui.normal }, -- Launcher -- launcher_label_bg = { Color = palette.ui.backdrop }, -- launcher_label_fg = { Color = palette.ui.normal }, tab_bar = { -- The color of the strip that goes along the top of the window -- (does not apply when fancy tab bar is in use) background = palette.content.backdrop, -- The active tab is the one that has focus in the window active_tab = { -- The color of the background area for the tab bg_color = palette.ui.focus, -- The color of the text for the tab fg_color = palette.ui.backdrop, -- Specify whether you want "Half", "Normal" or "Bold" intensity for the -- label shown for this tab. -- The default is "Normal" intensity = 'Bold', -- Specify whether you want "None", "Single" or "Double" underline for -- label shown for this tab. -- The default is "None" underline = 'None', -- Specify whether you want the text to be italic (true) or not (false) -- for this tab. The default is false. italic = false, -- Specify whether you want the text to be rendered with strikethrough (true) -- or not for this tab. The default is false. strikethrough = false, }, -- Inactive tabs are the tabs that do not have focus inactive_tab = { bg_color = palette.ui.backdrop, fg_color = palette.ui.unfocus, -- The same options that were listed under the `active_tab` section above -- can also be used for `inactive_tab`. }, -- You can configure some alternate styling when the mouse pointer -- moves over inactive tabs inactive_tab_hover = { bg_color = palette.ui.accent, fg_color = palette.ui.normal, intensity = 'Bold', -- The same options that were listed under the `active_tab` section above -- can also be used for `inactive_tab_hover`. }, -- The new tab button that let you create new tabs new_tab = { bg_color = palette.ui.backdrop, fg_color = palette.ui.unfocus, -- The same options that were listed under the `active_tab` section above -- can also be used for `new_tab`. }, -- You can configure some alternate styling when the mouse pointer -- moves over the new tab button new_tab_hover = { bg_color = palette.ui.accent, fg_color = palette.ui.normal, -- The same options that were listed under the `active_tab` section above -- can also be used for `new_tab_hover`. }, }, } end local apply_window_frame = function ( cfg, scheme_name ) local palette = (scheme_name == 'nugu-dark') and nugu_dark.palette or nugu_light.palette cfg.window_frame = { active_titlebar_bg = palette.ui.backdrop, inactive_titlebar_bg = palette.ui.backdrop, active_titlebar_fg = palette.ui.normal, inactive_titlebar_fg = palette.ui.unfocus, button_fg = palette.ui.normal, button_bg = palette.ui.backdrop, button_hover_fg = palette.ui.accent, button_hover_bg = palette.ui.minor, } end return { schemes = { ['nugu-dark'] = make_theme( nugu_dark.palette ), ['nugu-light'] = make_theme( nugu_light.palette ), }, apply_window_frame = apply_window_frame, }