color rework, flake bump

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-05-12 21:55:03 +02:00
parent 2db49fe4c6
commit d97010da0c
14 changed files with 424 additions and 278 deletions

View File

@@ -8,7 +8,7 @@
nil # nix language server
python311Packages.python-lsp-server
];
sessionVariables = {
sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
};
@@ -16,6 +16,7 @@
programs.helix = {
enable = true;
settings = {
# theme = "base16_terminal";
theme = "base16";
editor = {
cursor-shape = {
@@ -27,11 +28,11 @@
color-modes = true;
bufferline = "always";
file-picker.hidden = false;
middle-click-paste = false;
middle-click-paste = false;
cursorline = true;
indent-guides.render = true;
lsp.display-inlay-hints = true;
statusline.center = ["position-percentage"];
statusline.center = [ "position-percentage" ];
true-color = true;
whitespace.characters = {
newline = "";
@@ -44,46 +45,171 @@
}];
themes = {
base16 = with rice.color; {
"ui.menu" = "none";
"ui.menu.selected" = { modifiers = [ "reversed" ]; };
"ui.linenr" = { fg = white; bg = black; };
"ui.popup" = { modifiers = [ "reversed" ]; };
"ui.linenr.selected" = { fg = white; bg = bright-black; modifiers = [ "bold" ]; };
"ui.selection" = { fg = black; bg = blue; };
"ui.selection.primary" = { modifiers = [ "reversed" ]; };
"comment" = { fg = green; };
"ui.statusline" = { fg = white; bg = red; };
"ui.statusline.inactive" = { fg = black; bg = white; };
"ui.help" = { fg = blue; bg = white; };
"ui.cursor" = { modifiers = [ "reversed" ]; };
"ui.virtual.indent-guide" = black;
"variable" = red;
"variable.builtin" = magenta;
"constant.numeric" = magenta;
"constant" = magenta;
"attributes" = yellow;
"type" = yellow;
"ui.cursor.match" = { fg = yellow; modifiers = [ "underlined" ]; };
"string" = green;
"variable.other.member" = red;
"constant.character.escape" = cyan;
"function" = blue;
"constructor" = blue;
"special" = blue;
"keyword" = magenta;
"label" = magenta;
"namespace" = blue;
"diff.plus" = green;
"diff.delta" = yellow;
"diff.minus" = red;
"diagnostic" = { modifiers = [ "underlined" ]; };
"ui.gutter" = { bg = black; };
"info" = blue;
"hint" = blue;
"debug" = blue;
"warning" = yellow;
"error" = red;
};
"attributes" = blue.base;
"comment" = {
"fg" = white.dark;
"modifiers" = [ "italic" ];
};
"constant" = cyan.base;
"constant.character.escape" = yellow.bright;
"constant.numeric" = blue.base;
"constructor" = magenta.base;
"debug" = yellow.dark;
"diagnostic.modifiers" = [ "underlined" ];
"diff.delta" = blue.base;
"diff.minus" = red.base;
"diff.plus" = green.base;
"error" = red.base;
"function" = cyan.base;
"hint" = yellow.dark;
"info" = cyan.base;
"keyword" = cyan.bright;
"label" = cyan.bright;
"namespace" = cyan.bright;
"operator" = magenta.dark;
"special" = cyan.base;
"string" = green.base;
"type" = green.base;
"variable" = red.base;
"variableother.member" = green.base;
"warning" = blue.base;
"markup.bold" = {
"fg" = green.base;
"modifiers" = [ "bold" ];
};
"markup.heading" = cyan.base;
"italic" = {
"fg" = cyan.bright;
"modifiers" = [ "italic" ];
};
"markup.linktext" = red.base;
"markup.linkurl" = {
"fg" = blue.base;
"modifiers" = [ "underlined" ];
};
"markup.list" = red.base;
"markup.quote" = magenta.base;
"markup.raw" = green.base;
"markup.strikethrough" = {
"modifiers" = [ "crossed_out" ];
};
"diagnostic.hint" = {
"underline" = { style = "curl"; };
};
"diagnostic.info" = {
"underline" = { style = "curl"; };
};
"diagnostic.warning" = {
"underline" = { style = "curl"; };
};
"diagnostic.error" = {
"underline" = { style = "curl"; };
};
"ui.background" = {
"bg" = background;
};
"ui.bufferline" = {
"fg" = magenta.base;
"bg" = background;
};
"ui.bufferline.active" = {
"fg" = background;
"bg" = magenta.dark;
"modifiers" = [ "bold" ];
};
"ui.cursor" = {
"fg" = white.base;
"modifiers" = [ "reversed" ];
};
"ui.cursor.insert" = {
"fg" = green.base;
"modifiers" = [ "reversed" ];
};
"ui.cursorline.primary" = {
"bg" = black.bright;
};
"ui.cursor.match" = {
"fg" = green.base;
"modifiers" = [ "reversed" ];
};
"ui.cursor.select" = {
"fg" = green.base;
"modifiers" = [ "reversed" ];
};
"ui.gutter" = {
"bg" = black.bright;
};
"ui.help" = {
"fg" = cyan.base;
"bg" = background;
};
"ui.linenr" = {
"fg" = yellow.dark;
"bg" = black.bright;
};
"ui.linenr.selected" = {
"fg" = blue.dark;
"bg" = background;
"modifiers" = [ "bold" ];
};
"ui.menu" = {
"fg" = magenta.dark;
"bg" = background;
};
"ui.menu.scroll" = {
"fg" = yellow.dark;
"bg" = background;
};
"ui.menu.selected" = {
"fg" = red.dark;
"bg" = blue.dark;
};
"ui.popup" = {
"bg" = grey.dark;
};
"ui.selection" = {
"bg" = grey.base;
};
"ui.selection.primary" = {
"bg" = grey.base;
};
"ui.statusline" = {
"fg" = blue.bright;
};
"ui.statusline.inactive" = {
"fg" = yellow.bright;
"bg" = red.dark;
};
"ui.statusline.insert" = {
"fg" = green.bright;
"bg" = green.dark;
};
"ui.statusline.normal" = {
"fg" = yellow.bright;
"bg" = yellow.dark;
};
"ui.statusline.select" = {
"fg" = cyan.bright;
"bg" = cyan.dark;
};
"ui.text" = magenta.dark;
"ui.text.focus" = magenta.dark;
"ui.virtual.indent-guide" = {
"fg" = grey.dark;
};
"ui.virtual.inlay-hint" = {
"fg" = grey.dark;
};
"ui.virtual.ruler" = {
"bg" = background;
};
"ui.window" = {
"bg" = background;
};
};
};
};
}

