From 761637570003ff9c7f124769dbee613a1d383f63 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Wed, 26 Mar 2025 19:16:28 +0100 Subject: [PATCH] options/style: delete --- modules/options/style/gtk.nix | 37 ------------------------ modules/options/style/module.nix | 35 ----------------------- modules/options/style/qt.nix | 32 --------------------- modules/style/gtk.nix | 40 +++++++++++++++++++++++--- modules/style/qt.nix | 41 +++++++++++++++++++-------- modules/wms/wayland/hyprland/exec.nix | 4 +-- 6 files changed, 67 insertions(+), 122 deletions(-) delete mode 100644 modules/options/style/gtk.nix delete mode 100644 modules/options/style/module.nix delete mode 100644 modules/options/style/qt.nix diff --git a/modules/options/style/gtk.nix b/modules/options/style/gtk.nix deleted file mode 100644 index 4a61f65..0000000 --- a/modules/options/style/gtk.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - lib, - pkgs, - ... -}: let - inherit (lib) mkOption mkEnableOption; - inherit (lib.types) str package; -in { - options.modules.usrEnv.style.gtk = { - enable = mkEnableOption "Wether to enable GTK theming"; - theme = { - name = mkOption { - description = "The GTK theme name"; - default = "Gruvbox-Dark-BL"; - type = str; - }; - package = mkOption { - description = "The GTK theme package"; - default = pkgs.gruvbox-gtk-theme; - type = package; - }; - }; - iconTheme = { - description = "The GTK icon theme"; - name = mkOption { - description = "The GTK icon theme name"; - default = "Papirus-Dark"; - type = str; - }; - package = mkOption { - description = "The GTK icon theme package"; - default = pkgs.catppuccin-papirus-folders; - type = package; - }; - }; - }; -} diff --git a/modules/options/style/module.nix b/modules/options/style/module.nix deleted file mode 100644 index 1800d2f..0000000 --- a/modules/options/style/module.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - pkgs, - lib, - ... -}: let - inherit (lib) mkOption; - inherit (lib.types) package str int; -in { - imports = [ - ./qt.nix - ./gtk.nix - ./fonts.nix - ./colors.nix - ]; - - options.modules.style = { - cursor = { - package = mkOption { - type = package; - default = pkgs.bibata-cursors; - description = "Cursor package"; - }; - name = mkOption { - type = str; - default = "Bibata-Modern-Classic"; - description = "Cursor name"; - }; - size = mkOption { - type = int; - default = 32; - description = "Cursor size"; - }; - }; - }; -} diff --git a/modules/options/style/qt.nix b/modules/options/style/qt.nix deleted file mode 100644 index 58ce50c..0000000 --- a/modules/options/style/qt.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - lib, - pkgs, - ... -}: let - inherit (lib) mkEnableOption mkOption; - inherit (lib.types) str package; -in { - options.modules.usrEnv.style.qt = { - enable = mkEnableOption "qt theming"; - name = mkOption { - description = "qt theme name"; - default = "Catppuccin-Mocha-Dark"; - type = str; - }; - variant = mkOption { - description = "qt theme variant"; - default = "mocha"; - type = str; - }; - accentColor = mkOption { - description = "accent colour for qt theme"; - default = "green"; - type = str; - }; - package = mkOption { - description = "qt theme package"; - default = pkgs.catppuccin-kde; - type = package; - }; - }; -} diff --git a/modules/style/gtk.nix b/modules/style/gtk.nix index eaaec5f..d079c06 100644 --- a/modules/style/gtk.nix +++ b/modules/style/gtk.nix @@ -1,12 +1,44 @@ { config, lib, + pkgs, ... -}: -with lib; let - cfg = config.modules.usrEnv.style.gtk; +}: let + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) str package; + inherit (lib.modules) mkIf; + cfg = config.modules.theme.gtk; in { + options.modules.theme.gtk = { + enable = mkEnableOption "Wether to enable GTK theming"; + theme = { + name = mkOption { + description = "The GTK theme name"; + default = "Gruvbox-Dark-BL"; + type = str; + }; + package = mkOption { + description = "The GTK theme package"; + default = pkgs.gruvbox-gtk-theme; + type = package; + }; + }; + iconTheme = { + description = "The GTK icon theme"; + name = mkOption { + description = "The GTK icon theme name"; + default = "Papirus-Dark"; + type = str; + }; + package = mkOption { + description = "The GTK icon theme package"; + default = pkgs.catppuccin-papirus-folders; + type = package; + }; + }; + }; config = mkIf cfg.enable { - programs.dconf.enable = true; # NOTE: we need this or gtk breaks + # NOTE: we need this or gtk breaks + programs.dconf.enable = true; }; } diff --git a/modules/style/qt.nix b/modules/style/qt.nix index 1c9ea18..f33872c 100644 --- a/modules/style/qt.nix +++ b/modules/style/qt.nix @@ -3,20 +3,37 @@ lib, pkgs, ... -}: -with lib; let - theme = { - package = pkgs.gruvbox-gtk-theme; - name = "Gruvbox-Dark-BL"; - }; +}: let + inherit (lib.modules) mkIf; + inherit (lib) mkEnableOption mkOption; + inherit (lib.types) str package; cfg = config.modules.usrEnv.style.qt; in { - config = mkIf cfg.enable { - environment.sessionVariables = {QT_QPA_PLATFORMTHEME = "qt5ct";}; - - environment.variables = { - QT_STYLE_OVERRIDE = lib.mkForce "kvantum"; - GTK_THEME = theme.name; + options.modules.usrEnv.style.qt = { + enable = mkEnableOption "qt theming"; + name = mkOption { + description = "qt theme name"; + default = "Catppuccin-Mocha-Dark"; + type = str; + }; + variant = mkOption { + description = "qt theme variant"; + default = "mocha"; + type = str; + }; + accentColor = mkOption { + description = "accent colour for qt theme"; + default = "green"; + type = str; + }; + package = mkOption { + description = "qt theme package"; + default = pkgs.catppuccin-kde; + type = package; }; }; + + config = + mkIf cfg.enable { + }; } diff --git a/modules/wms/wayland/hyprland/exec.nix b/modules/wms/wayland/hyprland/exec.nix index f427a93..76d925b 100644 --- a/modules/wms/wayland/hyprland/exec.nix +++ b/modules/wms/wayland/hyprland/exec.nix @@ -3,14 +3,14 @@ pkgs, ... }: let - inherit (config.modules.style) cursor; + # inherit (config.modules.style) cursor; inherit (builtins) toString; in { programs.hyprland.settings = { # Hyprland settings # Programs which get executed at Hyprland start. exec-once = [ - "hyprctl setcursor ${cursor.name} ${toString cursor.size}" + # "hyprctl setcursor ${cursor.name} ${toString cursor.size}" "[workspace special:keepassxc; silent;tile] ${pkgs.keepassxc}/bin/keepassxc" "[workspace special:audio; silent;tile] ${pkgs.pwvucontrol}/bin/pwvucontrol"