From ff8936461d582ace8cde87e69bcd4b21e6f63d66 Mon Sep 17 00:00:00 2001 From: rxyhn Date: Sun, 7 Jan 2024 12:54:48 +0700 Subject: [PATCH] [feat]: Everforest --- .../hyprland/programs/swaylock.nix | 38 +++---- .../hyprland/programs/waybar.nix | 105 +++++++++--------- .../windowManager/hyprland/programs/wofi.nix | 10 +- .../windowManager/hyprland/services/dunst.nix | 18 +-- modules/theme/base16-schemes/everforest.nix | 20 ---- modules/theme/colorscheme.nix | 22 +--- modules/theme/default.nix | 2 +- modules/theme/schemes/everforest.nix | 22 ++++ 8 files changed, 111 insertions(+), 126 deletions(-) delete mode 100644 modules/theme/base16-schemes/everforest.nix create mode 100644 modules/theme/schemes/everforest.nix diff --git a/home/modules/windowManager/hyprland/programs/swaylock.nix b/home/modules/windowManager/hyprland/programs/swaylock.nix index dfb868c9..6f1cfdb1 100644 --- a/home/modules/windowManager/hyprland/programs/swaylock.nix +++ b/home/modules/windowManager/hyprland/programs/swaylock.nix @@ -23,25 +23,25 @@ fade-in = "0.1"; effect-blur = "20x5"; - ring-color = "${xcolors.base00}33"; - line-color = "${xcolors.base00}66"; - inside-color = "${xcolors.base00}66"; - inside-ver-color = "${xcolors.base00}66"; - inside-wrong-color = "${xcolors.base00}66"; - inside-clear-color = "${xcolors.base00}66"; - line-clear-color = "${xcolors.base00}66"; - line-wrong-color = "${xcolors.base00}66"; - text-color = "${xcolors.base05}CC"; - text-caps-lock-color = "${xcolors.base05}CC"; - text-ver-color = "${xcolors.base05}CC"; - text-clear-color = "${xcolors.base05}CC"; - text-wrong-color = "${xcolors.base08}CC"; - ring-wrong-color = "${xcolors.base08}CC"; - key-hl-color = "${xcolors.base0C}CC"; - line-ver-color = "${xcolors.base0C}CC"; - ring-ver-color = "${xcolors.base0C}CC"; - ring-clear-color = "${xcolors.base0C}CC"; - bs-hl-color = "${xcolors.base0C}CC"; + ring-color = "${xcolors.background}33"; + line-color = "${xcolors.background}66"; + inside-color = "${xcolors.background}66"; + inside-ver-color = "${xcolors.background}66"; + inside-wrong-color = "${xcolors.background}66"; + inside-clear-color = "${xcolors.background}66"; + line-clear-color = "${xcolors.background}66"; + line-wrong-color = "${xcolors.background}66"; + text-color = "${xcolors.foreground}CC"; + text-caps-lock-color = "${xcolors.foreground}CC"; + text-ver-color = "${xcolors.foreground}CC"; + text-clear-color = "${xcolors.foreground}CC"; + text-wrong-color = "${xcolors.color1}CC"; + ring-wrong-color = "${xcolors.color1}CC"; + key-hl-color = "${xcolors.color4}CC"; + line-ver-color = "${xcolors.color4}CC"; + ring-ver-color = "${xcolors.color4}CC"; + ring-clear-color = "${xcolors.color4}CC"; + bs-hl-color = "${xcolors.color4}CC"; }; }; } diff --git a/home/modules/windowManager/hyprland/programs/waybar.nix b/home/modules/windowManager/hyprland/programs/waybar.nix index 342c1edd..84b5ca37 100644 --- a/home/modules/windowManager/hyprland/programs/waybar.nix +++ b/home/modules/windowManager/hyprland/programs/waybar.nix @@ -69,9 +69,9 @@ in { }; }; network = { - format-wifi = formatIcons "${xcolors.base08}CC" "󰖩" + " {essid}"; - format-ethernet = formatIcons "${xcolors.base08}CC" "󰈀" + " {ipaddr}/{cidr}"; - format-disconnected = formatIcons "${xcolors.base08}CC" "󰖪"; + format-wifi = formatIcons "${xcolors.color6}CC" "󰖩" + " {essid}"; + format-ethernet = formatIcons "${xcolors.color6}CC" "󰈀" + " {ipaddr}/{cidr}"; + format-disconnected = formatIcons "${xcolors.color1}CC" "󰖪"; tooltip-format = '' 󰅃 {bandwidthUpBytes} 󰅀 {bandwidthDownBytes} {ipaddr}/{ifname} via {gwaddr} ({signalStrength}%)''; @@ -79,8 +79,8 @@ in { "pulseaudio#microphone" = { tooltip = false; format = "{format_source}"; - format-source = formatIcons "${xcolors.base09}CC" "󰍬" + " {volume}%"; - format-source-muted = formatIcons "${xcolors.base08}CC" "󰍭"; + format-source = formatIcons "${xcolors.color5}CC" "󰍬" + " {volume}%"; + format-source-muted = formatIcons "${xcolors.color1}CC" "󰍭"; on-click = "${_ pamixer} --default-source -t"; on-scroll-up = "${_ pamixer} --default-source -d 1"; on-scroll-down = "${_ pamixer} --default-source -i 1"; @@ -104,8 +104,8 @@ in { }; pulseaudio = { tooltip = false; - format = formatIcons "${xcolors.base0A}CC" "{icon}" + " {volume}%"; - format-muted = formatIcons "${xcolors.base08}CC" "󰖁"; + format = formatIcons "${xcolors.color5}CC" "{icon}" + " {volume}%"; + format-muted = formatIcons "${xcolors.color1}CC" "󰖁"; format-icons = {default = ["󰕿" "󰖀" "󰕾"];}; on-click = "${_ pamixer} -t"; on-scroll-up = "${_ pamixer} -d 1"; @@ -130,7 +130,7 @@ in { }; backlight = { tooltip = false; - format = formatIcons "${xcolors.base0B}CC" "{icon}" + " {percent}%"; + format = formatIcons "${xcolors.color4}CC" "{icon}" + " {percent}%"; format-icons = ["󰋙" "󰫃" "󰫄" "󰫅" "󰫆" "󰫇" "󰫈"]; on-scroll-up = "${_ brightnessctl} -q s 1%-"; on-scroll-down = "${_ brightnessctl} -q s +1%"; @@ -141,20 +141,20 @@ in { critical = 15; }; tooltip-format = "{timeTo}, {capacity}%"; - format = formatIcons "${xcolors.base0C}CC" "{icon}" + " {capacity}%"; - format-charging = formatIcons "${xcolors.base0B}CC" "󰂄" + " {capacity}%"; - format-plugged = formatIcons "${xcolors.base0B}CC" "󰚥" + " {capacity}%"; + format = formatIcons "${xcolors.color3}CC" "{icon}" + " {capacity}%"; + format-charging = formatIcons "${xcolors.color3}CC" "󰂄" + " {capacity}%"; + format-plugged = formatIcons "${xcolors.color3}CC" "󰚥" + " {capacity}%"; format-icons = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; }; "clock#date" = { - format = formatIcons "${xcolors.base0D}CC" "󰃶" + " {:%a %d %b}"; + format = formatIcons "${xcolors.color2}CC" "󰃶" + " {:%a %d %b}"; tooltip-format = '' {:%Y %B} {calendar}''; }; clock = { - format = formatIcons "${xcolors.base0E}CC" "󱑎" + " {:%I:%M %p}"; - format-alt = formatIcons "${xcolors.base0E}CC" "󱑎" + " {:%H:%M}"; + format = formatIcons "${xcolors.color2}CC" "󱑎" + " {:%I:%M %p}"; + format-alt = formatIcons "${xcolors.color2}CC" "󱑎" + " {:%H:%M}"; }; "group/group-power" = { orientation = "inherit"; @@ -172,27 +172,27 @@ in { ]; }; "custom/quit" = { - format = formatIcons "${xcolors.base0C}CC" "󰍃"; + format = formatIcons "${xcolors.color5}CC" "󰍃"; onclick = "loginctl terminate-user $USER"; tooltip = false; }; "custom/lock" = { - format = formatIcons "${xcolors.base0B}CC" "󰌾"; + format = formatIcons "${xcolors.color4}CC" "󰌾"; onclick = "loginctl lock-session"; tooltip = false; }; "custom/suspend" = { - format = formatIcons "${xcolors.base0D}CC" "󰒲"; + format = formatIcons "${xcolors.color3}CC" "󰒲"; onclick = "systemctl suspend"; tooltip = false; }; "custom/reboot" = { - format = formatIcons "${xcolors.base0E}CC" "󰜉"; + format = formatIcons "${xcolors.color2}CC" "󰜉"; on-click = "systemctl reboot"; tooltip = false; }; "custom/power" = { - format = formatIcons "${xcolors.base0F}CC" "󰐥"; + format = formatIcons "${xcolors.color1}CC" "󰐥"; on-click = "systemctl poweroff"; tooltip = false; }; @@ -211,7 +211,7 @@ in { } window#waybar { - background-color: alpha(${xcolors.base00}, 0.2); + background-color: alpha(${xcolors.background}, 0.2); } #custom-search { @@ -223,8 +223,18 @@ in { background-repeat: no-repeat; } + #user { + color: alpha(${xcolors.color7}, 0.8); + text-shadow: + 0 0 0.14em ${xcolors.color7}, + 0 0 0.27em ${xcolors.color7}, + 0 0 0.41em ${xcolors.color7}, + 0 0 0.55em ${xcolors.color7}, + 0 0 0.68em ${xcolors.color7}; + } + #workspaces { - background-color: alpha(${xcolors.base00}, 0.2); + background-color: alpha(${xcolors.background}, 0.4); border-radius: 4px; margin: 0.41em 0.21em; padding: 0.41em 0.82em; @@ -240,36 +250,23 @@ in { } #workspaces button label { - color: alpha(${xcolors.base05}, 0.8); + color: alpha(${xcolors.foreground}, 0.8); } #workspaces button.empty label { - color: alpha(${xcolors.base05}, 0.4); + color: alpha(${xcolors.foreground}, 0.4); } #workspaces button.urgent label { - color: alpha(${xcolors.base08}, 0.8); + color: alpha(${xcolors.color1}, 0.8); } #workspaces button.special label { - color: alpha(${xcolors.base0A}, 0.8); - text-shadow: - 0 0 0.14em ${xcolors.base0A}, - 0 0 0.27em ${xcolors.base0A}, - 0 0 0.41em ${xcolors.base0A}, - 0 0 0.55em ${xcolors.base0A}, - 0 0 0.68em ${xcolors.base0A}; + color: alpha(${xcolors.color3}, 0.8); } - #user, #workspaces button.active label { - color: alpha(${xcolors.base08}, 0.8); - text-shadow: - 0 0 0.14em ${xcolors.base08}, - 0 0 0.27em ${xcolors.base08}, - 0 0 0.41em ${xcolors.base08}, - 0 0 0.55em ${xcolors.base08}, - 0 0 0.68em ${xcolors.base08}; + color: alpha(${xcolors.color4}, 0.8); } #backlight, @@ -288,8 +285,8 @@ in { #pulseaudio.microphone, #tray, #user { - color: alpha(${xcolors.base05}, 0.8); - background-color: alpha(${xcolors.base00}, 0.2); + color: alpha(${xcolors.foreground}, 0.8); + background-color: alpha(${xcolors.background}, 0.4); border-radius: 4px; margin: 0.41em 0.21em; padding: 0.41em 0.82em; @@ -311,7 +308,7 @@ in { min-height: 0.68em; min-width: 5.47em; border-radius: 8px; - background-color: alpha(${xcolors.base00}, 0.2); + background-color: alpha(${xcolors.background}, 0.4); } #backlight-slider highlight, @@ -321,26 +318,26 @@ in { } #backlight-slider highlight { - background-color: alpha(${xcolors.base0B}, 0.8); + background-color: alpha(${xcolors.color4}, 0.8); box-shadow: - 0 0 0.14em ${xcolors.base0B}, - 0 0 0.27em ${xcolors.base0B}, - 0 0 0.41em ${xcolors.base0B}, - 0 0 0.55em ${xcolors.base0B}; + 0 0 0.14em ${xcolors.color4}, + 0 0 0.27em ${xcolors.color4}, + 0 0 0.41em ${xcolors.color4}, + 0 0 0.55em ${xcolors.color4}; } #pulseaudio-slider highlight { - background-color: alpha(${xcolors.base0A}, 0.8); + background-color: alpha(${xcolors.color5}, 0.8); box-shadow: - 0 0 0.14em ${xcolors.base0A}, - 0 0 0.27em ${xcolors.base0A}, - 0 0 0.41em ${xcolors.base0A}, - 0 0 0.55em ${xcolors.base0A}; + 0 0 0.14em ${xcolors.color5}, + 0 0 0.27em ${xcolors.color5}, + 0 0 0.41em ${xcolors.color5}, + 0 0 0.55em ${xcolors.color5}; } tooltip { - color: alpha(${xcolors.base05}, 0.8); - background-color: alpha(${xcolors.base00}, 0.2); + color: alpha(${xcolors.foreground}, 0.8); + background-color: alpha(${xcolors.background}, 0.4); font-family: "Dosis", sans-serif; border-radius: 8px; padding: 1.37em; diff --git a/home/modules/windowManager/hyprland/programs/wofi.nix b/home/modules/windowManager/hyprland/programs/wofi.nix index c7279af1..ff1e418a 100644 --- a/home/modules/windowManager/hyprland/programs/wofi.nix +++ b/home/modules/windowManager/hyprland/programs/wofi.nix @@ -32,14 +32,14 @@ } #window { - background: alpha(${xcolors.base00}, 0.2); + background: alpha(${xcolors.background}, 0.2); border-radius: 12px; } #input { border-radius: 12px; - border: 1px solid alpha(${xcolors.base0C}, 0.8); - background: alpha(${xcolors.base00}, 0.2); + border: 1px solid alpha(${xcolors.color4}, 0.8); + background: alpha(${xcolors.background}, 0.2); padding: 0.75em; margin-bottom: 1.5em; } @@ -50,7 +50,7 @@ #text { margin: 0.25em; - color: alpha(${xcolors.base05}, 0.8); + color: alpha(${xcolors.foreground}, 0.8); } #img { @@ -64,7 +64,7 @@ } #entry:selected { - background: alpha(${xcolors.base00}, 0.2); + background: alpha(${xcolors.background}, 0.2); font-weight: bold; } ''; diff --git a/home/modules/windowManager/hyprland/services/dunst.nix b/home/modules/windowManager/hyprland/services/dunst.nix index dcb0ac06..71515e95 100644 --- a/home/modules/windowManager/hyprland/services/dunst.nix +++ b/home/modules/windowManager/hyprland/services/dunst.nix @@ -121,23 +121,23 @@ in { fullscreen_delay_everything.fullscreen = "delay"; urgency_low = { - background = "${xcolors.base00}33"; - foreground = "${xcolors.base05}CC"; - highlight = "${xcolors.base0C}CC"; + background = "${xcolors.background}33"; + foreground = "${xcolors.foreground}CC"; + highlight = "${xcolors.color4}CC"; timeout = 2; }; urgency_normal = { - background = "${xcolors.base00}33"; - foreground = "${xcolors.base05}CC"; - highlight = "${xcolors.base0C}CC"; + background = "${xcolors.background}33"; + foreground = "${xcolors.foreground}CC"; + highlight = "${xcolors.color4}CC"; timeout = 2; }; urgency_critical = { - background = "${xcolors.base08}33"; - foreground = "${xcolors.base05}CC"; - highlight = "${xcolors.base0C}CC"; + background = "${xcolors.color1}33"; + foreground = "${xcolors.foreground}CC"; + highlight = "${xcolors.color4}CC"; timeout = 10; }; }; diff --git a/modules/theme/base16-schemes/everforest.nix b/modules/theme/base16-schemes/everforest.nix deleted file mode 100644 index af05090f..00000000 --- a/modules/theme/base16-schemes/everforest.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - colors = { - base00 = "272e33"; - base01 = "2e383c"; - base02 = "414b50"; - base03 = "859289"; - base04 = "9da9a0"; - base05 = "d3c6aa"; - base06 = "e4e1cd"; - base07 = "fdf6e3"; - base08 = "7fbbb3"; - base09 = "d699b6"; - base0A = "dbbc7f"; - base0B = "83c092"; - base0C = "e69875"; - base0D = "a7c080"; - base0E = "e67e80"; - base0F = "4C3743"; - }; -} diff --git a/modules/theme/colorscheme.nix b/modules/theme/colorscheme.nix index d8bc58f3..d4d55864 100644 --- a/modules/theme/colorscheme.nix +++ b/modules/theme/colorscheme.nix @@ -3,24 +3,10 @@ in { options.colorscheme = mkOption { type = types.submodule { - options = { - author = mkOption { - type = types.str; - default = ""; - description = "Author of the theme"; - }; - - name = mkOption { - type = types.str; - default = ""; - description = "Name of the theme"; - }; - - colors = mkOption { - type = types.attrsOf types.str; - default = {}; - description = "Base16 representation of the theme"; - }; + options.colors = mkOption { + type = types.attrsOf types.str; + default = {}; + description = "Base16 representation of the theme"; }; }; default = {}; diff --git a/modules/theme/default.nix b/modules/theme/default.nix index a4821ff4..08a0e047 100644 --- a/modules/theme/default.nix +++ b/modules/theme/default.nix @@ -4,7 +4,7 @@ ./wallpaper.nix ]; - colorscheme = import ./base16-schemes/everforest.nix; + colorscheme = import ./schemes/everforest.nix; wallpaper = builtins.fetchurl rec { name = "wallpaper-${sha256}.png"; diff --git a/modules/theme/schemes/everforest.nix b/modules/theme/schemes/everforest.nix new file mode 100644 index 00000000..c94bc308 --- /dev/null +++ b/modules/theme/schemes/everforest.nix @@ -0,0 +1,22 @@ +{ + colors = { + foreground = "d3c6aa"; + background = "232a2e"; + color0 = "7a8478"; + color8 = "7a8478"; + color1 = "e67e80"; + color9 = "e67e80"; + color2 = "a7c080"; + color10 = "a7c080"; + color3 = "dbbc7f"; + color11 = "dbbc7f"; + color4 = "7fbbb3"; + color12 = "7fbbb3"; + color5 = "d699b6"; + color13 = "d699b6"; + color6 = "83c092"; + color14 = "83c092"; + color7 = "d3c6aa"; + color15 = "d3c6aa"; + }; +}