helix color ++
This commit is contained in:
27
flake.nix
27
flake.nix
@@ -80,27 +80,26 @@
|
|||||||
rice = rec {
|
rice = rec {
|
||||||
lib = import ./nxlib/ricelib.nix { lib = nixpkgs.lib; };
|
lib = import ./nxlib/ricelib.nix { lib = nixpkgs.lib; };
|
||||||
transparency = 0.9;
|
transparency = 0.9;
|
||||||
rounding = 0;
|
rounding = 10;
|
||||||
gap-size = 0;
|
gap-size = 10;
|
||||||
border-width = 2;
|
border-width = 3;
|
||||||
color =
|
color =
|
||||||
let
|
let
|
||||||
dark = (-0.3);
|
dark = (-0.3);
|
||||||
bright = (0.3);
|
bright = (0.5);
|
||||||
alter = let f = rice.lib.alter-luminace-hex; in color-name: color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
|
alter = let f = rice.lib.alter-luminace-hex; in color-name: color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
|
||||||
ccolor = builtins.mapAttrs alter {
|
ccolor = builtins.mapAttrs alter {
|
||||||
black = "#000000";
|
black = "#111111";
|
||||||
grey = "#666666";
|
white = "#dddddd";
|
||||||
white = "#dddddd";
|
blue = "#1111dd";
|
||||||
blue = "#4411ff";
|
cyan = "#11dddd";
|
||||||
cyan = "#00ffff";
|
green = "#11dd11";
|
||||||
green = "#00ff00";
|
magenta = "#dd11dd";
|
||||||
magenta = "#ff00ff";
|
red = "#dd1111";
|
||||||
red = "#ff0044";
|
yellow = "#dddd11";
|
||||||
yellow = "#ff4400";
|
|
||||||
};
|
};
|
||||||
xcolor = with ccolor; {
|
xcolor = with ccolor; {
|
||||||
background = black.base;
|
background = black.dark;
|
||||||
foreground = white.base;
|
foreground = white.base;
|
||||||
border = red.base;
|
border = red.base;
|
||||||
border2 = blue.base;
|
border2 = blue.base;
|
||||||
|
|||||||
35
home-modules/color-pallete.nix
Normal file
35
home-modules/color-pallete.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ config, pkgs, rice, ... }:
|
||||||
|
{
|
||||||
|
home.file.".config/color-pallet.txt".text = with rice.color; ''
|
||||||
|
border: ${border}
|
||||||
|
border2: ${border2}
|
||||||
|
accent: ${accent}
|
||||||
|
tertiary: ${tertiary}
|
||||||
|
background: ${background}
|
||||||
|
foreground: ${foreground}
|
||||||
|
black: dark: ${black.dark}
|
||||||
|
base: ${black.base}
|
||||||
|
bright: ${black.bright}
|
||||||
|
white: dark: ${white.dark}
|
||||||
|
base: ${white.base}
|
||||||
|
bright: ${white.bright}
|
||||||
|
blue: dark: ${blue.dark}
|
||||||
|
base: ${blue.base}
|
||||||
|
bright: ${blue.bright}
|
||||||
|
magenta: dark: ${magenta.dark}
|
||||||
|
base: ${magenta.base}
|
||||||
|
bright: ${magenta.bright}
|
||||||
|
red: dark: ${red.dark}
|
||||||
|
base: ${red.base}
|
||||||
|
bright: ${red.bright}
|
||||||
|
cyan: dark: ${cyan.dark}
|
||||||
|
base: ${cyan.base}
|
||||||
|
bright: ${cyan.bright}
|
||||||
|
green: dark: ${green.dark}
|
||||||
|
base: ${green.base}
|
||||||
|
bright: ${green.bright}
|
||||||
|
yellow: dark: ${yellow.dark}
|
||||||
|
base: ${yellow.base}
|
||||||
|
bright: ${yellow.bright}
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -20,6 +20,9 @@ lib.mkIf (user != "tv")
|
|||||||
if [ -d "$dir" ]; then
|
if [ -d "$dir" ]; then
|
||||||
cd "$dir" || { echo "Cannot change directory to $dir"; exit 1; }
|
cd "$dir" || { echo "Cannot change directory to $dir"; exit 1; }
|
||||||
echo "$(echo $dir | rev | cut -f 1 -d'/' | rev):"
|
echo "$(echo $dir | rev | cut -f 1 -d'/' | rev):"
|
||||||
|
if [[ $* == *--fetch* ]]; then
|
||||||
|
git fetch
|
||||||
|
fi
|
||||||
gst
|
gst
|
||||||
echo ""
|
echo ""
|
||||||
cd - > /dev/null || { echo "Cannot change back to the original directory"; exit 1; }
|
cd - > /dev/null || { echo "Cannot change back to the original directory"; exit 1; }
|
||||||
|
|||||||
@@ -45,52 +45,52 @@
|
|||||||
}];
|
}];
|
||||||
themes = {
|
themes = {
|
||||||
base16 = with rice.color; {
|
base16 = with rice.color; {
|
||||||
"attributes" = blue.base;
|
"attributes" = blue.bright;
|
||||||
"comment" = {
|
"comment" = {
|
||||||
"fg" = white.dark;
|
"fg" = white.dark;
|
||||||
"modifiers" = [ "italic" ];
|
"modifiers" = [ "italic" ];
|
||||||
};
|
};
|
||||||
"constant" = cyan.base;
|
"constant" = cyan.bright;
|
||||||
"constant.character.escape" = yellow.bright;
|
"constant.character.escape" = yellow.bright;
|
||||||
"constant.numeric" = blue.base;
|
"constant.numeric" = blue.bright;
|
||||||
"constructor" = magenta.base;
|
"constructor" = magenta.bright;
|
||||||
"debug" = yellow.dark;
|
"debug" = yellow.dark;
|
||||||
"diagnostic.modifiers" = [ "underlined" ];
|
"diagnostic.modifiers" = [ "underlined" ];
|
||||||
"diff.delta" = blue.base;
|
"diff.delta" = blue.bright;
|
||||||
"diff.minus" = red.base;
|
"diff.minus" = red.bright;
|
||||||
"diff.plus" = green.base;
|
"diff.plus" = green.bright;
|
||||||
"error" = red.base;
|
"error" = red.bright;
|
||||||
"function" = cyan.base;
|
"function" = cyan.bright;
|
||||||
"hint" = yellow.dark;
|
"hint" = yellow.dark;
|
||||||
"info" = cyan.base;
|
"info" = cyan.bright;
|
||||||
"keyword" = cyan.bright;
|
"keyword" = cyan.bright;
|
||||||
"label" = cyan.bright;
|
"label" = cyan.bright;
|
||||||
"namespace" = cyan.bright;
|
"namespace" = cyan.bright;
|
||||||
"operator" = magenta.dark;
|
"operator" = magenta.bright;
|
||||||
"special" = cyan.base;
|
"special" = cyan.bright;
|
||||||
"string" = green.base;
|
"string" = green.bright;
|
||||||
"type" = green.base;
|
"type" = green.bright;
|
||||||
"variable" = red.base;
|
"variable" = blue.bright;
|
||||||
"variableother.member" = green.base;
|
"variableother.member" = green.base;
|
||||||
"warning" = blue.base;
|
"warning" = blue.bright;
|
||||||
|
|
||||||
"markup.bold" = {
|
"markup.bold" = {
|
||||||
"fg" = green.base;
|
"fg" = green.bright;
|
||||||
"modifiers" = [ "bold" ];
|
"modifiers" = [ "bold" ];
|
||||||
};
|
};
|
||||||
"markup.heading" = cyan.base;
|
"markup.heading" = cyan.bright;
|
||||||
"italic" = {
|
"italic" = {
|
||||||
"fg" = cyan.bright;
|
"fg" = cyan.bright;
|
||||||
"modifiers" = [ "italic" ];
|
"modifiers" = [ "italic" ];
|
||||||
};
|
};
|
||||||
"markup.linktext" = red.base;
|
"markup.linktext" = red.bright;
|
||||||
"markup.linkurl" = {
|
"markup.linkurl" = {
|
||||||
"fg" = blue.base;
|
"fg" = blue.bright;
|
||||||
"modifiers" = [ "underlined" ];
|
"modifiers" = [ "underlined" ];
|
||||||
};
|
};
|
||||||
"markup.list" = red.base;
|
"markup.list" = red.bright;
|
||||||
"markup.quote" = magenta.base;
|
"markup.quote" = magenta.bright;
|
||||||
"markup.raw" = green.base;
|
"markup.raw" = green.bright;
|
||||||
"markup.strikethrough" = {
|
"markup.strikethrough" = {
|
||||||
"modifiers" = [ "crossed_out" ];
|
"modifiers" = [ "crossed_out" ];
|
||||||
};
|
};
|
||||||
@@ -108,79 +108,71 @@
|
|||||||
"underline" = { style = "curl"; };
|
"underline" = { style = "curl"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
"ui.background" = {
|
"ui.background" = { # general background of the editor window
|
||||||
"bg" = background;
|
"bg" = background;
|
||||||
};
|
};
|
||||||
"ui.bufferline" = {
|
"ui.bufferline" = { # the top line ("tab"-line)
|
||||||
"fg" = magenta.base;
|
"fg" = magenta.base;
|
||||||
"bg" = background;
|
"bg" = black.base;
|
||||||
};
|
};
|
||||||
"ui.bufferline.active" = {
|
"ui.bufferline.active" = { # the active "tab"
|
||||||
"fg" = background;
|
"fg" = background;
|
||||||
"bg" = magenta.dark;
|
"bg" = magenta.base;
|
||||||
"modifiers" = [ "bold" ];
|
"modifiers" = [ "bold" ];
|
||||||
};
|
};
|
||||||
"ui.cursor" = {
|
"ui.cursor" = { # the cursor in Normal mode
|
||||||
"fg" = white.base;
|
"fg" = white.base;
|
||||||
"modifiers" = [ "reversed" ];
|
"modifiers" = [ "reversed" ];
|
||||||
};
|
};
|
||||||
"ui.cursor.insert" = {
|
"ui.cursorline.primary" = { # the line on which the cursor is on
|
||||||
"fg" = green.base;
|
"bg" = black.base;
|
||||||
"modifiers" = [ "reversed" ];
|
|
||||||
};
|
};
|
||||||
"ui.cursorline.primary" = {
|
"ui.cursor.match" = { # Matching bracket etc.
|
||||||
"bg" = black.bright;
|
"bg" = green.dark;
|
||||||
};
|
|
||||||
"ui.cursor.match" = {
|
|
||||||
"fg" = green.base;
|
|
||||||
"modifiers" = [ "reversed" ];
|
|
||||||
};
|
|
||||||
"ui.cursor.select" = {
|
|
||||||
"fg" = green.base;
|
|
||||||
"modifiers" = [ "reversed" ];
|
"modifiers" = [ "reversed" ];
|
||||||
};
|
};
|
||||||
"ui.gutter" = {
|
"ui.gutter" = {
|
||||||
"bg" = black.bright;
|
"bg" = black.base;
|
||||||
};
|
};
|
||||||
"ui.help" = {
|
"ui.help" = {
|
||||||
"fg" = cyan.base;
|
"fg" = cyan.base;
|
||||||
"bg" = background;
|
"bg" = black.base;
|
||||||
};
|
};
|
||||||
"ui.linenr" = {
|
"ui.linenr" = {
|
||||||
"fg" = yellow.dark;
|
"fg" = white.dark;
|
||||||
"bg" = black.bright;
|
"bg" = black.base;
|
||||||
};
|
};
|
||||||
"ui.linenr.selected" = {
|
"ui.linenr.selected" = {
|
||||||
"fg" = blue.dark;
|
"fg" = blue.bright;
|
||||||
"bg" = background;
|
|
||||||
"modifiers" = [ "bold" ];
|
"modifiers" = [ "bold" ];
|
||||||
};
|
};
|
||||||
"ui.menu" = {
|
"ui.menu" = {
|
||||||
"fg" = magenta.dark;
|
"fg" = magenta.base;
|
||||||
"bg" = background;
|
"bg" = black.base;
|
||||||
};
|
};
|
||||||
"ui.menu.scroll" = {
|
"ui.menu.scroll" = {
|
||||||
"fg" = yellow.dark;
|
"fg" = yellow.dark;
|
||||||
"bg" = background;
|
"bg" = background;
|
||||||
};
|
};
|
||||||
"ui.menu.selected" = {
|
"ui.menu.selected" = {
|
||||||
"fg" = red.dark;
|
"fg" = red.base;
|
||||||
"bg" = blue.dark;
|
"bg" = blue.dark;
|
||||||
};
|
};
|
||||||
"ui.popup" = {
|
"ui.popup" = {
|
||||||
"bg" = grey.dark;
|
"bg" = black.base;
|
||||||
};
|
};
|
||||||
"ui.selection" = {
|
"ui.selection" = {
|
||||||
"bg" = grey.base;
|
"bg" = white.dark;
|
||||||
};
|
};
|
||||||
"ui.selection.primary" = {
|
"ui.selection.primary" = {
|
||||||
"bg" = grey.base;
|
"bg" = black.bright;
|
||||||
};
|
};
|
||||||
"ui.statusline" = {
|
"ui.statusline" = {
|
||||||
"fg" = blue.bright;
|
"fg" = blue.bright;
|
||||||
|
# "bg" = black.base;
|
||||||
};
|
};
|
||||||
"ui.statusline.inactive" = {
|
"ui.statusline.inactive" = {
|
||||||
"fg" = yellow.bright;
|
"fg" = red.bright;
|
||||||
"bg" = red.dark;
|
"bg" = red.dark;
|
||||||
};
|
};
|
||||||
"ui.statusline.insert" = {
|
"ui.statusline.insert" = {
|
||||||
@@ -195,13 +187,13 @@
|
|||||||
"fg" = cyan.bright;
|
"fg" = cyan.bright;
|
||||||
"bg" = cyan.dark;
|
"bg" = cyan.dark;
|
||||||
};
|
};
|
||||||
"ui.text" = magenta.dark;
|
"ui.text" = magenta.base;
|
||||||
"ui.text.focus" = magenta.dark;
|
"ui.text.focus" = cyan.base;
|
||||||
"ui.virtual.indent-guide" = {
|
"ui.virtual.indent-guide" = {
|
||||||
"fg" = grey.dark;
|
"fg" = black.bright;
|
||||||
};
|
};
|
||||||
"ui.virtual.inlay-hint" = {
|
"ui.virtual.inlay-hint" = {
|
||||||
"fg" = grey.dark;
|
"fg" = black.bright;
|
||||||
};
|
};
|
||||||
"ui.virtual.ruler" = {
|
"ui.virtual.ruler" = {
|
||||||
"bg" = background;
|
"bg" = background;
|
||||||
|
|||||||
@@ -55,14 +55,16 @@ lib.mkIf (user != "tv")
|
|||||||
package = pkgs-unstable.waybar;
|
package = pkgs-unstable.waybar;
|
||||||
settings = {
|
settings = {
|
||||||
bar = {
|
bar = {
|
||||||
height = 20;
|
# height = 20;
|
||||||
layer = "top";
|
layer = "top";
|
||||||
# position = "top";
|
|
||||||
position = "bottom";
|
position = "bottom";
|
||||||
margin-top = 0;
|
margin-top = 0;
|
||||||
margin-left = rice.gap-size;
|
# margin-left = rice.gap-size;
|
||||||
margin-bottom = rice.gap-size;
|
# margin-bottom = rice.gap-size;
|
||||||
margin-right = rice.gap-size;
|
# margin-right = rice.gap-size;
|
||||||
|
margin-left = 0;
|
||||||
|
margin-bottom = 0;
|
||||||
|
margin-right = 0;
|
||||||
spacing = 10;
|
spacing = 10;
|
||||||
modules-left = [
|
modules-left = [
|
||||||
# "cpu"
|
# "cpu"
|
||||||
@@ -173,12 +175,9 @@ lib.mkIf (user != "tv")
|
|||||||
window#waybar {
|
window#waybar {
|
||||||
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.background},${builtins.toString rice.transparency});
|
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.background},${builtins.toString rice.transparency});
|
||||||
transition-duration: 2s;
|
transition-duration: 2s;
|
||||||
padding: 7px 10px;
|
|
||||||
padding-top: 0.1em;
|
|
||||||
/* border: ${builtins.toString rice.border-width}px solid rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue.base}); */
|
/* border: ${builtins.toString rice.border-width}px solid rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue.base}); */
|
||||||
/* margin: ${builtins.toString rice.gap-size}px; */
|
/* margin: ${builtins.toString rice.gap-size}px; */
|
||||||
border-radius: ${builtins.toString rice.rounding}px;
|
/* border-radius: ${builtins.toString rice.rounding}px; */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#clock,
|
#clock,
|
||||||
@@ -202,9 +201,9 @@ lib.mkIf (user != "tv")
|
|||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.grey.base});
|
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.white.dark});
|
||||||
margin-left: 10px;
|
padding-left: 10px;
|
||||||
margin-right: 10px;
|
padding-right: 10px;
|
||||||
border-radius: ${builtins.toString rice.rounding}px;
|
border-radius: ${builtins.toString rice.rounding}px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,6 +232,9 @@ lib.mkIf (user != "tv")
|
|||||||
#wireplumber.muted {
|
#wireplumber.muted {
|
||||||
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue.base});
|
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue.base});
|
||||||
}
|
}
|
||||||
|
#wireplumber {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
#battery.warning:not(.charging) {
|
#battery.warning:not(.charging) {
|
||||||
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green.base});;
|
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green.base});;
|
||||||
|
|||||||
2
home.nix
2
home.nix
@@ -40,6 +40,8 @@
|
|||||||
./home-modules/latex.nix
|
./home-modules/latex.nix
|
||||||
./home-modules/pandoc.nix
|
./home-modules/pandoc.nix
|
||||||
./home-modules/python.nix
|
./home-modules/python.nix
|
||||||
|
|
||||||
|
./home-modules/color-pallete.nix
|
||||||
];
|
];
|
||||||
home.username = user;
|
home.username = user;
|
||||||
home.homeDirectory = "/home/${user}";
|
home.homeDirectory = "/home/${user}";
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ in
|
|||||||
alter-luminace-hex = hex: amount:
|
alter-luminace-hex = hex: amount:
|
||||||
let
|
let
|
||||||
color-num = with (slice-hex (nohash hex)); { r = drune-to-255 r; g = drune-to-255 g; b = drune-to-255 b; };
|
color-num = with (slice-hex (nohash hex)); { r = drune-to-255 r; g = drune-to-255 g; b = drune-to-255 b; };
|
||||||
alter = num: (num-to-drune (cap-255 (builtins.floor (num * (1 + amount)))));
|
alter = num: (num-to-drune (cap-255 (builtins.floor ((125 * amount) + (num * (1+amount))) )));
|
||||||
in
|
in
|
||||||
with color-num; "#${alter r}${alter g}${alter b}";
|
with color-num; "#${alter r}${alter g}${alter b}";
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user