Use base16 themes, custom base16 theme

This commit is contained in:
Alexander Bantyev 2021-06-10 18:58:51 +03:00
parent 44675f51d5
commit 2699110467
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
19 changed files with 345 additions and 305 deletions

View File

@ -3,11 +3,11 @@
"NUR": { "NUR": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1593719873, "lastModified": 1623311631,
"narHash": "sha256-AK0s3BOp7qO/d1vGL6Lh7hLjbqv3Zjo9KIr61UjBD78=", "narHash": "sha256-3lzdbWWoSE8zbNKvB2yOY1AAtLL/nIWcD94uRCwATvU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "8654e8b452aee888d4cc67c649b70ddf1f50ea5e", "rev": "97b0f023d370295a84c644be037b49bcf9c63c85",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -16,19 +16,19 @@
"type": "github" "type": "github"
} }
}, },
"base16-unclaimed-schemes": { "base16-black-metal-scheme": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1527170198, "lastModified": 1585330710,
"narHash": "sha256-YV2tgexpyeLqm6d8WaBwT9QPAHT/gxhiFpxQq03xdhA=", "narHash": "sha256-ctsMdfUpqVZfqtg4paYg4oCataRHoapxSiYRsi0lwhI=",
"owner": "chriskempson", "owner": "metalelf0",
"repo": "base16-unclaimed-schemes", "repo": "base16-black-metal-scheme",
"rev": "d6b93456dc1012628faec572387814f59e0b854a", "rev": "c7a32bec8105a1ceddb9fcc90b713dabde5e7e5e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "chriskempson", "owner": "metalelf0",
"repo": "base16-unclaimed-schemes", "repo": "base16-black-metal-scheme",
"type": "github" "type": "github"
} }
}, },
@ -376,11 +376,11 @@
"nixpkgs-old": { "nixpkgs-old": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1592518222, "lastModified": 1600952148,
"narHash": "sha256-dkWpvJM3y7vXNu2FFrj4XHE3GoX0h+pIyc4gLQpQsmQ=", "narHash": "sha256-GUKHrnng33luc6mUT3rDnZ3Hm+4MMEJpEchRIAQx7JQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "289466dd6a11c65a7de4a954d6ebf66c1ad07652", "rev": "75f4ba05c63be3f147bcc2f7bd4ba1f029cedcb1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -531,7 +531,7 @@
"root": { "root": {
"inputs": { "inputs": {
"NUR": "NUR", "NUR": "NUR",
"base16-unclaimed-schemes": "base16-unclaimed-schemes", "base16-black-metal-scheme": "base16-black-metal-scheme",
"crdt": "crdt", "crdt": "crdt",
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"emacs-overlay": "emacs-overlay", "emacs-overlay": "emacs-overlay",
@ -546,6 +546,7 @@
"nixpkgs": "nixpkgs_7", "nixpkgs": "nixpkgs_7",
"nixpkgs-old": "nixpkgs-old", "nixpkgs-old": "nixpkgs-old",
"nixpkgs-wayland": "nixpkgs-wayland", "nixpkgs-wayland": "nixpkgs-wayland",
"rycee": "rycee",
"simple-nixos-mailserver": "simple-nixos-mailserver", "simple-nixos-mailserver": "simple-nixos-mailserver",
"simple-osd-daemons": "simple-osd-daemons", "simple-osd-daemons": "simple-osd-daemons",
"sonoff-lan": "sonoff-lan", "sonoff-lan": "sonoff-lan",
@ -571,6 +572,22 @@
"type": "github" "type": "github"
} }
}, },
"rycee": {
"flake": false,
"locked": {
"lastModified": 1623298028,
"narHash": "sha256-ewN6rXEIiwysCZ6EN469Kdj3kuq/cEbEJOK0ZVWqK84=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "32bbce160cc8472102cf618d47f353781b903865",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
}
},
"simple-nixos-mailserver": { "simple-nixos-mailserver": {
"flake": false, "flake": false,
"locked": { "locked": {

View File

@ -14,8 +14,8 @@
url = "github:nix-community/NUR"; url = "github:nix-community/NUR";
flake = false; flake = false;
}; };
base16-unclaimed-schemes = { base16-black-metal-scheme = {
url = "github:chriskempson/base16-unclaimed-schemes"; url = "github:metalelf0/base16-black-metal-scheme";
flake = false; flake = false;
}; };
home-manager.url = "github:rycee/home-manager"; home-manager.url = "github:rycee/home-manager";
@ -53,6 +53,11 @@
}; };
himalaya.url = "github:soywod/himalaya"; himalaya.url = "github:soywod/himalaya";
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
rycee = {
url = "gitlab:rycee/nur-expressions";
flake = false;
};
}; };
outputs = { nixpkgs, nix, self, deploy-rs, ... }@inputs: { outputs = { nixpkgs, nix, self, deploy-rs, ... }@inputs: {

View File

@ -1,13 +1,12 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let thm = config.themes.colors; {
in {
home-manager.users.balsoft.programs.alacritty = { home-manager.users.balsoft.programs.alacritty = {
enable = true; enable = true;
settings = { settings = {
font = rec { font = rec {
normal.family = "IBM Plex Mono"; normal.family = config.themes.fonts.mono.family;
size = 11; size = config.themes.fonts.mono.size;
bold = { style = "Bold"; }; bold = { style = "Bold"; };
}; };
@ -20,20 +19,23 @@ in {
cursor.style = "Beam"; cursor.style = "Beam";
colors = { colors = with pkgs.my-lib.thmHash; {
primary = { primary = {
background = thm.bg; background = base00;
foreground = thm.fg; foreground = base05;
}; };
cursor = { cursor = {
text = thm.alt; text = base02;
cursor = thm.fg; cursor = base00;
}; };
normal = { normal = {
black = thm.bg; black = base00;
inherit (thm) red green yellow blue cyan; red = base08;
magenta = thm.purple; green = base0B;
white = thm.fg; yellow = base0A;
blue = base0D;
magenta = base0E;
white = base07;
}; };
}; };
}; };

View File

@ -15,7 +15,8 @@ in {
# directory = "emacs"; # directory = "emacs";
# }; # };
persist.state.homeFiles = [ ".config/emacs/custom" ".config/emacs/eshell/history" ]; persist.state.homeFiles =
[ ".config/emacs/custom" ".config/emacs/eshell/history" ];
home-manager.users.balsoft = { home-manager.users.balsoft = {
programs.emacs = { programs.emacs = {
@ -70,6 +71,7 @@ in {
dap-mode dap-mode
forge forge
crdt crdt
base16-theme
]; ];
}; };
@ -80,6 +82,9 @@ in {
systemd.user.services.emacs.Service.Environment = systemd.user.services.emacs.Service.Environment =
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/balsoft/bin"; "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/balsoft/bin";
xdg.configFile."emacs/init.el".source = ./init.el; xdg.configFile."emacs/init.el".source = pkgs.substituteAll ({
src = ./init.el;
font = with config.themes.fonts; "${mono.family} ${toString mono.size}";
} // pkgs.my-lib.thmHash);
}; };
} }

View File

@ -61,6 +61,7 @@
(tool-bar-mode -1) (tool-bar-mode -1)
(cua-selection-mode 1) (cua-selection-mode 1)
(setq auto-revert-check-vc-info t) (setq auto-revert-check-vc-info t)
(vc-mode-line t) (vc-mode-line t)
@ -186,8 +187,8 @@
;; (load-theme 'xresources t) ;; (load-theme 'xresources t)
;; (set-frame-font "IBM Plex Mono 11" nil t))))) ;; (set-frame-font "IBM Plex Mono 11" nil t)))))
(add-to-list 'default-frame-alist '(font . "IBM Plex Mono 11")) (add-to-list 'default-frame-alist '(font . "@font@"))
(set-face-attribute 'default nil :font "IBM Plex Mono 11") (set-face-attribute 'default nil :font "@font@")
(setq inhibit-startup-screen t) (setq inhibit-startup-screen t)
@ -215,5 +216,35 @@
(use-package treemacs-projectile) (use-package treemacs-projectile)
(load-theme 'manoj-dark t) (require 'base16-theme)
(defvar base16-generated-colors
'(:base00 "@base00@"
:base01 "@base01@"
:base02 "@base02@"
:base03 "@base03@"
:base04 "@base04@"
:base05 "@base05@"
:base06 "@base06@"
:base07 "@base07@"
:base08 "@base08@"
:base09 "@base09@"
:base0A "@base0A@"
:base0B "@base0B@"
:base0C "@base0C@"
:base0D "@base0D@"
:base0E "@base0E@"
:base0F "@base0F@")
"All colors for Base16 are defined here.")
;; Define the theme
(deftheme base16-generated)
;; Add all the faces to the theme
(base16-theme-define 'base16-generated base16-generated-colors)
;; Mark the theme as provided
(provide-theme 'base16-generated)
(enable-theme 'base16-generated)
;;; init.el ends here ;;; init.el ends here

View File

@ -1,5 +1,7 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let thm = config.themes.colors; let
thm = pkgs.my-lib.thmHash;
fonts = config.themes.fonts;
in { in {
environment.sessionVariables = { environment.sessionVariables = {
MOZ_USE_XINPUT2 = "1"; MOZ_USE_XINPUT2 = "1";
@ -24,10 +26,10 @@ in {
visibility: collapse; visibility: collapse;
} }
toolbar#nav-bar, nav-bar-customization-target { toolbar#nav-bar, nav-bar-customization-target {
background: ${thm.bg} !important; background: ${thm.base00} !important;
} }
@-moz-document url("about:newtab") { @-moz-document url("about:newtab") {
* { background-color: ${thm.bg} !important; } * { background-color: ${thm.base00} !important; }
} }
''; '';
settings = { settings = {
@ -45,15 +47,15 @@ in {
"xpinstall.signatures.required" = false; "xpinstall.signatures.required" = false;
"extensions.update.enabled" = false; "extensions.update.enabled" = false;
"font.name.monospace.x-western" = "IBM Plex Mono"; "font.name.monospace.x-western" = "${fonts.mono.family}";
"font.name.sans-serif.x-western" = "IBM Plex Sans"; "font.name.sans-serif.x-western" = "${fonts.main.family}";
"font.name.serif.x-western" = "IBM Plex Serif"; "font.name.serif.x-western" = "${fonts.serif.family}";
"browser.display.background_color" = thm.bg; "browser.display.background_color" = thm.base00;
"browser.display.foreground_color" = thm.fg; "browser.display.foreground_color" = thm.base05;
"browser.display.document_color_use" = 2; "browser.display.document_color_use" = 2;
"browser.anchor_color" = thm.fg; "browser.anchor_color" = thm.base0D;
"browser.visited_color" = thm.blue; "browser.visited_color" = thm.base0C;
"browser.display.use_document_fonts" = true; "browser.display.use_document_fonts" = true;
"pdfjs.disabled" = true; "pdfjs.disabled" = true;
"media.videocontrols.picture-in-picture.enabled" = true; "media.videocontrols.picture-in-picture.enabled" = true;
@ -65,7 +67,6 @@ in {
}; };
}; };
extensions = with pkgs.nur.rycee.firefox-addons; [ extensions = with pkgs.nur.rycee.firefox-addons; [
torswitch
adsum-notabs adsum-notabs
ublock-origin ublock-origin
browserpass browserpass

View File

@ -60,12 +60,12 @@ in {
home-manager.users.balsoft = { home-manager.users.balsoft = {
xdg.configFile."geary/user-style.css".text = '' xdg.configFile."geary/user-style.css".text = ''
*, html, body, body.plain div, body.plain a, body.plain p, body.plain span { *, html, body, body.plain div, body.plain a, body.plain p, body.plain span {
background: ${config.themes.colors.bg} !important; background: ${pkgs.my-lib.thmHash.base00} !important;
color: ${config.themes.colors.fg} !important; color: ${pkgs.my-lib.thmHash.base05} !important;
font-family: 'IBM Plex Mono', monospace !important; font-family: '${config.themes.fonts.mono.family}', monospace !important;
} }
*, html, body { *, html, body {
font-size: 16px; font-size: ${toString config.themes.fonts.mono.size}pt;
} }
''; '';
home.activation.geary = '' home.activation.geary = ''

View File

@ -2,17 +2,17 @@
with import ../../support.nix { inherit lib config; }; { with import ../../support.nix { inherit lib config; }; {
home-manager.users.balsoft.xdg.configFile."okularpartrc".text = genIni { home-manager.users.balsoft.xdg.configFile."okularpartrc".text = genIni {
"Dlg Accessibility" = { "Dlg Accessibility" = {
RecolorBackground = thmDec.bg; RecolorBackground = thmDec.base00;
RecolorForeground = thmDec.fg; RecolorForeground = thmDec.base05;
}; };
"Document" = { "Document" = {
ChangeColors = true; ChangeColors = true;
PaperColor = thmDec.bg; PaperColor = thmDec.base00;
RenderMode = "Recolor"; RenderMode = "Recolor";
}; };
"Main View" = { ShowLeftPanel = false; }; "Main View" = { ShowLeftPanel = false; };
PageView = { PageView = {
BackgroundColor = thmDec.bg; BackgroundColor = thmDec.base00;
UseCustomBackgroundColor = true; UseCustomBackgroundColor = true;
}; };
}; };

View File

@ -30,7 +30,7 @@
gnumeric gnumeric
gcalcli gcalcli
xdg_utils xdg_utils
# inputs.yt-utilities.defaultPackage.x86_64-linux inputs.yt-utilities.defaultPackage.x86_64-linux
lambda-launcher lambda-launcher
nix-patch nix-patch
pass-wayland pass-wayland

View File

@ -3,7 +3,7 @@ builtins.listToAttrs (builtins.map (path: {
b = builtins.baseNameOf path; b = builtins.baseNameOf path;
m = builtins.match "(.*)\\.nix" b; m = builtins.match "(.*)\\.nix" b;
in if isNull m then [ b ] else m); in if isNull m then [ b ] else m);
value = import path; value = path;
}) [ }) [
./applications.nix ./applications.nix
./applications/alacritty.nix ./applications/alacritty.nix

View File

@ -41,7 +41,7 @@ in {
thm = config.themes.colors; thm = config.themes.colors;
splitHex = hexStr: splitHex = hexStr:
map (x: builtins.elemAt x 0) (builtins.filter (a: a != "" && a != [ ]) map (x: builtins.elemAt x 0) (builtins.filter (a: a != "" && a != [ ])
(builtins.split "(.{2})" (builtins.substring 1 6 hexStr))); (builtins.split "(.{2})" hexStr));
hex2decDigits = rec { hex2decDigits = rec {
"0" = 0; "0" = 0;
"1" = 1; "1" = 1;
@ -71,6 +71,7 @@ in {
16 * hex2decDigits."${builtins.substring 0 1 hex}" 16 * hex2decDigits."${builtins.substring 0 1 hex}"
+ hex2decDigits."${builtins.substring 1 2 hex}"; + hex2decDigits."${builtins.substring 1 2 hex}";
thmDec = builtins.mapAttrs (name: color: colorHex2Dec color) thm; thmDec = builtins.mapAttrs (name: color: colorHex2Dec color) thm;
thmHash = builtins.mapAttrs (name: color: "#${color}") thm;
colorHex2Dec = color: colorHex2Dec = color:
builtins.concatStringsSep "," builtins.concatStringsSep ","
(map (x: toString (doubleDigitHexToDec x)) (splitHex color)); (map (x: toString (doubleDigitHexToDec x)) (splitHex color));
@ -88,8 +89,6 @@ in {
simple-osd = inputs.simple-osd-daemons.packages.x86_64-linux; simple-osd = inputs.simple-osd-daemons.packages.x86_64-linux;
inherit old;
yt-utilities = inputs.yt-utilities.defaultPackage.x86_64-linux; yt-utilities = inputs.yt-utilities.defaultPackage.x86_64-linux;
nerdfonts = nur.balsoft.pkgs.roboto-mono-nerd; nerdfonts = nur.balsoft.pkgs.roboto-mono-nerd;

View File

@ -1,30 +1,14 @@
{ config, lib, pkgs, inputs, ... }: { config, lib, pkgs, inputs, ... }:
with lib; with lib;
let let
colorType = types.str; colorType =
color = (name: types.addCheck types.str (x: !isNull (builtins.match "[0-9a-fA-F]{6}" x));
(mkOption { color = mkOption { type = colorType; };
description = "${name} color of palette";
type = colorType;
}));
fromBase16 = { base00, base01, base02, base03, base04, base05, base06, base07
, base08, base09, base0A, base0B, base0C, base0D, base0E, base0F, ... }:
builtins.mapAttrs (_: v: "#" + v) {
bg = base00;
fg = base07;
gray = base03; font = {
alt = base02; family = mkOption { type = types.str; };
dark = base01; size = mkOption { type = types.int; };
};
red = base08;
orange = base09;
yellow = base0A;
green = base0B;
cyan = base0C;
blue = base0D;
purple = base0E;
};
fromYAML = yaml: fromYAML = yaml:
builtins.fromJSON (builtins.readFile (pkgs.stdenv.mkDerivation { builtins.fromJSON (builtins.readFile (pkgs.stdenv.mkDerivation {
@ -35,41 +19,55 @@ let
in { in {
options = { options = {
themes = { themes = {
colors = mkOption { colors = builtins.listToAttrs (map (name: {
description = inherit name;
"Set of colors from which the themes for various applications will be generated"; value = color;
type = with types; }) [
submodule { "base00"
options = { "base01"
bg = color "background"; "base02"
fg = color "foreground"; "base03"
gray = color "gray"; "base04"
"base05"
alt = color "alternative"; "base06"
dark = color "darker"; "base07"
"base08"
blue = color "blue"; "base09"
green = color "green"; "base0A"
red = color "red"; "base0B"
orange = color "orange"; "base0C"
yellow = color "yellow"; "base0D"
cyan = color "cyan"; "base0E"
purple = color "purple"; "base0F"
}; ]);
}; fonts = {
main = font;
serif = font;
mono = font;
}; };
}; };
}; };
config = { config = {
themes.colors = (fromBase16 (fromYAML themes.colors = {
(builtins.readFile "${inputs.base16-unclaimed-schemes}/irblack.yaml"))) # H = 0, S = 0%
// { base00 = "000000"; # L = 0%
alt = "#001d6c"; base01 = "333333"; # L = 20%
base02 = "666666"; # L = 40%
red = "#da1e28"; base03 = "999999"; # L = 60%
green = "#24a148"; base04 = "cccccc"; # L = 80%
orange = "#ff832b"; base05 = "ffffff"; # L = 100%
yellow = "#f1c21b"; base06 = "e6e6e6"; # L = 90%
}; base07 = "e6e6e6"; # L = 90%
# L = 50%, S = 50%
base08 = "bf4040"; # H = 0 RED
base09 = "bf8040"; # H = 30 ORANGE
base0A = "bfbf40"; # H = 60 YELLOW-ish
base0B = "80bf40"; # H = 90 GREEN
# Whoa, a lot of hues are green!
base0C = "40bfbf"; # H = 180 TEAL
base0D = "407fbf"; # H = 210 BLUE
base0E = "7f40bf"; # H = 270 PURPLE
base0F = "bf40bf"; # H = 300 MAGENTA
};
}; };
} }

View File

@ -1,5 +1,4 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }: {
{
fonts = { fonts = {
fonts = with pkgs; [ fonts = with pkgs; [
ibm-plex ibm-plex
@ -8,14 +7,29 @@
material-design-icons material-design-icons
material-icons material-icons
]; ];
fontconfig = { fontconfig = let fonts = config.themes.fonts;
in {
enable = lib.mkForce true; enable = lib.mkForce true;
defaultFonts = { defaultFonts = {
monospace = [ "IBM Plex Mono 13" ]; monospace = [ "${fonts.mono.family} ${toString fonts.mono.size}" ];
sansSerif = [ "IBM Plex Sans 13" ]; sansSerif = [ "${fonts.main.family} ${toString fonts.main.size}" ];
serif = [ "IBM Plex Serif 13" ]; serif = [ "${fonts.serif.family} ${toString fonts.serif.size}" ];
}; };
}; };
enableDefaultFonts = true; enableDefaultFonts = true;
}; };
themes.fonts = {
main = {
family = "IBM Plex Sans";
size = 13;
};
serif = {
family = "IBM Plex Serif";
size = 13;
};
mono = {
family = "IBM Plex Mono";
size = 13;
};
};
} }

View File

@ -1,56 +1,21 @@
{ pkgs, config, lib, inputs, ... }: { pkgs, config, lib, inputs, ... }:
let let
thm = config.themes.colors; thm = config.themes.colors;
thm' = builtins.mapAttrs (name: value: builtins.substring 1 7 value) thm; thm' = builtins.mapAttrs (name: value: { hex.rgb = value; }) thm;
materia_colors = pkgs.writeTextFile {
name = "gtk-generated-colors";
text = ''
BG=${thm'.bg}
FG=${thm'.fg}
BTN_BG=${thm'.bg}
BTN_FG=${thm'.fg}
MENU_BG=${thm'.bg}
MENU_FG=${thm'.fg}
ACCENT_BG=${thm'.alt}
SEL_BG=${thm'.blue}
SEL_FG=${thm'.bg}
TXT_BG=${thm'.bg}
TXT_FG=${thm'.fg}
HDR_BTN_BG=${thm'.bg}
HDR_BTN_FG=${thm'.fg}
WM_BORDER_FOCUS=${thm'.alt}
WM_BORDER_UNFOCUS=${thm'.dark}
MATERIA_STYLE_COMPACT=True
MATERIA_COLOR_VARIANT=dark
UNITY_DEFAULT_LAUNCHER_STYLE=False
NAME=generated
'';
};
in { in {
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (self: super: {
rendersvg = self.runCommandNoCC "rendersvg" {} '' generated-gtk-theme =
mkdir -p $out/bin pkgs.callPackage "${inputs.rycee}/pkgs/materia-theme" {
ln -s ${self.resvg}/bin/resvg $out/bin/rendersvg configBase16 = {
''; name = "Generated";
generated-gtk-theme = self.stdenv.mkDerivation rec { kind = "dark";
name = "generated-gtk-theme"; colors = thm' // {
src = inputs.materia-theme; base01 = thm'.base00;
buildInputs = with self; [ sassc bc which rendersvg meson ninja nodePackages.sass gtk4.dev optipng ]; base02 = thm'.base00;
MATERIA_COLORS = materia_colors; };
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
echo "Changing colours:"
./change_color.sh -o Generated "$MATERIA_COLORS" -i False -t "$out/share/themes"
chmod 555 -R .
'';
};
}) })
]; ];
programs.dconf.enable = true; programs.dconf.enable = true;
@ -66,7 +31,9 @@ in {
name = "Generated"; name = "Generated";
package = pkgs.generated-gtk-theme; package = pkgs.generated-gtk-theme;
}; };
font = { name = "IBM Plex 12"; }; font = {
name = with config.themes.fonts; "${main.family} ${toString main.size}";
};
gtk3 = { gtk3 = {
bookmarks = [ bookmarks = [
"file:///home/balsoft/projects Projects" "file:///home/balsoft/projects Projects"

View File

@ -1,5 +1,5 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }:
with lib; with lib; with pkgs.my-lib;
let scripts = import ./scripts pkgs config; let scripts = import ./scripts pkgs config;
in { in {
secrets.wage = { secrets.wage = {
@ -19,24 +19,24 @@ in {
trayOutput = "primary"; trayOutput = "primary";
command = "true"; command = "true";
colors = let colors = let
thm = config.themes.colors; thm = pkgs.my-lib.thmHash;
default = { default = {
background = thm.bg; background = thm.base00;
border = thm.bg; border = thm.base00;
}; };
in { in {
background = thm.bg; background = thm.base00;
statusline = thm.fg; statusline = thm.base05;
separator = thm.alt; separator = thm.base02;
focusedWorkspace = default // { text = thm.red; }; focusedWorkspace = default // { text = thm.base08; };
activeWorkspace = default // { text = thm.green; }; activeWorkspace = default // { text = thm.base0B; };
inactiveWorkspace = default // { text = thm.fg; }; inactiveWorkspace = default // { text = thm.base05; };
urgentWorkspace = default // { text = thm.orange; }; urgentWorkspace = default // { text = thm.base09; };
bindingMode = default // { text = thm.yellow; }; bindingMode = default // { text = thm.base0A; };
}; };
statusCommand = "${pkgs.i3blocks}/bin/i3blocks"; statusCommand = "${pkgs.i3blocks}/bin/i3blocks";
fonts = { fonts = {
names = [ "IBM Plex Sans" "Material Icons" "Roboto Mono" ]; names = [ "${config.themes.fonts.main.family}" "Material Icons" "Roboto Mono" ];
style = "Regular"; style = "Regular";
size = 12.0; size = 12.0;
}; };

View File

@ -1,6 +1,5 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
with pkgs.my-lib; with pkgs.my-lib; {
{
xdg.portal.enable = true; xdg.portal.enable = true;
services.dbus.packages = services.dbus.packages =
[ pkgs.firefox pkgs.systemd pkgs.papirus-icon-theme ]; [ pkgs.firefox pkgs.systemd pkgs.papirus-icon-theme ];
@ -17,103 +16,105 @@ with pkgs.my-lib;
KDEDIRS = KDEDIRS =
"/run/current-system/sw:/run/current-system/sw/share/kservices5:/run/current-system/sw/share/kservicetypes5:/run/current-system/sw/share/kxmlgui5"; "/run/current-system/sw:/run/current-system/sw/share/kservices5:/run/current-system/sw/share/kservicetypes5:/run/current-system/sw/share/kxmlgui5";
}; };
home-manager.users.balsoft = { home-manager.users.balsoft = let fonts = config.themes.fonts;
in {
services.kdeconnect.enable = true; services.kdeconnect.enable = true;
xdg.configFile."kdeglobals".text = genIni { xdg.configFile."kdeglobals".text = with thmDec; genIni {
"Colors:Button" = { "Colors:Button" = {
BackgroundAlternate = thmDec.dark; BackgroundAlternate = base01;
BackgroundNormal = thmDec.bg; BackgroundNormal = base00;
DecorationFocus = thmDec.alt; DecorationFocus = base02;
DecorationHover = thmDec.alt; DecorationHover = base02;
ForegroundActive = thmDec.alt; ForegroundActive = base02;
ForegroundInactive = thmDec.dark; ForegroundInactive = base01;
ForegroundLink = thmDec.blue; ForegroundLink = base0D;
ForegroundNegative = thmDec.red; ForegroundNegative = base08;
ForegroundNeutral = thmDec.orange; ForegroundNeutral = base09;
ForegroundNormal = thmDec.fg; ForegroundNormal = base05;
ForegroundPositive = thmDec.green; ForegroundPositive = base0B;
ForegroundVisited = thmDec.gray; ForegroundVisited = base03;
}; };
"Colors:Complementary" = { "Colors:Complementary" = {
BackgroundAlternate = thmDec.dark; BackgroundAlternate = base01;
BackgroundNormal = thmDec.bg; BackgroundNormal = base00;
DecorationFocus = thmDec.alt; DecorationFocus = base02;
DecorationHover = thmDec.alt; DecorationHover = base02;
ForegroundActive = thmDec.orange; ForegroundActive = base09;
ForegroundInactive = thmDec.dark; ForegroundInactive = base01;
ForegroundLink = thmDec.blue; ForegroundLink = base0D;
ForegroundNegative = thmDec.red; ForegroundNegative = base08;
ForegroundNeutral = thmDec.yellow; ForegroundNeutral = base0A;
ForegroundNormal = thmDec.fg; ForegroundNormal = base05;
ForegroundPositive = thmDec.green; ForegroundPositive = base0B;
ForegroundVisited = thmDec.alt; ForegroundVisited = base02;
}; };
"Colors:Selection" = { "Colors:Selection" = {
BackgroundAlternate = thmDec.alt; BackgroundAlternate = base0D;
BackgroundNormal = thmDec.alt; BackgroundNormal = base0D;
DecorationFocus = thmDec.alt; DecorationFocus = base0D;
DecorationHover = thmDec.alt; DecorationHover = base0D;
ForegroundActive = thmDec.fg; ForegroundActive = base05;
ForegroundInactive = thmDec.fg; ForegroundInactive = base05;
ForegroundLink = thmDec.blue; ForegroundLink = base0D;
ForegroundNegative = thmDec.red; ForegroundNegative = base08;
ForegroundNeutral = thmDec.orange; ForegroundNeutral = base09;
ForegroundNormal = thmDec.fg; ForegroundNormal = base05;
ForegroundPositive = thmDec.green; ForegroundPositive = base0B;
ForegroundVisited = thmDec.alt; ForegroundVisited = base02;
}; };
"Colors:Tooltip" = { "Colors:Tooltip" = {
BackgroundAlternate = thmDec.dark; BackgroundAlternate = base01;
BackgroundNormal = thmDec.bg; BackgroundNormal = base00;
DecorationFocus = thmDec.alt; DecorationFocus = base02;
DecorationHover = thmDec.alt; DecorationHover = base02;
ForegroundActive = thmDec.alt; ForegroundActive = base02;
ForegroundInactive = thmDec.dark; ForegroundInactive = base01;
ForegroundLink = thmDec.blue; ForegroundLink = base0D;
ForegroundNegative = thmDec.red; ForegroundNegative = base08;
ForegroundNeutral = thmDec.orange; ForegroundNeutral = base09;
ForegroundNormal = thmDec.fg; ForegroundNormal = base05;
ForegroundPositive = thmDec.green; ForegroundPositive = base0B;
ForegroundVisited = thmDec.gray; ForegroundVisited = base03;
}; };
"Colors:View" = { "Colors:View" = {
BackgroundAlternate = thmDec.dark; BackgroundAlternate = base01;
BackgroundNormal = thmDec.bg; BackgroundNormal = base00;
DecorationFocus = thmDec.alt; DecorationFocus = base02;
DecorationHover = thmDec.alt; DecorationHover = base02;
ForegroundActive = thmDec.alt; ForegroundActive = base02;
ForegroundInactive = thmDec.dark; ForegroundInactive = base01;
ForegroundLink = thmDec.blue; ForegroundLink = base0D;
ForegroundNegative = thmDec.red; ForegroundNegative = base08;
ForegroundNeutral = thmDec.orange; ForegroundNeutral = base09;
ForegroundNormal = thmDec.fg; ForegroundNormal = base05;
ForegroundPositive = thmDec.green; ForegroundPositive = base0B;
ForegroundVisited = thmDec.gray; ForegroundVisited = base03;
}; };
"Colors:Window" = { "Colors:Window" = {
BackgroundAlternate = thmDec.dark; BackgroundAlternate = base01;
BackgroundNormal = thmDec.bg; BackgroundNormal = base00;
DecorationFocus = thmDec.alt; DecorationFocus = base02;
DecorationHover = thmDec.alt; DecorationHover = base02;
ForegroundActive = thmDec.alt; ForegroundActive = base02;
ForegroundInactive = thmDec.dark; ForegroundInactive = base01;
ForegroundLink = thmDec.blue; ForegroundLink = base0D;
ForegroundNegative = thmDec.red; ForegroundNegative = base08;
ForegroundNeutral = thmDec.orange; ForegroundNeutral = base09;
ForegroundNormal = thmDec.fg; ForegroundNormal = base05;
ForegroundPositive = thmDec.green; ForegroundPositive = base0B;
ForegroundVisited = thmDec.gray; ForegroundVisited = base03;
}; };
General = { General = {
ColorScheme = "Generated"; ColorScheme = "Generated";
Name = "Generated"; Name = "Generated";
fixed = "IBM Plex Mono,11,-1,5,50,0,0,0,0,0"; fixed = "${fonts.mono.family},${toString fonts.mono.size},-1,5,50,0,0,0,0,0";
font = "IBM Plex,11,-1,5,50,0,0,0,0,0"; font = "${fonts.main.family},${toString fonts.main.size},-1,5,50,0,0,0,0,0";
menuFont = "IBM Plex,11,-1,5,50,0,0,0,0,0"; menuFont = "${fonts.main.family},${toString fonts.main.size},-1,5,50,0,0,0,0,0";
shadeSortColumn = true; shadeSortColumn = true;
smallestReadableFont = "IBM Plex,8,-1,5,57,0,0,0,0,0,Medium"; smallestReadableFont =
toolBarFont = "IBM Plex,11,-1,5,50,0,0,0,0,0"; "${fonts.main.family},${toString fonts.main.size},-1,5,57,0,0,0,0,0,Medium";
toolBarFont = "${fonts.main.family},${toString fonts.main.size},-1,5,50,0,0,0,0,0";
}; };
KDE = { KDE = {
DoubleClickInterval = 400; DoubleClickInterval = 400;

View File

@ -1,18 +1,18 @@
{ pkgs, config, ... }: { { pkgs, config, ... }: {
home-manager.users.balsoft = { home-manager.users.balsoft = {
wayland.windowManager.sway.config.startup = [{ command = "mako"; }]; wayland.windowManager.sway.config.startup = [{ command = "mako"; }];
programs.mako = { programs.mako = with pkgs.my-lib.thmHash; {
enable = true; enable = true;
layer = "overlay"; layer = "overlay";
font = "IBM Plex 13"; font = with config.themes.fonts; "${main.family} ${toString main.size}";
width = 500; width = 500;
height = 80; height = 80;
defaultTimeout = 10000; defaultTimeout = 10000;
maxVisible = 10; maxVisible = 10;
backgroundColor = "${config.themes.colors.bg}AA"; backgroundColor = "${base00}AA";
textColor = config.themes.colors.fg; textColor = base05;
borderColor = "${config.themes.colors.blue}AA"; borderColor = "${base0D}AA";
progressColor = "over ${config.themes.colors.green}"; progressColor = "over ${base0B}";
iconPath = "${pkgs.papirus-icon-theme}/share/icons/Papirus-Dark"; iconPath = "${pkgs.papirus-icon-theme}/share/icons/Papirus-Dark";
maxIconSize = 24; maxIconSize = 24;
}; };

View File

@ -1,6 +1,6 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let let
thm = config.themes.colors; thm = pkgs.my-lib.thmHash;
apps = config.defaultApplications; apps = config.defaultApplications;
lock_fork = lock_fork =
pkgs.writeShellScript "lock_fork" "sudo /run/current-system/sw/bin/lock &"; pkgs.writeShellScript "lock_fork" "sudo /run/current-system/sw/bin/lock &";
@ -39,31 +39,31 @@ in {
"" = [{ app_id = "cantata"; }]; "" = [{ app_id = "cantata"; }];
}; };
fonts = { fonts = {
names = [ "IBM Plex" ]; names = [ config.themes.fonts.main.family ];
style = "Regular"; style = "Regular";
size = 9.0; size = 9.0;
}; };
colors = rec { colors = rec {
background = thm.bg; background = thm.base00;
unfocused = { unfocused = {
text = thm.dark; text = thm.base02;
border = thm.dark; border = thm.base01;
background = thm.bg; background = thm.base00;
childBorder = thm.dark; childBorder = thm.base01;
indicator = thm.fg; indicator = thm.base07;
}; };
focusedInactive = unfocused; focusedInactive = unfocused;
urgent = unfocused // { urgent = unfocused // {
text = thm.fg; text = thm.base05;
border = thm.orange; border = thm.base09;
childBorder = thm.orange; childBorder = thm.base09;
}; };
focused = unfocused // { focused = unfocused // {
childBorder = thm.gray; childBorder = thm.base03;
border = thm.gray; border = thm.base03;
background = thm.dark; background = thm.base01;
text = thm.fg; text = thm.base05;
}; };
}; };
gaps = { gaps = {
@ -227,7 +227,7 @@ in {
}; };
}; };
output = { output = {
"*".bg = "${thm.bg} solid_color"; "*".bg = "${thm.base00} solid_color";
} // lib.optionalAttrs (config.device == "AMD-Workstation") { } // lib.optionalAttrs (config.device == "AMD-Workstation") {
DP-1.position = "0 400"; DP-1.position = "0 400";
HDMI-A-1 = { HDMI-A-1 = {

View File

@ -1,27 +1,27 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home-manager.users.balsoft = { home-manager.users.balsoft = {
xresources.properties = with config.themes.colors; { xresources.properties = with pkgs.my-lib.thmHash; {
"*background" = bg; "*background" = base00;
"*foreground" = fg; "*foreground" = base07;
"*color0" = dark; "*color0" = base00;
"*color1" = orange; "*color1" = base08;
"*color2" = green; "*color2" = base0B;
"*color3" = yellow; "*color3" = base0A;
"*color4" = blue; "*color4" = base0D;
"*color5" = purple; "*color5" = base0E;
"*color6" = cyan; "*color6" = base0C;
"*color7" = fg; "*color7" = base07;
"*color8" = dark; "*color8" = base03;
"*color9" = orange; "*color9" = base09;
"*color10" = green; "*color10" = base01;
"*color11" = yellow; "*color11" = base02;
"*color12" = blue; "*color12" = base04;
"*color13" = purple; "*color13" = base07;
"*color14" = cyan; "*color14" = base0F;
"*color15" = fg; "*color15" = base07;
"emacs.font" = "IBM Plex Mono 10"; "emacs.font" = "${config.themes.fonts.mono.family} ${toString config.themes.fonts.mono.size}";
# "emacs.color0" = dark; # "emacs.color0" = dark;
# "emacs.color1" = green; # "emacs.color1" = green;