nix-rice, slightly scuffed

This commit is contained in:
atagen 2023-05-21 01:34:21 +10:00
parent aae14e214e
commit 60a15031a9
9 changed files with 275 additions and 116 deletions

View file

@ -6,7 +6,8 @@
pkgs,
nur,
...
}:
}: let
palette-hex = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.palette;
in {
imports = [
inputs.hyprland.homeManagerModules.default
@ -77,7 +78,7 @@ in {
hidpi = false;
};
recommendedEnvironment = true;
extraConfig = with pkgs.rice; builtins.replaceStrings
extraConfig = with pkgs.rice; (builtins.replaceStrings
["#BGIMAGE"
"#GTKTHEME"
"#FONT"
@ -86,17 +87,17 @@ in {
"#BORDER"]
["${bg.image}"
gtk.name
fonts.sansSerif.name
fonts.sans.name
icons.name
palette.util.fg
palette.util.bg]
(builtins.readFile dots/hyprland/hyprland.conf);
palette-hex.util.fg
palette-hex.util.bg]
(builtins.readFile dots/hyprland/hyprland.conf));
};
programs.eww-hyprland = {
enable = true;
colors = with pkgs.rice.palette;
colors = with palette-hex;
(builtins.replaceStrings
["BLACK"
"BLCKA"
@ -159,25 +160,28 @@ in {
{
"swaync/config.json" = dots/swaync/config.json;
"swaync/configSchema.json" = dots/swaync/configSchema.json;
"swaync/style.css" = with rice.palette; builtins.replaceStrings
["PANELBG"
"BORDER"
"NOTIBGNORM"
"NOTIBGHOVER"
"NOTIBGFOCUS"
"NOTIBGCLOSE"
"NOTIBGHOVERCLOSE"
"BGSELECTED"]
[util.bg
normal.black
util.bg
bright.black
bright.black
normal.black
bright.black
bright.black]
(builtins.readFile dots/swaync/style.css);
} // {"swaync/style.css" = {
enable = true;
text = with palette-hex; (builtins.replaceStrings
["PANELBG"
"BORDER"
"NOTIBGNORM"
"NOTIBGHOVER"
"NOTIBGFOCUS"
"NOTIBGCLOSE"
"NOTIBGHOVERCLOSE"
"BGSELECTED"]
[util.bg
normal.black
util.bg
bright.black
bright.black
normal.black
bright.black
bright.black]
(builtins.readFile dots/swaync/style.css));
};
};
xdg.systemDirs.data = [
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
@ -185,12 +189,12 @@ in {
];
home.sessionVariables = {
GTK_THEME = rice.gtk.name;
GTK_THEME = pkgs.rice.gtk.name;
};
programs.wlogout = {
enable = true;
layout = builtins.fromJSON (builtins.readFile dots/wlogout/layout);
style = with rice.palette; builtins.replaceStrings
layout = (builtins.fromJSON (builtins.readFile dots/wlogout/layout));
style = with palette-hex; (builtins.replaceStrings
["/usr/share/wlogout"
"/etc/wlogout"
"WINBG"
@ -203,7 +207,7 @@ in {
util.fg
util.bg_sel
normal.yellow]
(builtins.readFile dots/wlogout/style.css);
(builtins.readFile dots/wlogout/style.css));
};
programs.fuzzel = with pkgs.rice; {
@ -211,7 +215,7 @@ in {
settings = {
main = {
dpi-aware = "no";
font = with fonts.sansSerif; lib.strings.concatStrings [name ":size=" size];
font = with fonts.sans; lib.strings.concatStrings [name ":size=" (builtins.toString size)];
icon-theme = icons.name;
terminal = "kitty";
};
@ -223,21 +227,27 @@ in {
radius = rounding;
};
colors = {
background = lib.strings.concatStrings [pkgs.rice.palette.util.bg "FF"];
text = lib.strings.concatStrings [pkgs.rice.palette.util.fg "FF"];
selection = lib.strings.concatStrings [pkgs.rice.palette.util.bg_sel "FF"];
selection-text = lib.strings.concatStrings [pkgs.rice.palette.util.fg_sel "FF"];
selection-match = lib.strings.concatStrings [pkgs.rice.palette.util.cursor_text "FF"];
match = lib.strings.concatStrings [pkgs.rice.palette.util "FF"];
border = lib.strings.concatStrings [pkgs.rice.palette.util.bg_sel "FF"];
background = lib.strings.concatStrings [palette-hex.util.bg "FF"];
text = lib.strings.concatStrings [palette-hex.util.fg "FF"];
selection = lib.strings.concatStrings [palette-hex.util.bg_sel "FF"];
selection-text = lib.strings.concatStrings [palette-hex.util.fg_sel "FF"];
selection-match = lib.strings.concatStrings [palette-hex.util.cursor "FF"];
match = lib.strings.concatStrings [palette-hex.util.fg_sel "FF"];
border = lib.strings.concatStrings [palette-hex.util.bg_sel "FF"];
};
};
};
gtk = {
enable = true;
theme = rice.gtk;
iconTheme = rice.icons;
theme = with pkgs.rice.gtk; {
package = package;
name = name;
};
iconTheme = with pkgs.rice.icons; {
package = package;
name = name;
};
};
programs.direnv = {
@ -275,17 +285,17 @@ in {
};
};
programs.kitty = with rice; {
programs.kitty = with pkgs.rice; {
enable = true;
font = with fonts; {
name = monospace.name;
size = monospace.size;
};
settings = with palette; {
settings = with palette-hex; {
foreground = util.fg;
background = util.bg;
cursor = util.cursor;
cursor_text = util.cursor_text;
cursor_text = util.bg;
selection_foreground = util.fg_sel;
selection_background = util.bg_sel;
color0 = normal.black;
@ -319,10 +329,10 @@ in {
programs.fzf = {
enable = true;
enableZshIntegration = true;
colors = with rice.palette; {
colors = with palette-hex; {
fg = util.fg;
bg = util.bg;
hl = util.cursor_text;
hl = util.bg_sel;
"fg+" = util.fg_sel;
"bg+" = util.bg_sel;
"hl+" = bright.green;