Skip to content

Commit

Permalink
feat(extras): add Vimium theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Jul 22, 2024
1 parent 7a8e826 commit 8d1a1d9
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/astrotheme/extras/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ M.extras = {
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" },
vim = { ext = "vim", url = "https://vimhelp.org/", label = "Vim", subdir = "colors"},
vimium = { ext = "css", url = "https://vimium.github.io/", label = "Vimium" },
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" },
xfceterm = { ext = "theme", url = "https://docs.xfce.org/apps/terminal/advanced", label = "Xfce Terminal" },
Expand Down
125 changes: 125 additions & 0 deletions lua/astrotheme/extras/vimium.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
local util = require "astrotheme.extras"

local M = {}

--- @param colors AstroThemePalette
function M.generate(colors)
return util.template(
[[
/* Copy the content into the `CSS for Vimium UI` textarea field on the vimium options page */
:root {
--vimium-blue: ${ui.blue};
--vimium-green: ${ui.green};
--vimium-fg: ${ui.text};
--vimium-fg-dark: ${ui.text_inactive};
--vimium-border: ${ui.border};
--vimium-border-highlight: ${ui.accent};
--vimium-bg: ${ui.base};
--vimium-bg-highlight: ${ui.selection};
}
#vimiumHintMarkerContainer div.internalVimiumHintMarker,
#vimiumHintMarkerContainer div.vimiumHintMarker {
padding: 3px 4px;
border: 1;
background: var(--vimium-blue);
border-color: var(--vimium-border);
box-shadow:
0 1px 3px rgba(0, 0, 0, 0.12),
0 1px 2px rgba(0, 0, 0, 0.24);
}
#vimiumHintMarkerContainer div span {
color: var(--vimium-border) !important;
text-shadow: none;
}
#vimiumHintMarkerContainer div > .matchingCharacter {
opacity: 1;
}
#vimiumHintMarkerContainer div > .matchingCharacter ~ span {
color: var(--vimium-fg-dark);
}
#vomnibar {
background: var(--vimium-bg);
border: 2px solid var(--vimium-border-highlight);
animation: show 200ms cubic-bezier(0, 0, 0.2, 1) forwards;
max-height: calc(100vh - 70px);
overflow: hidden;
}
@keyframes show {
0% {
transform: translateY(50px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
#vomnibar input {
color: var(--vimium-fg);
background: var(--vimium-bg);
border: none;
height: unset;
padding: 16px 30px;
}
#vomnibar .vomnibarSearchArea {
border: none;
padding: unset;
background: var(--vimium-bg);
}
#vomnibar ul {
padding: 0;
margin: 0;
background: var(--vimium-bg);
border-top: 1px solid var(--vimium-border);
}
#vomnibar li {
padding: 10px;
border-bottom: 1px solid var(--vimium-border);
}
#vomnibar li .vomnibarTopHalf,
#vomnibar li .vomnibarBottomHalf {
padding: 3px 0;
}
#vomnibar li .vomnibarSource {
color: var(--vimium-green);
}
#vomnibar li em,
#vomnibar li .vomnibarTitle {
color: var(--vimium-blue);
}
#vomnibar li .vomnibarUrl {
color: var(--vimium-fg);
}
#vomnibar li .vomnibarMatch {
color: var(--vimium-blue);
}
#vomnibar li .vomnibarTitle .vomnibarMatch {
color: var(--vimium-blue);
}
#vomnibar li.vomnibarSelected {
background-color: var(--vimium-bg-highlight);
}
div.vimiumHUD {
background: var(--vimium-bg);
border: none;
box-shadow:
0 1px 3px rgba(0, 0, 0, 0.12),
0 1px 2px rgba(0, 0, 0, 0.24);
}
div.vimiumHUD span#hud-find-input,
div.vimiumHUD .vimiumHUDSearchAreaInner {
color: var(--vimium-fg);
}
div.vimiumHUD .hud-find {
background-color: var(--vimium-bg);
border: none;
}
div.vimiumHUD .vimiumHUDSearchArea {
background-color: var(--vimium-bg);
}
]],
colors
)
end

return M

0 comments on commit 8d1a1d9

Please sign in to comment.