Better opacity handling
This commit is contained in:
parent
30efa48b7d
commit
247185eafe
3 changed files with 15 additions and 16 deletions
5
home.nix
5
home.nix
|
|
@ -21,7 +21,7 @@ in
|
||||||
(
|
(
|
||||||
final: prev: rec {
|
final: prev: rec {
|
||||||
rice = prev.rice // {
|
rice = prev.rice // {
|
||||||
colorPalette = with pkgs.rice; palette.palette {
|
colorPalette = with pkgs.rice; palette.palette rec {
|
||||||
black = color.hexToRgba nord.n0;
|
black = color.hexToRgba nord.n0;
|
||||||
red = color.hexToRgba nord.n11;
|
red = color.hexToRgba nord.n11;
|
||||||
green = color.hexToRgba nord.n14;
|
green = color.hexToRgba nord.n14;
|
||||||
|
|
@ -34,11 +34,14 @@ in
|
||||||
bright-white = color.hexToRgba nord.n6;
|
bright-white = color.hexToRgba nord.n6;
|
||||||
bright-red = color.hexToRgba nord.n12;
|
bright-red = color.hexToRgba nord.n12;
|
||||||
cursor-cursor = color.hexToRgba nord.n4;
|
cursor-cursor = color.hexToRgba nord.n4;
|
||||||
|
|
||||||
|
primary-background = color.tAlphaRgba (v: float.round (255 * opacity)) black;
|
||||||
};
|
};
|
||||||
font = {
|
font = {
|
||||||
normal = { package = pkgs.cantarell-fonts; name = "Cantarell"; };
|
normal = { package = pkgs.cantarell-fonts; name = "Cantarell"; };
|
||||||
monospace = { package = pkgs.nerdfonts; name = "FuraCode Nerd Font Mono"; };
|
monospace = { package = pkgs.nerdfonts; name = "FuraCode Nerd Font Mono"; };
|
||||||
};
|
};
|
||||||
|
opacity = 0.9;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
strPalette = with pkgs.rice; palette.toRgbHex colorPalette;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# Include fonts packages
|
# Include fonts packages
|
||||||
home.packages = [ pkgs.rice.font.monospace.package ];
|
home.packages = [ pkgs.rice.font.monospace.package ];
|
||||||
|
|
@ -11,34 +14,27 @@
|
||||||
normal.family = pkgs.rice.font.monospace.name;
|
normal.family = pkgs.rice.font.monospace.name;
|
||||||
size = 9.0;
|
size = 9.0;
|
||||||
};
|
};
|
||||||
background_opacity = 0.95;
|
background_opacity = pkgs.rice.opacity;
|
||||||
mouse = {
|
mouse = {
|
||||||
hide_when_typing = true;
|
hide_when_typing = true;
|
||||||
hints.modifiers = "Control";
|
hints.modifiers = "Control";
|
||||||
};
|
};
|
||||||
|
|
||||||
colors = with pkgs.rice; {
|
colors = with pkgs.rice; strPalette // {
|
||||||
|
|
||||||
primary = palette.toRgbHex colorPalette.primary;
|
|
||||||
cursor = palette.toRgbHex colorPalette.cursor;
|
|
||||||
vi_mode_cursor = palette.toRgbHex colorPalette.vi_mode_cursor;
|
|
||||||
selection = {
|
selection = {
|
||||||
text = "CellForeground";
|
text = "CellForeground";
|
||||||
background = color.toRgbHex colorPalette.dim.blue;
|
background = strPalette.dim.blue;
|
||||||
};
|
};
|
||||||
search = {
|
search = {
|
||||||
matches = {
|
matches = {
|
||||||
foreground = "CellForeground";
|
foreground = "CellForeground";
|
||||||
background = color.toRgbHex colorPalette.dim.cyan;
|
background = strPalette.dim.cyan;
|
||||||
};
|
};
|
||||||
bar = {
|
bar = {
|
||||||
# foreground = "CellForeground";
|
foreground = strPalette.dim.cyan;
|
||||||
background = color.toRgbHex colorPalette.dim.yellow;
|
background = strPalette.dim.yellow;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
normal = palette.toRgbHex colorPalette.normal;
|
|
||||||
bright = palette.toRgbHex colorPalette.bright;
|
|
||||||
dim = palette.toRgbHex colorPalette.dim;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ let
|
||||||
colors = with pkgs.rice; palette.toARGBHex rec {
|
colors = with pkgs.rice; palette.toARGBHex rec {
|
||||||
|
|
||||||
normal = {
|
normal = {
|
||||||
foreground = colorPalette.normal.white;
|
foreground = colorPalette.primary.foreground;
|
||||||
background = color.tAlphaRgba (v: 240) colorPalette.normal.black;
|
background = colorPalette.primary.background;
|
||||||
underline = colorPalette.normal.blue;
|
underline = colorPalette.normal.blue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue