From 1c0da4eba94f9c3c28b6db73f04e695df1158467 Mon Sep 17 00:00:00 2001 From: Zoty Date: Sat, 27 Jun 2026 08:59:43 -0300 Subject: [PATCH] correct theming --- modules/_home/{dolphin.nix => apps.nix} | 8 +- modules/_home/niri.nix | 8 ++ modules/_home/theme.nix | 117 +++++++++++++++--------- modules/den.nix | 2 +- modules/niri.nix | 12 +-- 5 files changed, 93 insertions(+), 54 deletions(-) rename modules/_home/{dolphin.nix => apps.nix} (73%) diff --git a/modules/_home/dolphin.nix b/modules/_home/apps.nix similarity index 73% rename from modules/_home/dolphin.nix rename to modules/_home/apps.nix index 21f9cee..7b13f16 100644 --- a/modules/_home/dolphin.nix +++ b/modules/_home/apps.nix @@ -1,5 +1,6 @@ { pkgs, ... }: { home.packages = with pkgs; [ + # File manager + KDE ecosystem kdePackages.dolphin kdePackages.qtwayland kdePackages.kio @@ -9,9 +10,14 @@ kdePackages.ffmpegthumbs kdePackages.kded kdePackages.systemsettings + kdePackages.ksshaskpass ffmpegthumbnailer - ]; + # Desktop utilities + qalculate-gtk + ]; + + # Use KDE file chooser portal for Dolphin integration xdg.configFile."xdg-desktop-portal/niri-portals.conf".text = '' [preferred] default=gnome; diff --git a/modules/_home/niri.nix b/modules/_home/niri.nix index 8e2062f..c472417 100644 --- a/modules/_home/niri.nix +++ b/modules/_home/niri.nix @@ -34,6 +34,14 @@ in { }; home.packages = with pkgs; [ + # Niri session tools + fuzzel + swaylock + swww + rofimoji + libnotify + + # Screenshot stack grim slurp satty diff --git a/modules/_home/theme.nix b/modules/_home/theme.nix index c5afbd1..31d374e 100644 --- a/modules/_home/theme.nix +++ b/modules/_home/theme.nix @@ -1,16 +1,14 @@ -{ pkgs, lib, ... }: { +{ pkgs, ... }: { home.packages = with pkgs; [ - gruvterial-theme + gruvbox-gtk-theme gruvbox-plus-icons - libsForQt5.qt5ct - kdePackages.qt6ct ]; gtk = { enable = true; theme = { - name = "Gruvterial-Dark"; - package = pkgs.gruvterial-theme; + name = "Gruvbox-Dark"; + package = pkgs.gruvbox-gtk-theme; }; iconTheme = { name = "Gruvbox-Plus-Dark"; @@ -20,47 +18,84 @@ qt = { enable = true; - platformTheme.name = "qtct"; - style = { - name = "kvantum"; - package = pkgs.kdePackages.qtstyleplugin-kvantum; - }; + # KDE platform theme: reads kdeglobals for colors, handles KDE app integration. + # qtct has a known bug where qt6ct can't access Kvantum, making it wrong for Dolphin. + platformTheme.name = "kde"; + # QT_STYLE_OVERRIDE=kvantum is set automatically by home-manager. + # Uses qt6Packages.qtstyleplugin-kvantum + libsForQt5.qtstyleplugin-kvantum. + style.name = "kvantum"; }; - xdg.configFile."kvantum/kvantum.kvconfig".text = '' + # Kvantum themes must live in ~/.config/Kvantum/ (capital K, capital V). + # The nix user-environment strips share/Kvantum from the profile merge, so the + # package alone is not enough — the theme directory must be linked explicitly. + xdg.configFile."Kvantum/Gruvbox-Dark-Brown".source = + "${pkgs.gruvbox-kvantum}/share/Kvantum/Gruvbox-Dark-Brown"; + + xdg.configFile."Kvantum/kvantum.kvconfig".text = '' [General] - theme=KvDark + theme=Gruvbox-Dark-Brown ''; - xdg.configFile."qt5ct/qt5ct.conf".text = '' - [Appearance] - style=kvantum - icon_theme=Gruvbox-Plus-Dark - standard_dialogs=default - custom_palette=false + # KDE color scheme aligned to gruvbox-gtk-theme's Gruvbox Dark palette so + # Dolphin and other KDE apps share the same background and accent colors as + # GTK apps like qalculate-gtk. + xdg.configFile."kdeglobals".text = '' + [Colors:Window] + BackgroundNormal=#282828 + BackgroundAlternate=#32302f + ForegroundNormal=#ebdbb2 + ForegroundInactive=#a89984 + ForegroundActive=#ebdbb2 + DecorationHover=#7daea3 + DecorationFocus=#7daea3 - [Interface] - menus_have_icons=true - buttons_have_icons=true - toolbutton_style=4 - activate_item_on_single_click=1 - underline_shortcut=1 + [Colors:Button] + BackgroundNormal=#3c3836 + BackgroundAlternate=#32302f + ForegroundNormal=#ebdbb2 + ForegroundInactive=#a89984 + DecorationHover=#7daea3 + DecorationFocus=#7daea3 + + [Colors:View] + BackgroundNormal=#1d2021 + BackgroundAlternate=#282828 + ForegroundNormal=#ebdbb2 + ForegroundInactive=#a89984 + ForegroundActive=#7daea3 + ForegroundLink=#83a598 + ForegroundVisited=#b16286 + DecorationHover=#7daea3 + DecorationFocus=#7daea3 + + [Colors:Selection] + BackgroundNormal=#7daea3 + BackgroundAlternate=#689d6a + ForegroundNormal=#1d2021 + ForegroundInactive=#1d2021 + + [Colors:Tooltip] + BackgroundNormal=#32302f + ForegroundNormal=#fbf1c7 + + [Colors:Complementary] + BackgroundNormal=#1d2021 + ForegroundNormal=#ebdbb2 + + [Icons] + Theme=Gruvbox-Plus-Dark + + [General] + ColorScheme=GruvboxDark + Name=Gruvbox Dark + + [KDE] + contrast=5 ''; - xdg.configFile."qt6ct/qt6ct.conf".text = '' - [Appearance] - style=kvantum - icon_theme=Gruvbox-Plus-Dark - standard_dialogs=default - custom_palette=false - - [Interface] - menus_have_icons=true - buttons_have_icons=true - toolbutton_style=4 - activate_item_on_single_click=1 - underline_shortcut=1 - ''; - - home.sessionVariables.QT_QPA_PLATFORMTHEME = lib.mkForce "qt6ct"; + home.sessionVariables = { + SSH_ASKPASS = "${pkgs.kdePackages.ksshaskpass}/bin/ksshaskpass"; + SSH_ASKPASS_REQUIRE = "prefer"; + }; } diff --git a/modules/den.nix b/modules/den.nix index 90a8079..792a4f4 100644 --- a/modules/den.nix +++ b/modules/den.nix @@ -104,7 +104,7 @@ in { ./_home/niri.nix ./_home/cursor.nix ./_home/git.nix - ./_home/dolphin.nix + ./_home/apps.nix ./_home/theme.nix ./_home/xdg-dirs.nix ]; diff --git a/modules/niri.nix b/modules/niri.nix index cce4922..a5df385 100644 --- a/modules/niri.nix +++ b/modules/niri.nix @@ -13,20 +13,10 @@ environment.systemPackages = with pkgs; [ quickshell-niri - fuzzel - swaylock - swayidle - swww - grim - slurp - wl-clipboard xdg-desktop-portal-gnome xwayland-satellite gpu-screen-recorder-gtk - libnotify - qalculate-gtk - rofimoji - ]; + ]; xdg.portal = { enable = true;