Skip to content

Commit bbf84e1

Browse files
committed
Upload screenshots; update darkbox.lua
1 parent e7f813a commit bbf84e1

File tree

7 files changed

+33
-59
lines changed

7 files changed

+33
-59
lines changed

.github/darkbox.png

-3.2 KB
Binary file not shown.

.github/screenshot.png

-547 KB
Binary file not shown.

.github/screenshot_classic.png

349 KB
Loading

.github/screenshot_dim.png

330 KB
Loading

.github/screenshot_retro.png

342 KB
Loading

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ A pure-black refresh of the retro-groove aesthetic for modern displays. Darkbox
1111

1212
## 📸 Screenshots
1313

14-
### Base
15-
![Screenshot](.github/screenshot.png)
16-
1714
### Classic
1815
![Screenshot](.github/screenshot_classic.png)
1916

17+
### Retro
18+
![Screenshot](.github/screenshot_retro.png)
19+
2020
### Dim
2121
![Screenshot](.github/screenshot_dim.png)
2222

@@ -59,7 +59,7 @@ require("darkbox").setup({
5959
invert_tabline = false,
6060
invert_intend_guides = false,
6161
inverse = true, -- invert background for search, diffs, statuslines and errors
62-
contrast = "", -- can be "classic", "dim" or empty string
62+
contrast = "", -- can be "retro", "dim" or empty string for classic
6363
palette_overrides = {},
6464
overrides = {},
6565
dim_inactive = false,

lua/darkbox.lua

Lines changed: 29 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Darkbox.palette = {
8787
background_3 = "#665c54",
8888
background_4 = "#7c6f64",
8989
classic_foreground = "#ebdbb2",
90-
base_foreground = "#bdae93",
90+
retro_foreground = "#bdae93",
9191
dim_foreground = "#a89984",
9292
foreground_1 = "#bdae93",
9393
foreground_2 = "#d5c4a1",
@@ -100,13 +100,13 @@ Darkbox.palette = {
100100
classic_purple = "#d3869b",
101101
classic_aqua = "#8ec07c",
102102
classic_orange = "#fe8019",
103-
base_red = "#cc241d",
104-
base_green = "#98971a",
105-
base_yellow = "#d79921",
106-
base_blue = "#458588",
107-
base_purple = "#b16286",
108-
base_aqua = "#689d6a",
109-
base_orange = "#d65d0e",
103+
retro_red = "#cc241d",
104+
retro_green = "#98971a",
105+
retro_yellow = "#d79921",
106+
retro_blue = "#458588",
107+
retro_purple = "#b16286",
108+
retro_aqua = "#689d6a",
109+
retro_orange = "#d65d0e",
110110
dim_red = "#9d0006",
111111
dim_green = "#79740e",
112112
dim_yellow = "#b57614",
@@ -131,15 +131,15 @@ local function get_colors()
131131
foreground_4 = palette.foreground_4,
132132
}
133133

134-
if config.contrast == "classic" then
135-
colors.foreground = palette.classic_foreground
136-
colors.red = palette.classic_red
137-
colors.green = palette.classic_green
138-
colors.yellow = palette.classic_yellow
139-
colors.blue = palette.classic_blue
140-
colors.purple = palette.classic_purple
141-
colors.aqua = palette.classic_aqua
142-
colors.orange = palette.classic_orange
134+
if config.contrast == "retro" then
135+
colors.foreground = palette.retro_foreground
136+
colors.red = palette.retro_red
137+
colors.green = palette.retro_green
138+
colors.yellow = palette.retro_yellow
139+
colors.blue = palette.retro_blue
140+
colors.purple = palette.retro_purple
141+
colors.aqua = palette.retro_aqua
142+
colors.orange = palette.retro_orange
143143
colors.gray = palette.gray
144144
elseif config.contrast == "dim" then
145145
colors.foreground = palette.dim_foreground
@@ -151,15 +151,15 @@ local function get_colors()
151151
colors.aqua = palette.dim_aqua
152152
colors.orange = palette.dim_orange
153153
colors.gray = palette.gray
154-
else -- base/default
155-
colors.foreground = palette.base_foreground
156-
colors.red = palette.base_red
157-
colors.green = palette.base_green
158-
colors.yellow = palette.base_yellow
159-
colors.blue = palette.base_blue
160-
colors.purple = palette.base_purple
161-
colors.aqua = palette.base_aqua
162-
colors.orange = palette.base_orange
154+
else -- classic/default
155+
colors.foreground = palette.classic_foreground
156+
colors.red = palette.classic_red
157+
colors.green = palette.classic_green
158+
colors.yellow = palette.classic_yellow
159+
colors.blue = palette.classic_blue
160+
colors.purple = palette.classic_purple
161+
colors.aqua = palette.classic_aqua
162+
colors.orange = palette.classic_orange
163163
colors.gray = palette.gray
164164
end
165165

@@ -174,36 +174,10 @@ end
174174
local function get_groups()
175175
local colors = get_colors()
176176
local config = Darkbox.config
177-
local palette = Darkbox.palette
178-
179-
if config.terminal_colors then
180-
local term_colors = {
181-
palette.background, -- color_0 (black)
182-
palette.base_red, -- color_1 (red)
183-
palette.base_green, -- color_2 (green)
184-
palette.base_yellow, -- color_3 (yellow)
185-
palette.base_blue, -- color_4 (blue)
186-
palette.base_purple, -- color_5 (purple)
187-
palette.base_aqua, -- color_6 (cyan/aqua)
188-
palette.foreground_4, -- color_7 (white)
189-
palette.gray, -- color_8 (bright black)
190-
palette.classic_red, -- color_9 (bright red)
191-
palette.classic_green, -- color_10 (bright green)
192-
palette.classic_yellow, -- color_11 (bright yellow)
193-
palette.classic_blue, -- color_12 (bright blue)
194-
palette.classic_purple, -- color_13 (bright purple)
195-
palette.classic_aqua, -- color_14 (bright cyan/aqua)
196-
colors.foreground, -- color_15 (specified contrast foreground)
197-
}
198-
199-
for index, value in ipairs(term_colors) do
200-
vim.g["terminal_color_" .. index - 1] = value
201-
end
202-
end
203177

204178
local groups = {
205179
DarkboxFg0 = { fg = colors.foreground },
206-
DarkboxFg1 = { fg = colors.foreground },
180+
DarkboxFg1 = { fg = colors.foreground_1 },
207181
DarkboxFg2 = { fg = colors.foreground_2 },
208182
DarkboxFg3 = { fg = colors.foreground_3 },
209183
DarkboxFg4 = { fg = colors.foreground_4 },
@@ -248,8 +222,8 @@ local function get_groups()
248222
DarkboxPurpleUnderline = { undercurl = config.undercurl, sp = colors.purple },
249223
DarkboxAquaUnderline = { undercurl = config.undercurl, sp = colors.aqua },
250224
DarkboxOrangeUnderline = { undercurl = config.undercurl, sp = colors.orange },
251-
Normal = config.transparent_mode and { fg = colors.foreground_1, bg = nil }
252-
or { fg = colors.foreground_1, bg = colors.background },
225+
Normal = config.transparent_mode and { fg = colors.foreground, bg = nil }
226+
or { fg = colors.foreground, bg = colors.background },
253227
NormalFloat = config.transparent_mode and { fg = colors.foreground_1, bg = nil }
254228
or { fg = colors.foreground_1, bg = colors.background_1 },
255229
NormalNC = config.dim_inactive and { fg = colors.foreground_1, bg = colors.background_1 } or { link = "Normal" },

0 commit comments

Comments
 (0)