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

View File

@@ -1,12 +1,6 @@
{ config, pkgs, rice, ... }:
{
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}
base: ${black.base}
bright: ${black.bright}

View File

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

View File

@@ -63,6 +63,7 @@ lib.mkIf (user != "tv")
wayland.windowManager.hyprland = {
enable = true;
# package = pkgs-unstable.hyprland;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
xwayland.enable = true;
systemd.enable = true;
@@ -155,7 +156,7 @@ lib.mkIf (user != "tv")
gaps_out = rice.gap-size;
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.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;
@@ -262,8 +263,8 @@ lib.mkIf (user != "tv")
"opacity ${transparency}, neovide"
"opacity ${transparency}, obsidian"
"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}), Kitty"
# "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"
"opacity ${transparency}, discord"
"opacity ${transparency}, vesktop"
"opacity ${transparency}, Element"
@@ -322,7 +323,7 @@ lib.mkIf (user != "tv")
"SUPER, F5, exec, nx_gcal_event force-lookup"
"SUPER SHIFT, F5, exec, nx_gcal_event reauthenticate"
# "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, F10, hyprload,update"
"SUPER, F11, exec, waybar"

View File

@@ -11,7 +11,6 @@
extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
ms-python.python
ms-python.vscode-pylance
ms-python.black-formatter
redhat.vscode-yaml
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});
transition-duration: 5s;
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; */
/* border-radius: ${builtins.toString rice.rounding}px; */
}
@@ -198,7 +198,7 @@ lib.mkIf (user != "tv")
padding: 0px 3px;
margin-top: 0.3em;
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 {
@@ -210,11 +210,11 @@ lib.mkIf (user != "tv")
#workspaces button.active {
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 {
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 {
@@ -227,11 +227,11 @@ lib.mkIf (user != "tv")
#window, #custom-ctimeremaining {
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 {
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 {
padding-left: 10px;

View File

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