{ config, lib, pkgs, namespace, ... }: let cfg = config.${namespace}.desktop.plasma; in { imports = [ ./options.nix ]; config = lib.mkIf cfg.enable { home.packages = (with pkgs.kdePackages; [ plasma-browser-integration kdeplasma-addons ]) ++ [ # Caffeine-like tray applet: inhibits screensaver and sleep on demand pkgs.caffeine-ng ]; programs.plasma = { enable = true; configFile.kded5rc = { "Module-gtkconfig"."autoload" = false; }; # workspace = { # colorScheme = "BreezeDark"; # cursor = { # theme = "breeze_cursors"; # size = 24; # }; # iconTheme = "breeze-dark"; # theme = "breeze-dark"; # lookAndFeel = "org.kde.breezedark.desktop"; # # Explicitly set Breeze to prevent QT_STYLE_OVERRIDE=kvantum (set by # # Stylix's qt6ct target) from being picked up by KWin/plasmashell, which # # would cause a fatal "module kvantum is not installed" QML error and # # leave the desktop blank. # widgetStyle = "Breeze"; # }; # # input.mice and input.touchpads require device-specific vendorId/productId # # identifiers — configure those per-host in the home config instead. kscreenlocker = { autoLock = true; timeout = 10; }; kwin = { effects = { shakeCursor.enable = false; }; nightLight = { enable = true; mode = "automatic"; temperature = { day = 6500; night = 3500; }; }; virtualDesktops = { number = 4; rows = 1; }; }; # panels = [ # { # location = "bottom"; # floating = true; # height = 44; # widgets = [ # "org.kde.plasma.kickoff" # "org.kde.plasma.icontasks" # "org.kde.plasma.marginsseparator" # "org.kde.plasma.systemtray" # "org.kde.plasma.digitalclock" # ]; # } # ]; shortcuts = { kwin = { "Switch to Desktop 1" = "Meta+1"; "Switch to Desktop 2" = "Meta+2"; "Switch to Desktop 3" = "Meta+3"; "Switch to Desktop 4" = "Meta+4"; "Window to Desktop 1" = "Meta+Shift+1"; "Window to Desktop 2" = "Meta+Shift+2"; "Window to Desktop 3" = "Meta+Shift+3"; "Window to Desktop 4" = "Meta+Shift+4"; "Toggle Overview" = "Meta+Tab"; }; }; }; }; }