collate recent changes back to master
This commit is contained in:
commit
92ed39cb83
258 changed files with 5169 additions and 16379 deletions
141
rice/default.nix
Normal file
141
rice/default.nix
Normal file
|
@ -0,0 +1,141 @@
|
|||
{
|
||||
inputs,
|
||||
system,
|
||||
nix-rice,
|
||||
}:
|
||||
let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
inherit (nix-rice) kitty-themes;
|
||||
inherit (nix-rice.palette) toRGBShortHex toRGBHex;
|
||||
theme = kitty-themes.parseTheme ./pal.conf;
|
||||
in
|
||||
rec {
|
||||
palette = theme // {
|
||||
normal = {
|
||||
black = theme.color0;
|
||||
red = theme.color1;
|
||||
green = theme.color2;
|
||||
yellow = theme.color3;
|
||||
blue = theme.color4;
|
||||
magenta = theme.color5;
|
||||
cyan = theme.color6;
|
||||
white = theme.color7;
|
||||
};
|
||||
bright = {
|
||||
black = theme.color8;
|
||||
red = theme.color9;
|
||||
green = theme.color10;
|
||||
yellow = theme.color11;
|
||||
blue = theme.color12;
|
||||
magenta = theme.color13;
|
||||
cyan = theme.color14;
|
||||
white = theme.color15;
|
||||
};
|
||||
util = {
|
||||
fg = theme.foreground;
|
||||
bg = theme.background;
|
||||
fg_sel = theme.selection_foreground;
|
||||
bg_sel = theme.selection_background;
|
||||
inherit (theme) cursor;
|
||||
# url = theme.url_color;
|
||||
};
|
||||
hex = toRGBHex palette;
|
||||
shortHex = toRGBShortHex palette;
|
||||
};
|
||||
|
||||
fonts =
|
||||
let
|
||||
sans = {
|
||||
name = "Inria Sans";
|
||||
size = 12;
|
||||
package = pkgs.inriafonts;
|
||||
};
|
||||
serif = {
|
||||
name = "Inria Serif";
|
||||
size = 12;
|
||||
package = pkgs.inriafonts;
|
||||
};
|
||||
monospace = {
|
||||
name = "Fira Code";
|
||||
size = 10;
|
||||
package = pkgs.fira-code;
|
||||
};
|
||||
emoji = {
|
||||
name = "Twitter Color Emoji";
|
||||
size = 12;
|
||||
package = pkgs.twemoji-color-font;
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit
|
||||
sans
|
||||
serif
|
||||
monospace
|
||||
emoji
|
||||
;
|
||||
pkgs = [
|
||||
sans.package
|
||||
serif.package
|
||||
monospace.package
|
||||
emoji.package
|
||||
pkgs.meslo-lgs-nf
|
||||
];
|
||||
};
|
||||
|
||||
icons =
|
||||
let
|
||||
package = pkgs.papirus-icon-theme;
|
||||
in
|
||||
{
|
||||
inherit package;
|
||||
name = "Papirus-Dark";
|
||||
pkgs = [
|
||||
package
|
||||
# material-icons
|
||||
# material-design-icons
|
||||
];
|
||||
};
|
||||
|
||||
gtk-theme = {
|
||||
name = "nix-rice";
|
||||
package = pkgs.callPackage ./gtk-theme.nix { } { palette = toRGBShortHex palette; };
|
||||
};
|
||||
|
||||
borders = {
|
||||
thickness = 6;
|
||||
rounding = 0;
|
||||
gaps_in = 32;
|
||||
gaps_out = 72;
|
||||
};
|
||||
|
||||
bg = {
|
||||
image = pkgs.callPackage ./wallpaper.nix { } {
|
||||
palette = toRGBShortHex palette;
|
||||
wallpaper =
|
||||
let
|
||||
name = "wallpaper.jpg";
|
||||
in
|
||||
builtins.path {
|
||||
inherit name;
|
||||
path = ./${name};
|
||||
sha256 = "2db3f9d0397fbd4746ada297bd14c0c7d3e22c7d4e894968fcfece90bbfb902a";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
package = pkgs.afterglow-cursors-recolored.override {
|
||||
themeVariants = [ "Dracula" ];
|
||||
draculaColorVariants = [ "Orange" ];
|
||||
};
|
||||
name = "Afterglow-Recolored-Dracula-Orange";
|
||||
};
|
||||
|
||||
plymouth = {
|
||||
theme = "starship";
|
||||
font = "${fonts.sans.package}/share/fonts/truetype/InriaSans-Regular.ttf";
|
||||
themePackages = [
|
||||
inputs.hudcore.packages.${pkgs.system}.default
|
||||
];
|
||||
};
|
||||
}
|
74
rice/gtk-theme.nix
Normal file
74
rice/gtk-theme.nix
Normal file
|
@ -0,0 +1,74 @@
|
|||
{ pkgs }:
|
||||
{ palette }:
|
||||
let
|
||||
rendersvg = pkgs.runCommand "rendersvg" { } ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${pkgs.resvg}/bin/resvg $out/bin/rendersvg
|
||||
'';
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "generated-gtk-theme-nix-rice";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nana-4";
|
||||
repo = "materia-theme";
|
||||
rev = "d7f59a37ef51f893c28b55dc344146e04b2cd52c";
|
||||
sha256 = "sha256-PnpFAmKEpfg3wBwShLYviZybWQQltcw7fpsQkTUZtww=";
|
||||
};
|
||||
buildInputs = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
sassc
|
||||
bc
|
||||
which
|
||||
meson
|
||||
optipng
|
||||
ninja
|
||||
;
|
||||
inherit (pkgs.nodePackages)
|
||||
sass
|
||||
;
|
||||
inherit (pkgs.gtk4) dev;
|
||||
inherit rendersvg;
|
||||
};
|
||||
phases = [
|
||||
"unpackPhase"
|
||||
"installPhase"
|
||||
];
|
||||
installPhase = ''
|
||||
HOME=/build
|
||||
chmod 777 -R .
|
||||
patchShebangs .
|
||||
mkdir -p $out/share/themes
|
||||
mkdir bin
|
||||
sed -e 's/handle-horz-.*//' -e 's/handle-vert-.*//' -i ./src/gtk-2.0/assets.txt
|
||||
|
||||
cat > /build/gtk-colors << EOF
|
||||
BTN_BG=${palette.util.bg}
|
||||
BTN_FG=${palette.bright.yellow}
|
||||
FG=${palette.util.fg}
|
||||
BG=${palette.util.bg}
|
||||
HDR_BTN_BG=${palette.util.bg}
|
||||
HDR_BTN_FG=${palette.util.fg}
|
||||
ACCENT_BG=${palette.normal.cyan}
|
||||
ACCENT_FG=${palette.normal.yellow}
|
||||
HDR_FG=${palette.bright.yellow}
|
||||
HDR_BG=${palette.util.bg}
|
||||
MATERIA_SURFACE=${palette.normal.black}
|
||||
MATERIA_VIEW=${palette.bright.black}
|
||||
MENU_BG=${palette.util.bg}
|
||||
MENU_FG=${palette.util.fg}
|
||||
SEL_BG=${palette.normal.yellow}
|
||||
SEL_FG=${palette.normal.cyan}
|
||||
TXT_BG=${palette.util.bg}
|
||||
TXT_FG=${palette.util.fg}
|
||||
WM_BORDER_FOCUS=${palette.normal.yellow}
|
||||
WM_BORDER_UNFOCUS=${palette.normal.black}
|
||||
UNITY_DEFAULT_LAUNCHER_STYLE=False
|
||||
NAME="nix-rice"
|
||||
MATERIA_STYLE_COMPACT=False
|
||||
EOF
|
||||
|
||||
echo "Changing colours:"
|
||||
./change_color.sh -o nix-rice /build/gtk-colors -i False -t "$out/share/themes"
|
||||
chmod 555 -R .
|
||||
'';
|
||||
}
|
46
rice/header.sh
Executable file
46
rice/header.sh
Executable file
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh
|
||||
|
||||
row1() {
|
||||
m="0"
|
||||
printf "\e[38;5;$((m*8))m██\e[48;5;$((m*8+1))m\e[m"
|
||||
for n in {1..6};do
|
||||
printf "\e[38;5;$((n+m*8))m██\e[48;5;$((n+m*8+1))m\e[m"
|
||||
done
|
||||
printf "\e[m\e[38;5;$((m*8+7))m██\e[m"
|
||||
}
|
||||
|
||||
row2() {
|
||||
m="1"
|
||||
printf "\e[38;5;$((m*8))m██\e[38;5;$((m*8+1))m\e[48;5;$((m*8))m\e[m"
|
||||
for n in {1..6};do
|
||||
printf "\e[38;5;$((n+m*8))m██\e[38;5;$((n+m*8+1))m\e[48;5;$((n+m*8))m\e[m"
|
||||
done
|
||||
printf "\e[m\e[38;5;$((m*8+7))m██\e[m"
|
||||
}
|
||||
|
||||
row1r() {
|
||||
m="0"
|
||||
printf "\e[38;5;$((m*8+7))m██\e[48;5;$((m*8+6))m\e[m"
|
||||
for n in {6..1};do
|
||||
printf "\e[38;5;$((n+m*8))m██\e[48;5;$((n+m*8-1))m\e[m"
|
||||
done
|
||||
printf "\e[m\e[38;5;$((m))m██\e[m"
|
||||
}
|
||||
|
||||
row2r() {
|
||||
m="1"
|
||||
printf "\e[38;5;$((m*8+7))m██\e[38;5;$((m*8+6))m\e[48;5;$((m*8+7))m\e[m"
|
||||
for n in {6..1};do
|
||||
printf "\e[38;5;$((n+m*8))m██\e[38;5;$((n+m*8-1))m\e[48;5;$((n+m*8))m\e[m"
|
||||
done
|
||||
printf "\e[m\e[38;5;$((m*8))m██\e[m"
|
||||
}
|
||||
|
||||
for n in {0..4}; do
|
||||
row1
|
||||
# row1r
|
||||
printf "\n"
|
||||
row2
|
||||
# row2r
|
||||
printf "\n"
|
||||
done
|
32
rice/pal.conf
Normal file
32
rice/pal.conf
Normal file
|
@ -0,0 +1,32 @@
|
|||
background #1b2021
|
||||
foreground #cecbca
|
||||
|
||||
color0 #272a2a
|
||||
color8 #202e2f
|
||||
|
||||
color1 #c43325
|
||||
color9 #c46056
|
||||
|
||||
color2 #8cc992
|
||||
color10 #c2dab0
|
||||
|
||||
color3 #ffb852
|
||||
color11 #ffab5b
|
||||
|
||||
color4 #5299ff
|
||||
color12 #92beff
|
||||
|
||||
color5 #645ac9
|
||||
color13 #928cc9
|
||||
|
||||
color6 #5abfc9
|
||||
color14 #8cc4c9
|
||||
|
||||
color7 #b0c2da
|
||||
color15 #caccce
|
||||
|
||||
selection_background #202e2f
|
||||
selection_foreground #5299ff
|
||||
|
||||
cursor #caccce
|
||||
cursor_text_color #5299ff
|
BIN
rice/wallpaper.jpg
Normal file
BIN
rice/wallpaper.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 MiB |
34
rice/wallpaper.nix
Normal file
34
rice/wallpaper.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
{
|
||||
palette,
|
||||
wallpaper,
|
||||
}:
|
||||
let
|
||||
strPal =
|
||||
let
|
||||
inherit (lib) concatStringsSep;
|
||||
inherit (builtins) foldl' attrValues;
|
||||
in
|
||||
concatStringsSep " " (
|
||||
foldl' (acc: el: acc ++ (attrValues el)) [ ] [ palette.normal palette.bright palette.util ]
|
||||
);
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "generated-wallpaper.png";
|
||||
src = wallpaper;
|
||||
buildInputs = [
|
||||
pkgs.lutgen
|
||||
];
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
echo -e "Generating wallpaper from ${wallpaper} using palette:\n${strPal}.."
|
||||
${lib.getExe pkgs.lutgen} apply --lum 0.8 -l 10 -s 128 -n 8 -o $out ${wallpaper} -- ${strPal}
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue