theme in sketchybar
This commit is contained in:
parent
c119257a02
commit
e0b454304e
5 changed files with 118 additions and 39 deletions
|
|
@ -73,7 +73,7 @@ local function apply_highlights(c, opts)
|
|||
hi('NormalFloat', { fg = c.fg, bg = c.bg_float })
|
||||
hi('FloatBorder', { fg = c.border, bg = c.bg_float })
|
||||
hi('Cursor', { fg = c.bg, bg = c.cursor })
|
||||
hi('CursorLine', { bg = c.bg_float })
|
||||
hi('CursorLine', { bg = c.bg_highlight })
|
||||
hi('CursorColumn', { bg = c.bg_float })
|
||||
hi('ColorColumn', { bg = bg_dark })
|
||||
hi('LineNr', { fg = c.fg_gutter })
|
||||
|
|
@ -111,8 +111,8 @@ local function apply_highlights(c, opts)
|
|||
hi('TabLine', { fg = c.fg_dark, bg = bg_darker })
|
||||
hi('TabLineFill', { bg = bg_darker })
|
||||
hi('TabLineSel', { fg = c.fg, bg = bg })
|
||||
hi('WinBar', { fg = c.fg, bg = bg_darker })
|
||||
hi('WinBarNC', { fg = c.fg_dark, bg = bg_darker })
|
||||
hi('WinBar', { fg = c.fg, bg = c.bg_float })
|
||||
hi('WinBarNC', { fg = c.fg_dark, bg = c.bg_float })
|
||||
|
||||
-- Messages
|
||||
hi('ModeMsg', { fg = c.fg, bold = true })
|
||||
|
|
@ -329,6 +329,8 @@ local function apply_highlights(c, opts)
|
|||
hi('OilMove', { fg = c.warning })
|
||||
hi('OilCopy', { fg = c.info })
|
||||
hi('OilChange', { fg = c.misc })
|
||||
hi('OilTitle', { fg = c.tag, bg = c.bg_float, bold = true })
|
||||
hi('OilWinbar', { fg = c.fg, bg = c.bg_float })
|
||||
|
||||
-- Grapple
|
||||
hi('GrappleTitle', { fg = c.tag, bold = true })
|
||||
|
|
|
|||
|
|
@ -1,38 +1,103 @@
|
|||
local colors <const> = {
|
||||
black = 0xff181819,
|
||||
white = 0xfff8f8f2,
|
||||
red = 0xf1FD6592,
|
||||
green = 0xff007692,
|
||||
blue = 0xff5199ba,
|
||||
yellow = 0xffffff81,
|
||||
orange = 0xfff4c07b,
|
||||
magenta = 0xd3fc7ebd,
|
||||
purple = 0xff796fa9,
|
||||
other_purple = 0xff302c45,
|
||||
cyan = 0xff7bf2de,
|
||||
grey = 0xff7f8490,
|
||||
dirty_white = 0xc8cad3f5,
|
||||
dark_grey = 0xff2b2736,
|
||||
-- Color palettes for sketchybar
|
||||
-- Hex colors are converted to 0xAARRGGBB format for sketchybar
|
||||
|
||||
local function hex_to_sketchybar(hex, alpha)
|
||||
alpha = alpha or 0xff
|
||||
local r, g, b = hex:match '#(%x%x)(%x%x)(%x%x)'
|
||||
if not r then return 0x00000000 end
|
||||
return (alpha << 24) | (tonumber(r, 16) << 16) | (tonumber(g, 16) << 8) | tonumber(b, 16)
|
||||
end
|
||||
|
||||
local palettes = {
|
||||
default = {
|
||||
-- UI backgrounds
|
||||
bg = '#181819',
|
||||
bg_dark = '#151320',
|
||||
bg_darker = '#151320',
|
||||
bg_float = '#302c45',
|
||||
bg_highlight = '#2b2736',
|
||||
-- Foreground
|
||||
fg = '#f8f8f2',
|
||||
fg_dark = '#cad3f5',
|
||||
fg_gutter = '#7f8490',
|
||||
-- Accent colors
|
||||
red = '#fd6592',
|
||||
green = '#007692',
|
||||
blue = '#5199ba',
|
||||
yellow = '#ffff81',
|
||||
magenta = '#fc7ebd',
|
||||
cyan = '#7bf2de',
|
||||
orange = '#f4c07b',
|
||||
purple = '#796fa9',
|
||||
-- Semantic
|
||||
border = '#2c2e34',
|
||||
},
|
||||
noctis_azureus = {
|
||||
-- UI backgrounds
|
||||
bg = '#051b29',
|
||||
bg_dark = '#041520',
|
||||
bg_darker = '#030f18',
|
||||
bg_float = '#07273b',
|
||||
bg_highlight = '#0c3f5f',
|
||||
-- Foreground
|
||||
fg = '#becfda',
|
||||
fg_dark = '#aec3d0',
|
||||
fg_gutter = '#475e6c',
|
||||
-- Accent colors
|
||||
red = '#e66533',
|
||||
green = '#49e9a6',
|
||||
blue = '#49ace9',
|
||||
yellow = '#e4b781',
|
||||
magenta = '#df769b',
|
||||
cyan = '#49d6e9',
|
||||
orange = '#e97749',
|
||||
purple = '#60b6eb',
|
||||
-- Semantic
|
||||
border = '#28353e',
|
||||
},
|
||||
}
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.load(palette_name)
|
||||
local palette = palettes[palette_name]
|
||||
if not palette then error('Unknown palette: ' .. palette_name) end
|
||||
|
||||
return {
|
||||
black = hex_to_sketchybar(palette.bg),
|
||||
white = hex_to_sketchybar(palette.fg),
|
||||
red = hex_to_sketchybar(palette.red),
|
||||
green = hex_to_sketchybar(palette.green),
|
||||
blue = hex_to_sketchybar(palette.blue),
|
||||
yellow = hex_to_sketchybar(palette.yellow),
|
||||
orange = hex_to_sketchybar(palette.orange),
|
||||
magenta = hex_to_sketchybar(palette.magenta),
|
||||
cyan = hex_to_sketchybar(palette.cyan),
|
||||
purple = hex_to_sketchybar(palette.purple),
|
||||
grey = hex_to_sketchybar(palette.fg_gutter),
|
||||
dirty_white = hex_to_sketchybar(palette.fg_dark, 0xc8),
|
||||
dark_grey = hex_to_sketchybar(palette.bg_float),
|
||||
transparent = 0x00000000,
|
||||
bar = {
|
||||
bg = 0xf1151320,
|
||||
border = 0xff2c2e34,
|
||||
bg = hex_to_sketchybar(palette.bg_darker, 0xf1),
|
||||
border = hex_to_sketchybar(palette.border),
|
||||
},
|
||||
popup = {
|
||||
bg = 0xf1151320,
|
||||
border = 0xff2c2e34,
|
||||
bg = hex_to_sketchybar(palette.bg_darker, 0xf1),
|
||||
border = hex_to_sketchybar(palette.border),
|
||||
},
|
||||
slider = {
|
||||
bg = 0xf1151320,
|
||||
border = 0xff2c2e34,
|
||||
bg = hex_to_sketchybar(palette.bg_darker, 0xf1),
|
||||
border = hex_to_sketchybar(palette.border),
|
||||
},
|
||||
bg1 = 0xd322212c,
|
||||
bg2 = 0xff302c45,
|
||||
bg1 = hex_to_sketchybar(palette.bg_dark, 0xd3),
|
||||
bg2 = hex_to_sketchybar(palette.bg_float),
|
||||
|
||||
with_alpha = function(color, alpha)
|
||||
if alpha > 1.0 or alpha < 0.0 then return color end
|
||||
return (color & 0x00ffffff) | (math.floor(alpha * 255.0) << 24)
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
return colors
|
||||
return M
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
local colors <const> = require 'config.colors'
|
||||
local constants <const> = require 'constants'
|
||||
local colors_module <const> = require 'config.colors'
|
||||
local fonts <const> = require 'config.fonts'
|
||||
local icons <const> = require 'config.icons'
|
||||
local dimens <const> = require 'config.dimens'
|
||||
|
||||
local colors <const> = colors_module.load(constants.color_palette)
|
||||
|
||||
return {
|
||||
fonts = fonts,
|
||||
dimens = dimens,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
local color_palette <const> = 'noctis_azureus'
|
||||
|
||||
local events <const> = {
|
||||
AEROSPACE_WORKSPACE_CHANGED = 'aerospace_workspace_changed',
|
||||
AEROSPACE_SWITCH = 'aerospace_switch',
|
||||
|
|
@ -34,4 +36,5 @@ return {
|
|||
events = events,
|
||||
aerospace_cmd = aerospace_cmd,
|
||||
aerospace = aerospace,
|
||||
color_palette = color_palette,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
config,
|
||||
pkgs,
|
||||
user,
|
||||
host,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
|
@ -151,6 +152,11 @@
|
|||
LaunchServices.LSQuarantine = false;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = host;
|
||||
computerName = host;
|
||||
};
|
||||
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
|
|
|
|||
Loading…
Reference in a new issue