nuke ezcolors and ezfonts
This commit is contained in:
parent
7114adfe1d
commit
d06bae21cc
@ -8,7 +8,6 @@ all: {
|
||||
imports = [all];
|
||||
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
systemd-boot.editor = lib.mkDefault false;
|
||||
grub.extraConfig = lib.mkIf (!config.boot.loader.systemd-boot.editor) ''
|
||||
set superusers=""
|
||||
|
26
flake.nix
26
flake.nix
@ -10,18 +10,6 @@
|
||||
inputs.utils.follows = "flake-utils";
|
||||
};
|
||||
|
||||
base16-rofi = {
|
||||
url = "github:tinted-theming/base16-rofi";
|
||||
flake = false;
|
||||
};
|
||||
base16-kitty = {
|
||||
url = "github:kdrag0n/base16-kitty";
|
||||
flake = false;
|
||||
};
|
||||
base16-kermit = {
|
||||
url = "github:orhun/base16-kermit";
|
||||
flake = false;
|
||||
};
|
||||
tinted-foot = {
|
||||
url = "github:tinted-theming/tinted-foot";
|
||||
flake = false;
|
||||
@ -30,10 +18,6 @@
|
||||
url = "github:tinted-theming/tinted-vscode";
|
||||
flake = false;
|
||||
};
|
||||
base16-vim = {
|
||||
url = "github:chriskempson/base16-vim";
|
||||
flake = false;
|
||||
};
|
||||
rycee = {
|
||||
url = "gitlab:rycee/nur-expressions";
|
||||
flake = false;
|
||||
@ -46,10 +30,6 @@
|
||||
url = "github:thefryscorer/schemer2";
|
||||
flake = false;
|
||||
};
|
||||
auto-base16-theme = {
|
||||
url = "git+https://macoy.me/code/macoy/auto-base16-theme.git";
|
||||
flake = false;
|
||||
};
|
||||
npmlock2nix = {
|
||||
url = "github:nix-community/npmlock2nix";
|
||||
flake = false;
|
||||
@ -67,6 +47,10 @@
|
||||
url = "github:mattydebie/bitwarden-rofi";
|
||||
flake = false;
|
||||
};
|
||||
stylix = {
|
||||
url = "github:danth/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
@ -102,8 +86,6 @@
|
||||
homeManagerModules = let
|
||||
m = {
|
||||
ezpcusr = import ./home-manager/modules/ezpcusr.nix inputs;
|
||||
colors = import ./home-manager/modules/colors.nix inputs;
|
||||
fonts = import ./home-manager/modules/fonts.nix;
|
||||
gaming = import ./home-manager/modules/gaming.nix inputs;
|
||||
kermit = import ./home-manager/modules/kermit.nix;
|
||||
de2u = import ./home-manager/modules/de2u.nix inputs;
|
||||
|
@ -6,6 +6,7 @@ inputs: all: {
|
||||
}: {
|
||||
imports = [
|
||||
all
|
||||
inputs.stylix.homeModules.stylix
|
||||
];
|
||||
|
||||
programs.direnv = {
|
||||
|
@ -1,504 +0,0 @@
|
||||
inputs: {
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.ezcolors;
|
||||
|
||||
alf = ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "a" "b" "c" "d" "e" "f"];
|
||||
fil = c:
|
||||
lib.imap0 (n: x:
|
||||
if (lib.toLower x) == (lib.toLower c)
|
||||
then n
|
||||
else null)
|
||||
alf;
|
||||
fin = c: builtins.elemAt (builtins.filter (x: x != null) (fil c)) 0;
|
||||
add = l: lib.foldl (acc: n: acc * 16 + n) 0 l;
|
||||
calc = s: add (builtins.map fin (builtins.filter (x: builtins.isString x && builtins.stringLength x == 1) (builtins.split "" s)));
|
||||
|
||||
splitHex = c: let
|
||||
s' = builtins.match "(..)(..)(..)|(.)(.)(.)" c;
|
||||
ss = builtins.elemAt s';
|
||||
o =
|
||||
if ss 0 == null
|
||||
then 3
|
||||
else 0;
|
||||
in {
|
||||
r = ss (0 + o);
|
||||
g = ss (1 + o);
|
||||
b = ss (2 + o);
|
||||
};
|
||||
|
||||
hexToRgb = c: builtins.mapAttrs (_: calc) (splitHex c);
|
||||
|
||||
hexToAlphaCss = c: a: with hexToRgb c; "rgba(${r}, ${g}, ${b}, ${a})";
|
||||
|
||||
makeScheme = base16:
|
||||
lib.mapAttrs' (k: v: lib.nameValuePair "${k}-hex" v) base16
|
||||
// lib.mapAttrs' (k: v: lib.nameValuePair "${k}-hex-r" (splitHex v).r) base16
|
||||
// lib.mapAttrs' (k: v: lib.nameValuePair "${k}-hex-g" (splitHex v).g) base16
|
||||
// lib.mapAttrs' (k: v: lib.nameValuePair "${k}-hex-b" (splitHex v).b) base16
|
||||
// lib.mapAttrs' (k: v: lib.nameValuePair "${k}-rgb-r" (hexToRgb v).r) base16
|
||||
// lib.mapAttrs' (k: v: lib.nameValuePair "${k}-rgb-g" (hexToRgb v).g) base16
|
||||
// lib.mapAttrs' (k: v: lib.nameValuePair "${k}-rgb-b" (hexToRgb v).b) base16
|
||||
// lib.mapAttrs' (k: v: lib.nameValuePair "${k}-dec-r" ((hexToRgb v).r / 255.0)) base16
|
||||
// lib.mapAttrs' (k: v: lib.nameValuePair "${k}-dec-g" ((hexToRgb v).g / 255.0)) base16
|
||||
// lib.mapAttrs' (k: v: lib.nameValuePair "${k}-dec-b" ((hexToRgb v).b / 255.0)) base16;
|
||||
|
||||
mustache = scheme: src:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
# TODO add template name
|
||||
name = "base16-generated";
|
||||
inherit src;
|
||||
data = pkgs.writeText "base16-generated-data" (builtins.toJSON scheme);
|
||||
phases = ["buildPhase"];
|
||||
buildPhase = "${pkgs.mustache-go}/bin/mustache $data $src > $out";
|
||||
};
|
||||
|
||||
scheme =
|
||||
makeScheme cfg.base16
|
||||
// {
|
||||
scheme-name = "base16 generated";
|
||||
scheme-slug = "idk";
|
||||
scheme-author = "nixos";
|
||||
};
|
||||
|
||||
genTheme = repo: mustache scheme "${repo}/templates/default.mustache";
|
||||
|
||||
schemer2 = pkgs.buildGoPackage rec {
|
||||
pname = "schemer2";
|
||||
version = "0.0.1";
|
||||
|
||||
goPackagePath = "github.com/thefryscorer/schemer2";
|
||||
|
||||
src = inputs.schemer2;
|
||||
|
||||
vendorSha256 = "1fzlslz9xr3jay9kpvrg7sj1a0c1f1m1kn5rnis49hvlr1sc00d1";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Terminal Colorscheme Generator and Converter";
|
||||
homepage = "https://github.com/thefryscorer/schemer2";
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.ezcolors = {
|
||||
enable = mkEnableOption "Enable automatic colors";
|
||||
|
||||
base16Rgb = mkOption {
|
||||
readOnly = true;
|
||||
type = types.attrsOf (types.attrsOf types.int);
|
||||
};
|
||||
|
||||
base16Split = mkOption {
|
||||
readOnly = true;
|
||||
type = types.attrsOf (types.attrsOf types.str);
|
||||
};
|
||||
|
||||
base16 = mkOption {
|
||||
readOnly = true;
|
||||
type = types.attrsOf types.str;
|
||||
};
|
||||
|
||||
plasma = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
baseColors = mkOption {
|
||||
type = types.either (types.attrsOf types.str) types.path;
|
||||
description = "base16 color scheme or path to an image to use to generate the scheme";
|
||||
default = {
|
||||
# (monokai)
|
||||
base00 = "272822";
|
||||
base01 = "383830";
|
||||
base02 = "49483e";
|
||||
base03 = "75715e";
|
||||
base04 = "a59f85";
|
||||
base05 = "f8f8f2";
|
||||
base06 = "f5f4f1";
|
||||
base07 = "f9f8f5";
|
||||
base08 = "f92672";
|
||||
base09 = "fd971f";
|
||||
base0A = "f4bf75";
|
||||
base0B = "a6e22e";
|
||||
base0C = "a1efe4";
|
||||
base0D = "66d9ef";
|
||||
base0E = "ae81ff";
|
||||
base0F = "cc6633";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
colorsJson = builtins.toFile "colors.json" (builtins.toJSON cfg.base16);
|
||||
themeHashOut = pkgs.runCommand "theme-hash" {} ''
|
||||
cat ${colorsJson} | ${pkgs.coreutils}/bin/sha256sum | ${pkgs.coreutils}/bin/head -c 8 > $out
|
||||
'';
|
||||
themeHash = builtins.readFile themeHashOut;
|
||||
|
||||
i3config = {
|
||||
config = {
|
||||
colors = {
|
||||
background = "#${cfg.base16.base07}";
|
||||
focused = {
|
||||
border = "#${cfg.base16.base05}";
|
||||
background = "#${cfg.base16.base0D}";
|
||||
text = "#${cfg.base16.base00}";
|
||||
indicator = "#${cfg.base16.base0D}";
|
||||
childBorder = "#${cfg.base16.base0D}";
|
||||
};
|
||||
focusedInactive = {
|
||||
border = "#${cfg.base16.base01}";
|
||||
background = "#${cfg.base16.base01}";
|
||||
text = "#${cfg.base16.base05}";
|
||||
indicator = "#${cfg.base16.base03}";
|
||||
childBorder = "#${cfg.base16.base01}";
|
||||
};
|
||||
unfocused = {
|
||||
border = "#${cfg.base16.base01}";
|
||||
background = "#${cfg.base16.base00}";
|
||||
text = "#${cfg.base16.base05}";
|
||||
indicator = "#${cfg.base16.base01}";
|
||||
childBorder = "#${cfg.base16.base01}";
|
||||
};
|
||||
urgent = {
|
||||
border = "#${cfg.base16.base08}";
|
||||
background = "#${cfg.base16.base08}";
|
||||
text = "#${cfg.base16.base00}";
|
||||
indicator = "#${cfg.base16.base08}";
|
||||
childBorder = "#${cfg.base16.base08}";
|
||||
};
|
||||
placeholder = {
|
||||
border = "#${cfg.base16.base00}";
|
||||
background = "#${cfg.base16.base00}";
|
||||
text = "#${cfg.base16.base05}";
|
||||
indicator = "#${cfg.base16.base00}";
|
||||
childBorder = "#${cfg.base16.base00}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
elementTheme = {
|
||||
name = "colors-${themeHash}";
|
||||
is_dark = true;
|
||||
colors = {
|
||||
# "accent-color" = "#${cfg.base16.base02}";
|
||||
# "primary-color" = "#${cfg.base16.base08}";
|
||||
# "warning-color" = "#${cfg.base16.base0F}";
|
||||
|
||||
# "sidebar-color" = "#${cfg.base16.base01}";
|
||||
# "roomlist-background-color" = "#${cfg.base16.base00}";
|
||||
# "roomlist-text-color" = "#${cfg.base16.base05}";
|
||||
# "roomlist-text-secondary-color" = "${cfg.base16.base06}";
|
||||
# "roomlist-highlights-color" = "#${cfg.base16.base02}";
|
||||
# "roomlist-separator-color" = "#${cfg.base16.base05}";
|
||||
|
||||
# "timeline-background-color" = "#${cfg.base16.base00}";
|
||||
# "timeline-text-color" = "#${cfg.base16.base07}";
|
||||
# "timeline-text-secondary-color" = "#${cfg.base16.base05}";
|
||||
# "timeline-highlights-color" = "#${cfg.base16.base02}";
|
||||
# "reaction-row-button-selected-bg-color" = "#${cfg.base16.base0B}";
|
||||
|
||||
"accent-color" = "#${cfg.base16.base02}";
|
||||
"accent" = "#${cfg.base16.base02}";
|
||||
"primary-color" = "#${cfg.base16.base0B}";
|
||||
"warning-color" = "#${cfg.base16.base08}";
|
||||
"alert" = "#${cfg.base16.base08}";
|
||||
|
||||
"sidebar-color" = "#${cfg.base16.base00}";
|
||||
"roomlist-background-color" = "#${cfg.base16.base01}";
|
||||
"roomlist-text-color" = "#${cfg.base16.base05}";
|
||||
"roomlist-text-secondary-color" = "${cfg.base16.base09}";
|
||||
"roomlist-highlights-color" = "#${cfg.base16.base08}";
|
||||
"roomlist-separator-color" = "#${cfg.base16.base05}";
|
||||
|
||||
"timeline-background-color" = "#${cfg.base16.base00}";
|
||||
"timeline-text-color" = "#${cfg.base16.base05}";
|
||||
"secondary-content" = "#${cfg.base16.base05}";
|
||||
"tertiary-content" = "#${cfg.base16.base05}";
|
||||
"timeline-text-secondary-color" = "#${cfg.base16.base06}";
|
||||
"timeline-highlights-color" = "#${cfg.base16.base03}";
|
||||
|
||||
"reaction-row-button-selected-bg-color" = "#${cfg.base16.base04}";
|
||||
"menu-selected-color" = "#${cfg.base16.base04}";
|
||||
"focus-bg-color" = "#${cfg.base16.base04}";
|
||||
"room-highlight-color" = "#${cfg.base16.base04}";
|
||||
"other-user-pill-bg-color" = "#${cfg.base16.base04}";
|
||||
"togglesw-off-color" = "#${cfg.base16.base04}";
|
||||
|
||||
"username-colors" = ["#${cfg.base16.base08}" "#${cfg.base16.base09}" "#${cfg.base16.base0A}" "#${cfg.base16.base0B}" "#${cfg.base16.base0C}" "#${cfg.base16.base0D}" "#${cfg.base16.base0E}" "#${cfg.base16.base0F}"];
|
||||
# "avatar-background-colors" = [ "#${cfg.base16.base03}" "#${cfg.base16.base04}" "#${cfg.base16.base05}" ];
|
||||
};
|
||||
};
|
||||
|
||||
elementConfig = {
|
||||
settingDefaults.custom_themes = [elementTheme];
|
||||
|
||||
settingDefaults.theme = "${elementTheme.name}";
|
||||
default_theme = "${elementTheme.name}";
|
||||
|
||||
showLabsSettings = true;
|
||||
show_labs_settings = true;
|
||||
};
|
||||
|
||||
base16FromImageSrc = pkgs.runCommand "auto-image-base16" {} ''
|
||||
${schemer2}/bin/schemer2 -format img::colors -in ${cfg.baseColors} -out colors.txt && ${pkgs.python3}/bin/python3 ${inputs.auto-base16-theme}/AutoBase16Theme.py ${inputs.auto-base16-theme}/templates/base16-template.yaml auto-image-base16.yaml
|
||||
${pkgs.yaml2json}/bin/yaml2json < auto-image-base16.yaml > $out
|
||||
'';
|
||||
|
||||
base16FromImage = lib.filterAttrs (k: v: k != "scheme" && k != "author") (builtins.fromJSON (builtins.readFile base16FromImageSrc));
|
||||
in
|
||||
mkMerge [
|
||||
(mkIf cfg.enable {
|
||||
# Read only utility attributes
|
||||
ezcolors.base16 =
|
||||
if builtins.typeOf cfg.baseColors == "set"
|
||||
then cfg.baseColors
|
||||
else base16FromImage;
|
||||
ezcolors.base16Rgb = builtins.mapAttrs (n: c: hexToRgb c) cfg.base16;
|
||||
ezcolors.base16Split = builtins.mapAttrs (n: c: splitHex c) cfg.base16;
|
||||
|
||||
# Element
|
||||
xdg.configFile."Riot/config.json".text = builtins.toJSON elementConfig;
|
||||
xdg.configFile."Element/config.json".text = builtins.toJSON elementConfig;
|
||||
# And in case you want to do something with the generated theme yourself
|
||||
xdg.configFile."Riot/theme.json".text = builtins.toJSON elementTheme;
|
||||
xdg.configFile."Element/theme.json".text = builtins.toJSON elementTheme;
|
||||
|
||||
# Mako
|
||||
services.mako = {
|
||||
backgroundColor = "#${cfg.base16.base00}";
|
||||
textColor = "#${cfg.base16.base07}";
|
||||
borderColor = "#${cfg.base16.base08}";
|
||||
progressColor = "over #${cfg.base16.base0D}";
|
||||
};
|
||||
|
||||
# I3/sway
|
||||
wayland.windowManager.sway = i3config;
|
||||
xsession.windowManager.i3 = i3config;
|
||||
|
||||
# Dunst
|
||||
services.dunst = {
|
||||
settings = {
|
||||
global = {
|
||||
frame_color = "#${cfg.base16.base09}";
|
||||
separator_color = "#${cfg.base16.base05}";
|
||||
};
|
||||
|
||||
urgency_low = {
|
||||
background = "#${cfg.base16.base01}";
|
||||
foreground = "#${cfg.base16.base03}";
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
background = "#${cfg.base16.base02}";
|
||||
foreground = "#${cfg.base16.base05}";
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
background = "#${cfg.base16.base08}";
|
||||
foreground = "#${cfg.base16.base06}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Rofi
|
||||
# programs.rofi.theme = "${genTheme inputs.base16-rofi}";
|
||||
programs.rofi.theme = "${pkgs.writeText "theme.rasi" ''
|
||||
${builtins.readFile (mustache scheme "${inputs.base16-rofi}/templates/colors.mustache")}
|
||||
${builtins.readFile ./rofi.css}
|
||||
''}";
|
||||
|
||||
# Kitty
|
||||
programs.kitty.extraConfig = ''
|
||||
include ${genTheme inputs.base16-kitty}
|
||||
'';
|
||||
|
||||
# Kermit
|
||||
programs.kermit.extraConfig = builtins.readFile (genTheme inputs.base16-kermit);
|
||||
|
||||
# Foot
|
||||
programs.foot.settings.main.include = toString (mustache scheme "${inputs.tinted-foot}/templates/base16.mustache");
|
||||
|
||||
# neovim
|
||||
xdg.configFile."nvim/colors/base16.vim".source = "${genTheme inputs.base16-vim}";
|
||||
programs.neovim.extraConfig = ''
|
||||
colorscheme base16
|
||||
set termguicolors
|
||||
'';
|
||||
|
||||
# GTK
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = let
|
||||
generated-gtk-theme = pkgs.callPackage "${inputs.rycee}/pkgs/materia-theme" {
|
||||
configBase16 = {
|
||||
name = "Generated";
|
||||
kind = "dark";
|
||||
colors = builtins.mapAttrs (k: v: {hex.rgb = v;}) cfg.base16;
|
||||
};
|
||||
};
|
||||
in {
|
||||
name = "Generated";
|
||||
package = generated-gtk-theme;
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."geary/user-style.css".text = ''
|
||||
:root, *:not(a) {
|
||||
background-color: #${cfg.base16.base00} !important;
|
||||
color: #${cfg.base16.base05} !important;
|
||||
}
|
||||
'';
|
||||
|
||||
systemd.user.sessionVariables.GTK_THEME = "Generated";
|
||||
home.sessionVariables.GTK_THEME = "Generated";
|
||||
|
||||
# Codium/VSCODE
|
||||
programs.vscode.userSettings = {
|
||||
"workbench.colorTheme" = "nix colors";
|
||||
};
|
||||
|
||||
home.file =
|
||||
lib.mkMerge
|
||||
[
|
||||
(
|
||||
mkIf config.programs.vscode.enable {
|
||||
".vscode-oss/extensions/base16-1.0.0/themes/nix-colors.json".source = mustache scheme "${inputs.tinted-vscode}/templates/base16.mustache";
|
||||
".vscode-oss/extensions/base16-1.0.0/package.json".text = builtins.toJSON {
|
||||
name = "nix colors";
|
||||
displayName = "Automatic Nix-generated base16 colors";
|
||||
version = "1.0.0";
|
||||
publisher = "colors";
|
||||
author = {
|
||||
name = "ezpc usr";
|
||||
email = "usr@ezpc";
|
||||
};
|
||||
engines.vscode = "^1.11.1";
|
||||
categories = "Themes";
|
||||
contributes.themes = [
|
||||
{
|
||||
label = "nix colors";
|
||||
uiTheme = "vs-dark";
|
||||
path = "./themes/nix-colors.json";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
})
|
||||
(mkIf (cfg.enable && cfg.plasma) {
|
||||
programs.plasma.files.kdeglobals = with (lib.mapAttrs (n: c: "#${c}") cfg.base16); {
|
||||
# programs.plasma.files.kdeglobals = with (lib.mapAttrs (n: c: "${toString c.r},${toString c.g},${toString c.b}") cfg.base16Rgb); {
|
||||
General = {
|
||||
ColorScheme = "Generated";
|
||||
Name = "Generated";
|
||||
shadeSortColumn = true;
|
||||
};
|
||||
KDE.contrast = 4;
|
||||
WM = {
|
||||
activeBackground = base00;
|
||||
activeBlend = base00;
|
||||
activeForeground = base06;
|
||||
inactiveBackground = base00;
|
||||
inactiveBlend = base00;
|
||||
inactiveForeground = base05;
|
||||
};
|
||||
"ColorEffects:Disabled" = {
|
||||
Color = "56,56,56";
|
||||
ColorAmount = 0;
|
||||
ColorEffect = 0;
|
||||
ContrastAmount = "0.65000000000000002";
|
||||
ContrastEffect = 1;
|
||||
IntensityAmount = "0.10000000000000001";
|
||||
IntensityEffect = 2;
|
||||
};
|
||||
"ColorEffects:Inactive" = {
|
||||
ChangeSelectionColor = true;
|
||||
Color = "112,111,110";
|
||||
ColorAmount = "0.025000000000000001";
|
||||
ColorEffect = 2;
|
||||
ContrastAmount = "0.10000000000000001";
|
||||
ContrastEffect = 2;
|
||||
Enable = false;
|
||||
IntensityAmount = 0;
|
||||
IntensityEffect = 0;
|
||||
};
|
||||
"Colors:Button" = {
|
||||
BackgroundAlternate = base00;
|
||||
BackgroundNormal = base00;
|
||||
DecorationFocus = base08;
|
||||
DecorationHover = base08;
|
||||
ForegroundActive = base0B;
|
||||
ForegroundInactive = base05;
|
||||
ForegroundLink = base0D;
|
||||
ForegroundNegative = base0F;
|
||||
ForegroundNeutral = base05;
|
||||
ForegroundNormal = base06;
|
||||
ForegroundPositive = base0C;
|
||||
ForegroundVisited = base0E;
|
||||
};
|
||||
"Colors:Selection" = {
|
||||
BackgroundAlternate = base08;
|
||||
BackgroundNormal = base08;
|
||||
DecorationFocus = base08;
|
||||
DecorationHover = base08;
|
||||
ForegroundActive = base0B;
|
||||
ForegroundInactive = base01;
|
||||
ForegroundLink = base0D;
|
||||
ForegroundNegative = base0F;
|
||||
ForegroundNeutral = base05;
|
||||
ForegroundNormal = base01;
|
||||
ForegroundPositive = base0C;
|
||||
ForegroundVisited = base0E;
|
||||
};
|
||||
"Colors:Tooltip" = {
|
||||
BackgroundAlternate = base00;
|
||||
BackgroundNormal = base00;
|
||||
DecorationFocus = base08;
|
||||
DecorationHover = base08;
|
||||
ForegroundActive = base0B;
|
||||
ForegroundInactive = base05;
|
||||
ForegroundLink = base0D;
|
||||
ForegroundNegative = base0F;
|
||||
ForegroundNeutral = base05;
|
||||
ForegroundNormal = base06;
|
||||
ForegroundPositive = base0C;
|
||||
ForegroundVisited = base0E;
|
||||
};
|
||||
"Colors:View" = {
|
||||
BackgroundAlternate = base00;
|
||||
BackgroundNormal = base00;
|
||||
DecorationFocus = base08;
|
||||
DecorationHover = base08;
|
||||
ForegroundActive = base0B;
|
||||
ForegroundInactive = base05;
|
||||
ForegroundLink = base0D;
|
||||
ForegroundNegative = base0F;
|
||||
ForegroundNeutral = base05;
|
||||
ForegroundNormal = base06;
|
||||
ForegroundPositive = base0C;
|
||||
ForegroundVisited = base0E;
|
||||
};
|
||||
"Colors:Window" = {
|
||||
BackgroundAlternate = base00;
|
||||
BackgroundNormal = base00;
|
||||
DecorationFocus = base08;
|
||||
DecorationHover = base08;
|
||||
ForegroundActive = base0B;
|
||||
ForegroundInactive = base05;
|
||||
ForegroundLink = base0D;
|
||||
ForegroundNegative = base0F;
|
||||
ForegroundNeutral = base05;
|
||||
ForegroundNormal = base06;
|
||||
ForegroundPositive = base0C;
|
||||
ForegroundVisited = base0E;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
@ -24,8 +24,7 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
ezcolors.enable = lib.mkDefault true;
|
||||
ezfonts.enable = lib.mkDefault true;
|
||||
stylix.enable = lib.mkDefault true;
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
@ -44,7 +43,7 @@ in {
|
||||
gnomeExtensions.just-perfection
|
||||
gnomeExtensions.appindicator
|
||||
gnomeExtensions.unite-shell
|
||||
gnomeExtensions.gamemode
|
||||
gnomeExtensions.gamemode-shell-extension
|
||||
gnomeExtensions.gsconnect
|
||||
gnomeExtensions.sound-output-device-chooser
|
||||
gnomeExtensions.bluetooth-quick-connect
|
||||
@ -189,12 +188,6 @@ in {
|
||||
icon-opacity = 255;
|
||||
tray-pos = "center";
|
||||
};
|
||||
"org/gnome/shell/extensions/user-theme" = {
|
||||
name =
|
||||
if config.ezcolors.enable
|
||||
then "Generated"
|
||||
else "Default";
|
||||
};
|
||||
"org/gnome/shell/extensions/just-perfection" = {
|
||||
# activities-button = !cfg.tiling; # conflicts with unite?
|
||||
startup-status = 0;
|
||||
|
@ -28,10 +28,7 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
ezcolors.enable = lib.mkDefault true;
|
||||
ezcolors.plasma = lib.mkDefault true;
|
||||
ezfonts.enable = lib.mkDefault true;
|
||||
ezfonts.plasma = lib.mkDefault true;
|
||||
stylix.enable = lib.mkDefault true;
|
||||
|
||||
home.file."${config.home.homeDirectory}/.gtkrc-2.0".force = true;
|
||||
gtk.cursorTheme.name = "breeze_cursors";
|
||||
|
@ -7,11 +7,8 @@ inputs: {
|
||||
with lib; let
|
||||
cfg = config.ezpcusr;
|
||||
|
||||
# lockCommand = pkgs.writeScript "lock.sh" ''
|
||||
# ${pkgs.swaylock-effects}/bin/swaylock -f --clock --indicator --screenshots --effect-scale 0.8 --effect-blur 8x3 --effect-vignette 0.2:0.5 --fade-in 0.5 --text-color ${config.ezcolors.base16.base08} --inside-color ${config.ezcolors.base16.base00} --ring-color ${config.ezcolors.base16.base01} --datestr "%Y-%m-%e" --timestr "%I:%M %p"
|
||||
# '';
|
||||
lockCommand = pkgs.writeShellScript "lock.sh" ''
|
||||
exec ${pkgs.swaylock}/bin/swaylock -f --text-color ${config.ezcolors.base16.base08} --inside-color ${config.ezcolors.base16.base00} --ring-color ${config.ezcolors.base16.base01} -c ${config.ezcolors.base16.base00}
|
||||
exec ${pkgs.swaylock}/bin/swaylock -f
|
||||
'';
|
||||
in {
|
||||
options.ezpcusr = {
|
||||
@ -413,13 +410,13 @@ in {
|
||||
|
||||
style = ''
|
||||
window#waybar {
|
||||
background: #${config.ezcolors.base16.base01};
|
||||
color: #${config.ezcolors.base16.base06};
|
||||
background: @base01;
|
||||
color: @base06;
|
||||
}
|
||||
|
||||
#custom-spacer {
|
||||
font-size: 15px;
|
||||
color: #${config.ezcolors.base16.base00};
|
||||
color: @base00;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@ -440,9 +437,8 @@ in {
|
||||
#custom-weather-precip,
|
||||
#custom-weather-wind,
|
||||
#custom-media {
|
||||
color: #${config.ezcolors.base16.base06};
|
||||
font-size: ${toString (config.ezfonts.font.size + 1)}px;
|
||||
background: #${config.ezcolors.base16.base00};
|
||||
color: @base06;
|
||||
background: @base00;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
@ -459,31 +455,30 @@ in {
|
||||
#custom-weather-wind { padding: 0 0 5px 0; }
|
||||
|
||||
#custom-media.playing {
|
||||
color: #${config.ezcolors.base16.base0A};
|
||||
color: @base0A;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: #${config.ezcolors.base16.base0A};
|
||||
color: @base0A;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background: #${config.ezcolors.base16.base02};
|
||||
background: @base02;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #${config.ezcolors.base16.base0B};
|
||||
color: @base0B;
|
||||
}
|
||||
#memory {
|
||||
color: #${config.ezcolors.base16.base0C};
|
||||
color: @base0C;
|
||||
}
|
||||
#cpu {
|
||||
color: #${config.ezcolors.base16.base0D};
|
||||
color: @base0D;
|
||||
}
|
||||
#battery {
|
||||
color: #${config.ezcolors.base16.base0E};
|
||||
color: @base0E;
|
||||
}
|
||||
|
||||
* {
|
||||
font-family: "${config.ezfonts.font.name}";
|
||||
border-radius: 0;
|
||||
border-width: 0;
|
||||
border-style: none;
|
||||
@ -511,8 +506,7 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
ezcolors.enable = lib.mkDefault true;
|
||||
ezfonts.enable = lib.mkDefault true;
|
||||
stylix.enable = lib.mkDefault true;
|
||||
|
||||
services.blueman-applet.enable = lib.mkDefault cfg.bluetooth;
|
||||
|
||||
@ -609,8 +603,8 @@ in {
|
||||
filenamePattern = "%F_%T";
|
||||
savePath = "Media/Screenshots";
|
||||
saveAfterCopy = true;
|
||||
uiColor = "#${config.ezcolors.base16.base04}";
|
||||
contrastUiColor = "#${config.ezcolors.base16.base05}";
|
||||
#uiColor = "#${lib.stylix.colors.base04}";
|
||||
#contrastUiColor = "#${lib.stylix.colors.base05}";
|
||||
disabledGrimWarning = true;
|
||||
};
|
||||
};
|
||||
|
@ -1,92 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.ezfonts;
|
||||
in {
|
||||
options.ezfonts = {
|
||||
enable = mkEnableOption "Enable automatic fonts";
|
||||
|
||||
plasma = mkEnableOption "Enable automatic for plasma (using plasma-manager)";
|
||||
|
||||
font = mkOption {
|
||||
description = "Your favourite font";
|
||||
default = {};
|
||||
type = types.submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "Monoid Nerd Font Mono";
|
||||
description = "Name of your font";
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.nerd-fonts.monoid;
|
||||
description = "Package for your font";
|
||||
};
|
||||
size = mkOption {
|
||||
type = types.int;
|
||||
default = 10;
|
||||
description = "Size for your font";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.enable {
|
||||
fonts.fontconfig.enable = lib.mkDefault true;
|
||||
home.packages = [cfg.font.package];
|
||||
|
||||
programs.vscode.userSettings = {
|
||||
"editor.fontFamily" = "\"${cfg.font.name}\"";
|
||||
};
|
||||
|
||||
gtk.font = {
|
||||
package = cfg.font.package;
|
||||
name = "${cfg.font.name} ${toString cfg.font.size}";
|
||||
};
|
||||
|
||||
programs.kitty.settings = {
|
||||
font_family = cfg.font.name;
|
||||
font_size = cfg.font.size;
|
||||
};
|
||||
|
||||
programs.kermit.settings = {
|
||||
font = "${cfg.font.name}, normal ${toString cfg.font.size}";
|
||||
};
|
||||
|
||||
programs.foot.settings.main.font = "${cfg.font.name}:size=${toString cfg.font.size}";
|
||||
|
||||
programs.rofi.font = "${cfg.font.name} ${toString cfg.font.size}";
|
||||
|
||||
services.mako.font = "${cfg.font.name} ${toString cfg.font.size}";
|
||||
|
||||
wayland.windowManager.sway.config.fonts = {
|
||||
names = [cfg.font.name];
|
||||
size = cfg.font.size + 0.0;
|
||||
};
|
||||
xsession.windowManager.i3.config.fonts = [cfg.font.name];
|
||||
|
||||
programs.neovim.extraConfig = ''
|
||||
set guifont=${lib.replaceStrings [" "] ["\\ "] cfg.font.name}:h${toString (cfg.font.size + 0.5)}
|
||||
'';
|
||||
})
|
||||
(mkIf (cfg.enable && cfg.plasma) {
|
||||
programs.plasma.files = {
|
||||
kdeglobals.General = {
|
||||
fixed = "${cfg.font.name},${toString cfg.font.size},-1,5,50,0,0,0,0,0";
|
||||
font = "${cfg.font.name},${toString cfg.font.size},-1,5,50,0,0,0,0,0";
|
||||
menuFont = "${cfg.font.name},${toString cfg.font.size},-1,5,50,0,0,0,0,0";
|
||||
smallestReadableFont = "${cfg.font.name},${toString (cfg.font.size - 2)},-1,5,50,0,0,0,0,0";
|
||||
toolBarFont = "${cfg.font.name},${toString cfg.font.size},-1,5,50,0,0,0,0,0";
|
||||
};
|
||||
kdeglobals.WM.activeFont = "${cfg.font.name},${toString cfg.font.size},-1,5,50,0,0,0,0,0";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
@ -209,13 +209,14 @@ in {
|
||||
echo "https://p.gen2.space/uploads/$fileid.$extension"
|
||||
'';
|
||||
|
||||
ezfonts.font = {
|
||||
stylix.fonts = lib.genAttrs ["monospace" "sansSerif" "serif"] (_: {
|
||||
name = "AnonymicePro Nerd Font";
|
||||
package = pkgs.nerd-fonts.anonymice;
|
||||
size = 11;
|
||||
}) // {
|
||||
sizes = lib.genAttrs ["applications" "desktop" "popups" "terminal"] (_: 11);
|
||||
};
|
||||
|
||||
ezcolors.baseColors = {
|
||||
stylix.base16Scheme = {
|
||||
base00 = "0b1c2c";
|
||||
base01 = "223b54";
|
||||
base02 = "405c79";
|
||||
|
@ -45,8 +45,6 @@ in {
|
||||
|
||||
fxlinuxprint
|
||||
|
||||
canon-cups-ufr2
|
||||
|
||||
cups-brother-hl1110
|
||||
cups-brother-hl1210w
|
||||
cups-brother-hl3140cw
|
||||
|
Loading…
Reference in New Issue
Block a user