diff --git a/flake.nix b/flake.nix index b000dea..60a9e32 100755 --- a/flake.nix +++ b/flake.nix @@ -80,27 +80,26 @@ rice = rec { lib = import ./nxlib/ricelib.nix { lib = nixpkgs.lib; }; transparency = 0.9; - rounding = 0; - gap-size = 0; - border-width = 2; + rounding = 10; + gap-size = 10; + border-width = 3; color = let dark = (-0.3); - bright = (0.3); + 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 = "#000000"; - grey = "#666666"; - white = "#dddddd"; - blue = "#4411ff"; - cyan = "#00ffff"; - green = "#00ff00"; - magenta = "#ff00ff"; - red = "#ff0044"; - yellow = "#ff4400"; + black = "#111111"; + white = "#dddddd"; + blue = "#1111dd"; + cyan = "#11dddd"; + green = "#11dd11"; + magenta = "#dd11dd"; + red = "#dd1111"; + yellow = "#dddd11"; }; xcolor = with ccolor; { - background = black.base; + background = black.dark; foreground = white.base; border = red.base; border2 = blue.base; diff --git a/home-modules/color-pallete.nix b/home-modules/color-pallete.nix new file mode 100644 index 0000000..11e3d9c --- /dev/null +++ b/home-modules/color-pallete.nix @@ -0,0 +1,35 @@ +{ 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} + white: dark: ${white.dark} + base: ${white.base} + bright: ${white.bright} + blue: dark: ${blue.dark} + base: ${blue.base} + bright: ${blue.bright} + magenta: dark: ${magenta.dark} + base: ${magenta.base} + bright: ${magenta.bright} + red: dark: ${red.dark} + base: ${red.base} + bright: ${red.bright} + cyan: dark: ${cyan.dark} + base: ${cyan.base} + bright: ${cyan.bright} + green: dark: ${green.dark} + base: ${green.base} + bright: ${green.bright} + yellow: dark: ${yellow.dark} + base: ${yellow.base} + bright: ${yellow.bright} + ''; +} diff --git a/home-modules/git.nix b/home-modules/git.nix index c9ebf17..6097bac 100755 --- a/home-modules/git.nix +++ b/home-modules/git.nix @@ -20,6 +20,9 @@ lib.mkIf (user != "tv") if [ -d "$dir" ]; then cd "$dir" || { echo "Cannot change directory to $dir"; exit 1; } echo "$(echo $dir | rev | cut -f 1 -d'/' | rev):" + if [[ $* == *--fetch* ]]; then + git fetch + fi gst echo "" cd - > /dev/null || { echo "Cannot change back to the original directory"; exit 1; } @@ -46,4 +49,4 @@ lib.mkIf (user != "tv") }; }; }; -} \ No newline at end of file +} diff --git a/home-modules/helix.nix b/home-modules/helix.nix index b8e510d..d968e58 100644 --- a/home-modules/helix.nix +++ b/home-modules/helix.nix @@ -45,52 +45,52 @@ }]; themes = { base16 = with rice.color; { - "attributes" = blue.base; + "attributes" = blue.bright; "comment" = { "fg" = white.dark; "modifiers" = [ "italic" ]; }; - "constant" = cyan.base; + "constant" = cyan.bright; "constant.character.escape" = yellow.bright; - "constant.numeric" = blue.base; - "constructor" = magenta.base; + "constant.numeric" = blue.bright; + "constructor" = magenta.bright; "debug" = yellow.dark; "diagnostic.modifiers" = [ "underlined" ]; - "diff.delta" = blue.base; - "diff.minus" = red.base; - "diff.plus" = green.base; - "error" = red.base; - "function" = cyan.base; + "diff.delta" = blue.bright; + "diff.minus" = red.bright; + "diff.plus" = green.bright; + "error" = red.bright; + "function" = cyan.bright; "hint" = yellow.dark; - "info" = cyan.base; + "info" = cyan.bright; "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; + "operator" = magenta.bright; + "special" = cyan.bright; + "string" = green.bright; + "type" = green.bright; + "variable" = blue.bright; + "variableother.member" = green.base; + "warning" = blue.bright; "markup.bold" = { - "fg" = green.base; + "fg" = green.bright; "modifiers" = [ "bold" ]; }; - "markup.heading" = cyan.base; + "markup.heading" = cyan.bright; "italic" = { "fg" = cyan.bright; "modifiers" = [ "italic" ]; }; - "markup.linktext" = red.base; + "markup.linktext" = red.bright; "markup.linkurl" = { - "fg" = blue.base; + "fg" = blue.bright; "modifiers" = [ "underlined" ]; }; - "markup.list" = red.base; - "markup.quote" = magenta.base; - "markup.raw" = green.base; + "markup.list" = red.bright; + "markup.quote" = magenta.bright; + "markup.raw" = green.bright; "markup.strikethrough" = { "modifiers" = [ "crossed_out" ]; }; @@ -108,79 +108,71 @@ "underline" = { style = "curl"; }; }; - "ui.background" = { + "ui.background" = { # general background of the editor window "bg" = background; }; - "ui.bufferline" = { + "ui.bufferline" = { # the top line ("tab"-line) "fg" = magenta.base; - "bg" = background; + "bg" = black.base; }; - "ui.bufferline.active" = { + "ui.bufferline.active" = { # the active "tab" "fg" = background; - "bg" = magenta.dark; + "bg" = magenta.base; "modifiers" = [ "bold" ]; - }; - "ui.cursor" = { + }; + "ui.cursor" = { # the cursor in Normal mode "fg" = white.base; "modifiers" = [ "reversed" ]; }; - "ui.cursor.insert" = { - "fg" = green.base; - "modifiers" = [ "reversed" ]; + "ui.cursorline.primary" = { # the line on which the cursor is on + "bg" = black.base; }; - "ui.cursorline.primary" = { - "bg" = black.bright; - }; - "ui.cursor.match" = { - "fg" = green.base; - "modifiers" = [ "reversed" ]; - }; - "ui.cursor.select" = { - "fg" = green.base; + "ui.cursor.match" = { # Matching bracket etc. + "bg" = green.dark; "modifiers" = [ "reversed" ]; }; "ui.gutter" = { - "bg" = black.bright; + "bg" = black.base; }; "ui.help" = { "fg" = cyan.base; - "bg" = background; + "bg" = black.base; }; "ui.linenr" = { - "fg" = yellow.dark; - "bg" = black.bright; + "fg" = white.dark; + "bg" = black.base; }; "ui.linenr.selected" = { - "fg" = blue.dark; - "bg" = background; + "fg" = blue.bright; "modifiers" = [ "bold" ]; }; "ui.menu" = { - "fg" = magenta.dark; - "bg" = background; + "fg" = magenta.base; + "bg" = black.base; }; "ui.menu.scroll" = { "fg" = yellow.dark; "bg" = background; }; "ui.menu.selected" = { - "fg" = red.dark; + "fg" = red.base; "bg" = blue.dark; }; "ui.popup" = { - "bg" = grey.dark; + "bg" = black.base; }; "ui.selection" = { - "bg" = grey.base; + "bg" = white.dark; }; "ui.selection.primary" = { - "bg" = grey.base; + "bg" = black.bright; }; "ui.statusline" = { "fg" = blue.bright; + # "bg" = black.base; }; "ui.statusline.inactive" = { - "fg" = yellow.bright; + "fg" = red.bright; "bg" = red.dark; }; "ui.statusline.insert" = { @@ -195,13 +187,13 @@ "fg" = cyan.bright; "bg" = cyan.dark; }; - "ui.text" = magenta.dark; - "ui.text.focus" = magenta.dark; + "ui.text" = magenta.base; + "ui.text.focus" = cyan.base; "ui.virtual.indent-guide" = { - "fg" = grey.dark; + "fg" = black.bright; }; "ui.virtual.inlay-hint" = { - "fg" = grey.dark; + "fg" = black.bright; }; "ui.virtual.ruler" = { "bg" = background; diff --git a/home-modules/waybar.nix b/home-modules/waybar.nix index a54fdc6..eb790cb 100755 --- a/home-modules/waybar.nix +++ b/home-modules/waybar.nix @@ -55,14 +55,16 @@ lib.mkIf (user != "tv") package = pkgs-unstable.waybar; settings = { bar = { - height = 20; + # height = 20; layer = "top"; - # position = "top"; position = "bottom"; margin-top = 0; - margin-left = rice.gap-size; - margin-bottom = rice.gap-size; - margin-right = rice.gap-size; + # margin-left = rice.gap-size; + # margin-bottom = rice.gap-size; + # margin-right = rice.gap-size; + margin-left = 0; + margin-bottom = 0; + margin-right = 0; spacing = 10; modules-left = [ # "cpu" @@ -173,12 +175,9 @@ lib.mkIf (user != "tv") window#waybar { background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.background},${builtins.toString rice.transparency}); 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.base}); */ /* margin: ${builtins.toString rice.gap-size}px; */ - border-radius: ${builtins.toString rice.rounding}px; - + /* border-radius: ${builtins.toString rice.rounding}px; */ } #clock, @@ -202,9 +201,9 @@ lib.mkIf (user != "tv") } #workspaces button { - color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.grey.base}); - margin-left: 10px; - margin-right: 10px; + color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.white.dark}); + padding-left: 10px; + padding-right: 10px; border-radius: ${builtins.toString rice.rounding}px; } @@ -233,6 +232,9 @@ lib.mkIf (user != "tv") #wireplumber.muted { color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue.base}); } + #wireplumber { + padding-left: 10px; + } #battery.warning:not(.charging) { color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green.base});; diff --git a/home.nix b/home.nix index 55aea86..f05ec4d 100755 --- a/home.nix +++ b/home.nix @@ -40,6 +40,8 @@ ./home-modules/latex.nix ./home-modules/pandoc.nix ./home-modules/python.nix + + ./home-modules/color-pallete.nix ]; home.username = user; home.homeDirectory = "/home/${user}"; diff --git a/nxlib/ricelib.nix b/nxlib/ricelib.nix index f55aa18..9b4ed36 100755 --- a/nxlib/ricelib.nix +++ b/nxlib/ricelib.nix @@ -90,7 +90,7 @@ in alter-luminace-hex = hex: amount: let color-num = with (slice-hex (nohash hex)); { r = drune-to-255 r; g = drune-to-255 g; b = drune-to-255 b; }; - alter = num: (num-to-drune (cap-255 (builtins.floor (num * (1 + amount))))); + alter = num: (num-to-drune (cap-255 (builtins.floor ((125 * amount) + (num * (1+amount))) ))); in with color-num; "#${alter r}${alter g}${alter b}"; -} \ No newline at end of file +}