From 6f9f670e8ea6011084eea240e3742287eb46cb73 Mon Sep 17 00:00:00 2001 From: Felix Schulze Date: Fri, 20 Jun 2025 12:41:49 +0200 Subject: [PATCH] wildfire: 241 current 2025-06-20 12:41:45 25.05.20250617.36ab78d 6.15.2 * hyprland and rofi (theme) colors WIP --- modules/home/hyprland.nix | 14 ++++++--- modules/home/rofi.nix | 61 ++++++++++++++++++++++++++++++--------- 2 files changed, 57 insertions(+), 18 deletions(-) diff --git a/modules/home/hyprland.nix b/modules/home/hyprland.nix index b882509..095133f 100644 --- a/modules/home/hyprland.nix +++ b/modules/home/hyprland.nix @@ -1,4 +1,6 @@ -{ +let + colors = import ../gruvbox-theme.nix; +in { # Hyprland settings wayland.windowManager.hyprland = { enable = true; @@ -21,14 +23,14 @@ "$mod" = "SUPER"; "$terminal" = "ghostty"; "$filemanager" = "nautilus"; - "$menu" = "rofi -show drun"; + "$menu" = "rofi -show-icons -show drun"; general = { gaps_in = 5; gaps_out = 15; border_size = 1; - "col.active_border" = "rgba(fe8019ff) rgba(cc241dff) 45deg"; - "col.inactive_border" = "rgba(7c6f64aa)"; + "col.active_border" = "rgba(${colors.gruvbox-rgb.bright_orange}, 1.0) rgba(${colors.gruvbox-rgb.red}, 1.0) 45deg"; + "col.inactive_border" = "rgba(${colors.gruvbox-rgb.bg4}, 0.66)"; layout = "dwindle"; allow_tearing = false; }; @@ -65,10 +67,14 @@ # Window rules windowrulev2 = [ + # Nice transparency for some apps "opacity 0.9,class:^(cursor)$" "opacity 0.9,class:^(firefox)$" "opacity 0.9,class:^(GitKraken)$" "opacity 0.9,class:^(obsidian)$" + + # Keep Rofi focused + "stayfocused, class:^(Rofi)$" ]; # Bindings diff --git a/modules/home/rofi.nix b/modules/home/rofi.nix index ca28051..65a4b8f 100644 --- a/modules/home/rofi.nix +++ b/modules/home/rofi.nix @@ -1,4 +1,6 @@ -{config, ...}: { +{config, ...}: let + colors = import ../gruvbox-theme.nix; +in { programs.rofi = { enable = true; modes = [ @@ -6,20 +8,20 @@ "window" ]; terminal = "ghostty"; + font = "Intel One Mono 14"; + location = "center"; theme = let inherit (config.lib.formats.rasi) mkLiteral; in { "*" = { - font = "Intel One Mono 14"; - border = 0; margin = 0; padding = 0; spacing = 0; - bg0 = mkLiteral "#282828f2"; + bg0 = mkLiteral "#2828289A"; bg1 = mkLiteral "#3c3836"; bg2 = mkLiteral "#50494580"; - bg3 = mkLiteral "#665c54f2"; + bg3 = mkLiteral "#665c549A"; fg0 = mkLiteral "#fbf1c7"; fg1 = mkLiteral "#ebdbb2"; @@ -31,13 +33,17 @@ blue-alt = mkLiteral "#458588"; orange-alt = mkLiteral "#fe8019"; - background-color = mkLiteral "@bg0"; + background-color = mkLiteral "transparent"; text-color = mkLiteral "@fg0"; }; "window" = { background-color = mkLiteral "@bg0"; #transparency = mkLiteral "'real'"; + + width = mkLiteral "480"; + border-radius = mkLiteral "8px"; + border = mkLiteral "1px solid @bg3"; }; "mainbox" = { @@ -50,6 +56,7 @@ border-color = mkLiteral "@bg3"; border = mkLiteral "2px"; + border-radius = mkLiteral "4px"; padding = mkLiteral "8px 16px"; spacing = mkLiteral "8px"; @@ -65,22 +72,42 @@ placeholder-color = mkLiteral "@fg3"; }; + "message" = { + margin = mkLiteral "12px 0 0"; + border-radius = mkLiteral "4px"; + border-color = mkLiteral "@bg2"; + background-color = mkLiteral "@bg2"; + }; + + "textbox" = { + padding = mkLiteral "8px 24px"; + }; + "listview" = { background-color = mkLiteral "transparent"; margin = mkLiteral "12px 0 0"; - columns = 1; lines = 10; + columns = 1; }; "element" = { - border = mkLiteral "0 0 0 2px"; padding = mkLiteral "8px 16px"; spacing = mkLiteral "8px"; + border-radius = mkLiteral "4px"; + #border = mkLiteral "0 0 0 2px"; + #spacing = mkLiteral "8px"; }; - "element selected" = { - text-color = mkLiteral "@bg1"; - border-color = mkLiteral "@orange"; + "element normal active" = { + text-color = mkLiteral "@bg3"; + }; + + "element alternate active" = { + text-color = mkLiteral "@bg3"; + }; + + "element selected normal, element selected active" = { + background-color = mkLiteral "@bg3"; }; "element-icon" = { @@ -89,12 +116,18 @@ }; "element-text" = { - padding = mkLiteral "10px"; + text-color = mkLiteral "inherit"; + #padding = mkLiteral "10px"; + }; + + "element selected" = { + #text-color = mkLiteral "@bg1"; + #border-color = mkLiteral "@orange"; }; "element-text.selected" = { - background-color = mkLiteral "@orange-alt"; - text-color = mkLiteral "@orange"; + #background-color = mkLiteral "@orange-alt"; + #text-color = mkLiteral "@orange"; }; }; };