View File

@@ -1,8 +1,8 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }:
{ config, pkgs, pkgs-unstable, lib, system, user, allowed, secrets, ... }:
lib.mkIf (user != "tv")
{
home.packages = [
pkgs.hyprland-autoname-workspaces
pkgs-unstable.hyprland-autoname-workspaces
];
home.file.".config/hyprland-autoname-workspaces/config.toml".text = ''

View File

@@ -11,7 +11,7 @@ let
scale = "1.0";
};
second = {
name = "DP-1";
name = "DP-3";
resolution = "1920x1080";
position = "1920x0";
scale = "1.0";
@@ -59,7 +59,7 @@ lib.mkIf (user != "tv")
xwayland.enable = true;
systemd.enable = true;
plugins = [
inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo
# inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo
# inputs.hyprfocus.packages.${pkgs.system}.hyprfocus
# inputs.hycov.packages.${pkgs.system}.hycov
# inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
@@ -144,10 +144,10 @@ lib.mkIf (user != "tv")
gaps_in = builtins.div rice.gap-size 2;
gaps_out = rice.gap-size;
border_size = rice.border-width;
"col.active_border" = "rgba(${rice.lib.nohash rice.color.red}ff) rgba(${rice.lib.nohash rice.color.blue}ff) 90deg";
"col.inactive_border" = "rgba(${rice.lib.nohash rice.color.black}ff) rgba(${rice.lib.nohash rice.color.blue}ff) 90deg";
"col.active_border" = "rgba(${rice.lib.nohash rice.color.red.base}ff) rgba(${rice.lib.nohash rice.color.blue.base}ff) 90deg";
"col.inactive_border" = "rgba(${rice.lib.nohash rice.color.black.base}ff) rgba(${rice.lib.nohash rice.color.blue.base}ff) 90deg";
cursor_inactive_timeout = 10;
# cursor_inactive_timeout = 10;
layout = "dwindle";
# layout = "master";
@@ -160,8 +160,8 @@ lib.mkIf (user != "tv")
shadow_range = "20";
shadow_offset = "0 0";
shadow_render_power = "4";
"col.shadow" = "rgba(${rice.lib.nohash rice.color.red}ff)";
"col.shadow_inactive" = "rgba(${rice.lib.nohash rice.color.black}ff)";
"col.shadow" = "rgba(${rice.lib.nohash rice.color.red.base}ff)";
"col.shadow_inactive" = "rgba(${rice.lib.nohash rice.color.black.base}ff)";
active_opacity = "1.0";
inactive_opacity = "1.0";
@@ -241,7 +241,7 @@ lib.mkIf (user != "tv")
windowrulev2 = [
"opacity ${transparency},class:^(com.chatterino.*)$"
"opacity ${transparency},class:^(chatterino)$"
"bordercolor rgba(${rice.lib.nohash rice.color.bright-magenta}ff), pinned:1"
"bordercolor rgba(${rice.lib.nohash rice.color.magenta.bright}ff), pinned:1"
];
windowrule = [
@@ -354,7 +354,7 @@ lib.mkIf (user != "tv")
#bind = SUPER, TAB, hycov:toggleoverview
# "SUPER, TAB, overview:toggle"
"SUPER, TAB, hyprexpo:expo, toggle"
# "SUPER, TAB, hyprexpo:expo, toggle"
"ALT, TAB, focuscurrentorlast"
"SUPER, Q, killactive"
"SUPER, W, exec, waybar_mode set '󰈹 '"
@@ -767,7 +767,7 @@ lib.mkIf (user != "tv")
hyprexpo {
columns = 5
gap_size = ${builtins.toString rice.gap-size}
bg_col = rgb(${rice.lib.nohash rice.color.background})
bg_col = rgb(${builtins.substring 1 6 rice.color.background})
workspace_method = first 10 # [center/first] [workspace] e.g. first 1 or center m+1
enable_gesture = false # laptop touchpad, 4 fingers

View File

@@ -15,22 +15,22 @@ lib.mkIf (user != "tv")
background = rice.color.background;
foreground = rice.color.foreground;
cursor = rice.color.foreground;
color0 = rice.color.black;
color8 = rice.color.bright-black;
color1 = rice.color.red;
color9 = rice.color.bright-red;
color2 = rice.color.green;
color10 = rice.color.bright-green;
color3 = rice.color.yellow;
color11 = rice.color.bright-yellow;
color4 = rice.color.blue;
color12 = rice.color.bright-blue;
color5 = rice.color.magenta;
color13 = rice.color.bright-magenta;
color6 = rice.color.cyan;
color14 = rice.color.bright-cyan;
color7 = rice.color.white;
color15 = rice.color.bright-white;
color0 = rice.color.black.base;
color8 = rice.color.black.bright;
color1 = rice.color.red.base;
color9 = rice.color.red.bright;
color2 = rice.color.green.base;
color10 = rice.color.green.bright;
color3 = rice.color.yellow.base;
color11 = rice.color.yellow.bright;
color4 = rice.color.blue.base;
color12 = rice.color.blue.bright;
color5 = rice.color.magenta.base;
color13 = rice.color.magenta.bright;
color6 = rice.color.cyan.base;
color14 = rice.color.cyan.bright;
color7 = rice.color.white.base;
color15 = rice.color.white.bright;
background_opacity = builtins.toString rice.transparency;
transparency = true;
scroll_multiplier = 9;

View File

@@ -56,21 +56,21 @@
# customColorScheme = {
# base00 = rice.color.background;
# base01 = rice.color.bright-black;
# base02 = rice.color.blue;
# base03 = rice.color.bright-blue;
# base04 = rice.color.cyan;
# base05 = rice.color.bright-cyan;
# base06 = rice.color.green;
# base07 = rice.color.bright-green;
# base08 = rice.color.magenta;
# base09 = rice.color.bright-magenta;
# base0A = rice.color.red;
# base0B = rice.color.bright-red;
# base0C = rice.color.white;
# base0D = rice.color.bright-white;
# base0E = rice.color.yellow;
# base0F = rice.color.bright-yellow;
# base01 = rice.color.black.bright;
# base02 = rice.color.blue.base;
# base03 = rice.color.blue.bright;
# base04 = rice.color.cyan.base;
# base05 = rice.color.cyan.bright;
# base06 = rice.color.green.base;
# base07 = rice.color.green.bright;
# base08 = rice.color.magenta.base;
# base09 = rice.color.magenta.bright;
# base0A = rice.color.red.base;
# base0B = rice.color.red.bright;
# base0C = rice.color.white.base;
# base0D = rice.color.white.bright;
# base0E = rice.color.yellow.base;
# base0F = rice.color.yellow.bright;
# };
# };
opts = {

View File

@@ -78,21 +78,21 @@ lib.mkIf (user != "tv")
-- Colorscheme
require('base16-colorscheme').setup({
base00 = '${rice.color.background}',
base01 = '${rice.color.bright-black}',
base02 = '${rice.color.blue}',
base03 = '${rice.color.bright-blue}',
base04 = '${rice.color.cyan}',
base05 = '${rice.color.bright-cyan}',
base06 = '${rice.color.green}',
base07 = '${rice.color.bright-green}',
base08 = '${rice.color.magenta}',
base09 = '${rice.color.bright-magenta}',
base0A = '${rice.color.red}',
base0B = '${rice.color.bright-red}',
base01 = '${rice.color.black.bright}',
base02 = '${rice.color.blue.base}',
base03 = '${rice.color.blue.bright}',
base04 = '${rice.color.cyan.base}',
base05 = '${rice.color.cyan.bright}',
base06 = '${rice.color.green.base}',
base07 = '${rice.color.green.bright}',
base08 = '${rice.color.magenta.base}',
base09 = '${rice.color.magenta.bright}',
base0A = '${rice.color.red.base}',
base0B = '${rice.color.red.bright}',
base0C = '${rice.color.foreground}',
base0D = '${rice.color.bright-white}',
base0E = '${rice.color.yellow}',
base0F = '${rice.color.bright-yellow}',
base0D = '${rice.color.white.bright}',
base0E = '${rice.color.yellow.base}',
base0F = '${rice.color.yellow.bright}',
})
require('base16-colorscheme').with_config({
telescope = true,

View File

@@ -195,10 +195,12 @@ lib.mkIf (user != "tv")
lookup()
def reauthenicate():
os.remove(PICKLE_PATH)
os.remove(TOKEN_PATH)
os.system('notify-send --app-name="nx_gcal_event" "Deleted Token"')
lookup()
try:
os.remove(PICKLE_PATH)
os.remove(TOKEN_PATH)
os.system('notify-send --app-name="nx_gcal_event" "Deleted Token"')
exept:
lookup()
def print_help():
print("Usage: nx_gcal_event [lookup|force-lookup|reauthenicate|help]")

View File

@@ -29,7 +29,7 @@ lib.mkIf (user != "tv")
background-color: ${rice.color.background}${trdr};
border: ${builtins.toString rice.border-width}px;
border-radius: ${builtins.toString rice.rounding};
border-color: ${rice.color.blue};
border-color: ${rice.color.blue.base};
}
#mainbox {
border: 0;
@@ -57,8 +57,8 @@ lib.mkIf (user != "tv")
}
#element.normal.normal { background-color: ${rice.color.background}${trdr}; text-color: ${rice.color.foreground}; }
#element.selected.normal { background-color: ${rice.color.blue}${trdr}; text-color: ${rice.color.background}; }
#element.alternate.normal { background-color: ${rice.color.black}${trdr}; text-color: ${rice.color.foreground}; }
#element.selected.normal { background-color: ${rice.color.blue.base}${trdr}; text-color: ${rice.color.background}; }
#element.alternate.normal { background-color: ${rice.color.black.base}${trdr}; text-color: ${rice.color.foreground}; }
#scrollbar {
@@ -76,7 +76,7 @@ lib.mkIf (user != "tv")
#inputbar {
spacing: 0;
text-color: ${rice.color.background};
background-color: ${rice.color.red}${trdr};
background-color: ${rice.color.red.base}${trdr};
padding: 0;
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}

View File

@@ -1,12 +1,10 @@
{ config, lib, pkgs, user, rice, ... }:
{ config, lib, pkgs, pkgs-unstable, user, rice, ... }:
let
sep = " ";
in
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [
waybar
(pkgs.writeShellScriptBin "waybar_mode" ''
#!/usr/bin/env bash
print_help() {
@@ -50,10 +48,11 @@ lib.mkIf (user != "tv")
fi
'')
];
] ++ [ pkgs-unstable.waybar ];
programs.waybar = {
enable = true;
package = pkgs-unstable.waybar;
settings = {
bar = {
height = 20;
@@ -176,7 +175,7 @@ lib.mkIf (user != "tv")
transition-duration: 2s;
padding: 7px 10px;
padding-top: 0.1em;
/* border: ${builtins.toString rice.border-width}px solid rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue}); */
/* border: ${builtins.toString rice.border-width}px solid rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue.base}); */
/* margin: ${builtins.toString rice.gap-size}px; */
border-radius: ${builtins.toString rice.rounding}px;
@@ -199,51 +198,51 @@ 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.bright-cyan});
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.cyan.bright});
}
#workspaces button {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.bright-black});
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.grey.base});
margin-left: 10px;
margin-right: 10px;
border-radius: ${builtins.toString rice.rounding}px;
}
#workspaces button.active {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.bright-cyan});
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.cyan.bright});
}
#workspaces button:hover {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.background});
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.bright-cyan},${builtins.toString rice.transparency});
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.cyan.bright},${builtins.toString rice.transparency});
}
#workspaces button.urgent {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.magenta},${builtins.toString rice.transparency});
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.magenta.base},${builtins.toString rice.transparency});
}
#custom-mode {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red});
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red.base});
}
#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});
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue.base});
}
#wireplumber.muted {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue});
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue.base});
}
#battery.warning:not(.charging) {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green});;
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green.base});;
}
#battery.critical {
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red});;
background: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.bright-red});
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red.dark});;
background: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red.bright});
}
#battery.charging { color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green}); }
#battery.charging { color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green.base}); }
'';
#battery.critical:not(.charging) {

View File

@@ -25,11 +25,11 @@ lib.mkIf (user != "tv")
}
button:hover {
color: ${rice.color.blue} ;
color: ${rice.color.blue.base} ;
}
button:focus {
color: ${rice.color.blue} ;
color: ${rice.color.blue.base} ;
}
'';