Update rice

This commit is contained in:
Filippo Berto 2022-06-05 17:27:17 +02:00
parent 601cd4d429
commit 26a4a16638
6 changed files with 66 additions and 45 deletions

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }:
let
inherit (pkgs.rice) colorPalette;
inherit (pkgs.rice) colorPalette opacity;
grep = "${pkgs.gnugrep}/bin/grep";
cut = "${pkgs.coreutils}/bin/cut";
head = "${pkgs.coreutils}/bin/head";
@ -16,20 +16,27 @@ let
session=`${loginctl} session-status | ${pkgs.coreutils}/bin/head -n 1 | ${pkgs.gawk}/bin/awk '{print $1}'`
${loginctl} terminate-session $session
'';
colors = with pkgs.lib.rice; palette.toARGBHex rec {
colors = with pkgs.lib.rice; let
alpha = 255 * opacity;
in
palette.toARGBHex rec {
normal = {
foreground = colorPalette.normal.white;
background = colorPalette.normal.black;
underline = colorPalette.normal.blue;
background = color.setAlphaRgba alpha (colorPalette.normal.black);
underline = colorPalette.dark.blue;
};
active = palette.brighten "50%" normal;
active = {
foreground = colorPalette.bright.white;
background = color.setAlphaRgba alpha (colorPalette.normal.black);
underline = colorPalette.bright.blue;
};
selected = {
foreground = colorPalette.bright.white;
background = colorPalette.bright.black;
underline = colorPalette.normal.white;
background = color.setAlphaRgba alpha (color.brighten 10 colorPalette.bright.black);
underline = builtins.trace colorPalette.bright.red colorPalette.bright.red;
};
alert = colorPalette.bright.red;