more dynamic color

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-05-29 22:17:03 +02:00
parent 1db9cf76f7
commit 5c92ded93d
7 changed files with 83 additions and 78 deletions

View File

@@ -72,7 +72,6 @@
"obsidian" "obsidian"
"zoom-us" "zoom-us"
"zoom" "zoom"
"vscode-extension-MS-python-vscode-pylance"
] ++ nvidia.unfree; ] ++ nvidia.unfree;
inecure-packages = [ inecure-packages = [
@@ -94,11 +93,11 @@
bright = (0.5); 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 = "#110022"; # "#111111" "#001100"; black = "#000022"; # "#111111" "#001100";
white = "#dddddd"; # "#dddddd" "#66dd66"; white = "#ddddff"; # "#dddddd" "#66dd66";
blue = "#6611dd"; # "#3333dd" "#003300"; blue = "#6611dd"; # "#3333dd" "#003300";
cyan = "#11dddd"; # "#11dddd" "#00dd55"; cyan = "#11dddd"; # "#11dddd" "#00dd55";
green = "#00ddaa"; # "#11dd11" "#11dd11"; green = "#11dd11"; # "#11dd11" "#11dd11";
magenta = "#dd00dd"; # "#dd11dd" "#005500"; magenta = "#dd00dd"; # "#dd11dd" "#005500";
red = "#dd1166"; # "#dd1111" "#00aa00"; red = "#dd1166"; # "#dd1111" "#00aa00";
yellow = "#dd6611"; # "#dddd11" "#ffff00"; yellow = "#dd6611"; # "#dddd11" "#ffff00";
@@ -106,10 +105,11 @@
xcolor = with ccolor; { xcolor = with ccolor; {
background = black.dark; background = black.dark;
foreground = white.base; foreground = white.base;
border = green.base; border = cyan.base;
border2 = blue.base; border2 = blue.base;
accent = magenta.base; accent = cyan;
tertiary = blue.base; secondary = magenta;
tertiary = blue;
}; };
in ccolor // xcolor; in ccolor // xcolor;
font = { font = {

View File

@@ -1,12 +1,6 @@
{ config, pkgs, rice, ... }: { config, pkgs, rice, ... }:
{ {
home.file.".config/color-pallet.txt".text = with rice.color; '' 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} black: dark: ${black.dark}
base: ${black.base} base: ${black.base}
bright: ${black.bright} bright: ${black.bright}

View File

@@ -59,52 +59,52 @@
}]; }];
themes = { themes = {
base16 = with rice.color; { base16 = with rice.color; {
"attributes" = blue.bright; "attributes" = foreground;
"comment" = { "comment" = {
"fg" = white.dark; "fg" = white.dark;
"modifiers" = [ "italic" ]; "modifiers" = [ "italic" ];
}; };
"constant" = yellow.base; "constant" = accent.bright;
"constant.character.escape" = yellow.bright; "constant.character.escape" = foreground;
"constant.numeric" = green.bright; "constant.numeric" = foreground;
"constructor" = magenta.bright; "constructor" = foreground;
"debug" = yellow.dark; "debug" = yellow.base;
"diagnostic.modifiers" = [ "underlined" ]; "diagnostic.modifiers" = [ "underlined" ];
"diff.delta" = blue.bright; "diff.delta" = blue.bright;
"diff.minus" = red.bright; "diff.minus" = red.bright;
"diff.plus" = green.bright; "diff.plus" = green.bright;
"error" = red.bright; "error" = red.base;
"function" = cyan.bright; "function" = foreground;
"hint" = yellow.dark; "hint" = foreground;
"info" = cyan.bright; "info" = foreground;
"keyword" = cyan.bright; "keyword" = foreground;
"label" = cyan.bright; "label" = foreground;
"namespace" = cyan.bright; "namespace" = foreground;
"operator" = magenta.bright; "operator" = foreground;
"special" = cyan.bright; "special" = foreground;
"string" = green.bright; "string" = secondary.bright;
"type" = green.bright; "type" = foreground;
"variable" = blue.bright; "variable" = accent.base;
"variableother.member" = green.base; "variableother.member" = foreground;
"warning" = blue.bright; "warning" = red.base;
"markup.bold" = { "markup.bold" = {
"fg" = green.bright; "fg" = foreground;
"modifiers" = [ "bold" ]; "modifiers" = [ "bold" ];
}; };
"markup.heading" = cyan.bright; "markup.heading" = foreground;
"italic" = { "italic" = {
"fg" = cyan.bright; "fg" = foreground;
"modifiers" = [ "italic" ]; "modifiers" = [ "italic" ];
}; };
"markup.linktext" = red.bright; "markup.linktext" = foreground;
"markup.linkurl" = { "markup.linkurl" = {
"fg" = blue.bright; "fg" = foreground;
"modifiers" = [ "underlined" ]; "modifiers" = [ "underlined" ];
}; };
"markup.list" = red.bright; "markup.list" = foreground;
"markup.quote" = magenta.bright; "markup.quote" = foreground;
"markup.raw" = green.bright; "markup.raw" = foreground;
"markup.strikethrough" = { "markup.strikethrough" = {
"modifiers" = [ "crossed_out" ]; "modifiers" = [ "crossed_out" ];
}; };
@@ -126,16 +126,16 @@
"bg" = background; "bg" = background;
}; };
"ui.bufferline" = { # the top line ("tab"-line) "ui.bufferline" = { # the top line ("tab"-line)
"fg" = magenta.base; "fg" = accent.base;
"bg" = black.base; "bg" = black.base;
}; };
"ui.bufferline.active" = { # the active "tab" "ui.bufferline.active" = { # the active "tab"
"fg" = background; "fg" = background;
"bg" = magenta.base; "bg" = accent.base;
"modifiers" = [ "bold" ]; "modifiers" = [ "bold" ];
}; };
"ui.cursor" = { # the cursor in Normal mode "ui.cursor" = { # the cursor in Normal mode
"fg" = white.base; "fg" = foreground;
"modifiers" = [ "reversed" ]; "modifiers" = [ "reversed" ];
}; };
"ui.cursorline.primary" = { # the line on which the cursor is on "ui.cursorline.primary" = { # the line on which the cursor is on
@@ -149,7 +149,7 @@
"bg" = black.base; "bg" = black.base;
}; };
"ui.help" = { "ui.help" = {
"fg" = cyan.base; "fg" = green.base;
"bg" = black.base; "bg" = black.base;
}; };
"ui.linenr" = { "ui.linenr" = {
@@ -157,11 +157,11 @@
"bg" = black.base; "bg" = black.base;
}; };
"ui.linenr.selected" = { "ui.linenr.selected" = {
"fg" = blue.bright; "fg" = accent.bright;
"modifiers" = [ "bold" ]; "modifiers" = [ "bold" ];
}; };
"ui.menu" = { "ui.menu" = {
"fg" = magenta.base; "fg" = accent.base;
"bg" = black.base; "bg" = black.base;
}; };
"ui.menu.scroll" = { "ui.menu.scroll" = {
@@ -201,8 +201,8 @@
"fg" = cyan.bright; "fg" = cyan.bright;
"bg" = cyan.dark; "bg" = cyan.dark;
}; };
"ui.text" = magenta.base; "ui.text" = foreground;
"ui.text.focus" = cyan.base; "ui.text.focus" = accent.base;
"ui.virtual.indent-guide" = { "ui.virtual.indent-guide" = {
"fg" = black.bright; "fg" = black.bright;
}; };

