-
-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zathura: add transparency to highlight colors
- Loading branch information
jghauser
committed
Jun 2, 2024
1 parent
290c8ae
commit 9d00661
Showing
1 changed file
with
28 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
{ config, lib, ... }: | ||
|
||
with config.lib.stylix.colors; | ||
{ | ||
options.stylix.targets.zathura.enable = | ||
config.lib.stylix.mkEnableTarget "Zathura" true; | ||
|
||
config = lib.mkIf config.stylix.targets.zathura.enable { | ||
# Taken from here: | ||
# https://github.com/doenerkebap/base16-zathura | ||
programs.zathura.options = { | ||
default-bg = "#${base00}"; | ||
default-fg = "#${base01}"; | ||
statusbar-fg = "#${base04}"; | ||
statusbar-bg = "#${base02}"; | ||
inputbar-bg = "#${base00}"; | ||
inputbar-fg = "#${base07}"; | ||
notification-bg = "#${base00}"; | ||
notification-fg = "#${base07}"; | ||
notification-error-bg = "#${base00}"; | ||
notification-error-fg = "#${base08}"; | ||
notification-warning-bg = "#${base00}"; | ||
notification-warning-fg = "#${base08}"; | ||
highlight-color = "#${base0A}"; | ||
highlight-active-color = "#${base0D}"; | ||
completion-bg = "#${base01}"; | ||
completion-fg = "#${base0D}"; | ||
completion-highlight-fg = "#${base07}"; | ||
completion-highlight-bg = "#${base0D}"; | ||
recolor-lightcolor = "#${base00}"; | ||
recolor-darkcolor = "#${base06}"; | ||
programs.zathura.options = let | ||
highlightTransparency = "0.5"; | ||
getColorCh = colorName: channel: config.lib.stylix.colors."${colorName}-rgb-${channel}"; | ||
rgb = color: ''rgb(${getColorCh color "r"}, ${getColorCh color "g"}, ${getColorCh color "b"})''; | ||
rgba = color: ''rgba(${getColorCh color "r"}, ${getColorCh color "g"}, ${getColorCh color "b"}, ${highlightTransparency})''; | ||
in { | ||
# Taken from here: | ||
# https://github.com/doenerkebap/base16-zathura | ||
default-bg = rgb "base00"; | ||
default-fg = rgb "base01"; | ||
statusbar-fg = rgb "base04"; | ||
statusbar-bg = rgb "base02"; | ||
inputbar-bg = rgb "base00"; | ||
inputbar-fg = rgb "base07"; | ||
notification-bg = rgb "base00"; | ||
notification-fg = rgb "base07"; | ||
notification-error-bg = rgb "base00"; | ||
notification-error-fg = rgb "base08"; | ||
notification-warning-bg = rgb "base00"; | ||
notification-warning-fg = rgb "base08"; | ||
highlight-color = rgba "base0A"; | ||
highlight-active-color = rgba "base0D"; | ||
completion-bg = rgb "base01"; | ||
completion-fg = rgb "base0D"; | ||
completion-highlight-fg = rgb "base07"; | ||
completion-highlight-bg = rgb "base0D"; | ||
recolor-lightcolor = rgb "base00"; | ||
recolor-darkcolor = rgb "base06"; | ||
}; | ||
}; | ||
} |