View File

@@ -63,6 +63,7 @@ lib.mkIf (user != "tv")
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
# package = pkgs-unstable.hyprland;
package = inputs.hyprland.packages.${pkgs.system}.hyprland; package = inputs.hyprland.packages.${pkgs.system}.hyprland;
xwayland.enable = true; xwayland.enable = true;
systemd.enable = true; systemd.enable = true;
@@ -155,7 +156,7 @@ lib.mkIf (user != "tv")
gaps_out = rice.gap-size; gaps_out = rice.gap-size;
border_size = rice.border-width; border_size = rice.border-width;
"col.active_border" = "rgba(${rice.lib.nohash rice.color.border}ff) rgba(${rice.lib.nohash rice.color.border2}ff) 90deg"; "col.active_border" = "rgba(${rice.lib.nohash rice.color.border}ff) rgba(${rice.lib.nohash rice.color.border2}ff) 90deg";
"col.inactive_border" = "rgba(${rice.lib.nohash rice.color.black.base}ff) rgba(${rice.lib.nohash rice.color.blue.base}ff) 90deg"; "col.inactive_border" = "rgba(${rice.lib.nohash rice.color.background}ff) rgba(${rice.lib.nohash rice.color.border2}ff) 90deg";
# cursor_inactive_timeout = 10; # cursor_inactive_timeout = 10;
@@ -262,8 +263,8 @@ lib.mkIf (user != "tv")
"opacity ${transparency}, neovide" "opacity ${transparency}, neovide"
"opacity ${transparency}, obsidian" "opacity ${transparency}, obsidian"
"opacity ${transparency}, zathura" "opacity ${transparency}, zathura"
"bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Alacritty" # "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Alacritty"
"bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Kitty" # "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Kitty"
"opacity ${transparency}, discord" "opacity ${transparency}, discord"
"opacity ${transparency}, vesktop" "opacity ${transparency}, vesktop"
"opacity ${transparency}, Element" "opacity ${transparency}, Element"
@@ -322,7 +323,7 @@ lib.mkIf (user != "tv")
"SUPER, F5, exec, nx_gcal_event force-lookup" "SUPER, F5, exec, nx_gcal_event force-lookup"
"SUPER SHIFT, F5, exec, nx_gcal_event reauthenticate" "SUPER SHIFT, F5, exec, nx_gcal_event reauthenticate"
# "SUPER, F6," # "SUPER, F6,"
"SUPER, F8, exec, /home/nx2/scripts/swww-randomize.sh" ''SUPER, F8, exec, find ~/Pictures/wallpapers/* -type f -not -path "~/Pictures/wallpapers/.git/*" | sort -R | head -n 1 | xargs swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120''
# "SUPER, F9, hyprload,reload" # "SUPER, F9, hyprload,reload"
# "SUPER, F10, hyprload,update" # "SUPER, F10, hyprload,update"
"SUPER, F11, exec, waybar" "SUPER, F11, exec, waybar"

View File

@@ -11,7 +11,6 @@
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide jnoortheen.nix-ide
ms-python.python ms-python.python
ms-python.vscode-pylance
ms-python.black-formatter ms-python.black-formatter
redhat.vscode-yaml redhat.vscode-yaml
redhat.vscode-xml redhat.vscode-xml

View File

@@ -176,7 +176,7 @@ lib.mkIf (user != "tv")
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: 5s; transition-duration: 5s;
transition-property: background-color; transition-property: background-color;
/* 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.border}); */
/* 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; */
} }
@@ -198,7 +198,7 @@ lib.mkIf (user != "tv")
padding: 0px 3px; padding: 0px 3px;
margin-top: 0.3em; margin-top: 0.3em;
border-radius: ${builtins.toString rice.rounding}px; border-radius: ${builtins.toString rice.rounding}px;
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.cyan.bright}); color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.accent.bright});
} }
#workspaces button { #workspaces button {
@@ -210,11 +210,11 @@ lib.mkIf (user != "tv")
#workspaces button.active { #workspaces button.active {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.background}); color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.background});
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.cyan.base},${builtins.toString rice.transparency}); background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.accent.base},${builtins.toString rice.transparency});
} }
#workspaces button:hover { #workspaces button:hover {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.cyan.bright}); color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.tertiary.bright});
} }
#workspaces button.urgent { #workspaces button.urgent {
@@ -227,11 +227,11 @@ lib.mkIf (user != "tv")
#window, #custom-ctimeremaining { #window, #custom-ctimeremaining {
font-family: ${rice.font.base.name}, ${rice.font.code.name2}; font-family: ${rice.font.base.name}, ${rice.font.code.name2};
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue.base}); color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.tertiary.bright});
} }
#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.tertiary.bright});
} }
#wireplumber { #wireplumber {
padding-left: 10px; padding-left: 10px;

View File

@@ -1,25 +1,36 @@
{ config, pkgs, ... }: { pkgs, user, ... }:
{ {
environment.systemPackages = with pkgs; [ # environment.systemPackages = with pkgs; [
sddm # sddm
where-is-my-sddm-theme # where-is-my-sddm-theme
]; # ];
services.xserver = { # services.xserver = {
displayManager = { # displayManager = {
defaultSession = "hyprland"; # defaultSession = "hyprland";
sddm = { # sddm = {
# enable = true;
# theme = "where_is_my_sddm_theme";
# settings = {
# theme = {
# # background = /home/nx2/Pictures/
# passwordFontSize = 12;
# passwordInputCursorVisible = true;
# };
# };
# };
# };
# };
services.greetd = {
enable = true; enable = true;
theme = "where_is_my_sddm_theme"; settings = rec {
settings = { hyprland = {
theme = { command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland";
# background = /home/nx2/Pictures/ user = user;
passwordFontSize = 12;
passwordInputCursorVisible = true;
};
};
}; };
default_session = hyprland;
vt = 2;
}; };
}; };
} }