style: big gtk rework
I hate gtk
This commit is contained in:
parent
304f14ac57
commit
e03b8873cb
3 changed files with 58 additions and 19 deletions
|
@ -58,7 +58,6 @@ in {
|
|||
(pkgs)
|
||||
material-icons
|
||||
material-design-icons
|
||||
papirus-icon-theme
|
||||
lexend
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) str package;
|
||||
inherit (lib.modules) mkIf;
|
||||
cfg = config.modules.theme.gtk;
|
||||
cfg = config.modules.theming.gtk;
|
||||
in {
|
||||
options.modules.theme.gtk = {
|
||||
options.modules.theming.gtk = {
|
||||
enable = mkEnableOption "Wether to enable GTK theming";
|
||||
theme = {
|
||||
name = mkOption {
|
||||
|
@ -32,7 +32,7 @@ in {
|
|||
};
|
||||
package = mkOption {
|
||||
description = "The GTK icon theme package";
|
||||
default = pkgs.catppuccin-papirus-folders;
|
||||
default = pkgs.papirus-icon-theme;
|
||||
type = package;
|
||||
};
|
||||
};
|
||||
|
@ -40,5 +40,25 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
# NOTE: we need this or gtk breaks
|
||||
programs.dconf.enable = true;
|
||||
|
||||
environment = {
|
||||
systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
gruvbox-gtk-theme
|
||||
papirus-icon-theme
|
||||
;
|
||||
};
|
||||
variables = let
|
||||
cursorSize = 32;
|
||||
in {
|
||||
GTK_THEME = "Gruvbox-Dark";
|
||||
XCURSOR_THEME = "BreezeX-RosePine-Linux";
|
||||
XCURSOR_SIZE = cursorSize;
|
||||
|
||||
HYPRCURSOR_THEME = "BreezeX-RosePine-Linux";
|
||||
HYPRCURSOR_SIZE = cursorSize;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,9 +7,31 @@
|
|||
inherit (lib.modules) mkMerge mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
cfg = config.modules.theming;
|
||||
inherit (builtins) toString isBool;
|
||||
inherit (lib) boolToString escape generators;
|
||||
|
||||
toGtk3Ini = generators.toINI {
|
||||
mkKeyValue = key: value: let
|
||||
value' =
|
||||
if isBool value
|
||||
then boolToString value
|
||||
else toString value;
|
||||
in "${escape ["="] key}=${value'}";
|
||||
};
|
||||
|
||||
gtkIni = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
gtk-font-name = "Lexend 11";
|
||||
gtk-icon-theme-name = "Papirus-Dark";
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintslight";
|
||||
gtk-xft-rgba = "rgb";
|
||||
gtk-cursor-theme-name = "BreezeX-RosePine-Linux";
|
||||
gtk-theme-name = "Gruvbox-Dark";
|
||||
};
|
||||
in {
|
||||
options.modules.theming = {
|
||||
gtk.enable = mkEnableOption "gtk theming";
|
||||
qt.enable = mkEnableOption "qt theming";
|
||||
};
|
||||
config = mkMerge [
|
||||
|
@ -19,25 +41,23 @@ in {
|
|||
inherit (pkgs) rose-pine-cursor;
|
||||
};
|
||||
etc = {
|
||||
"xdg/gtk-4.0/settings.ini".text = ''
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-cursor-theme-name=BreezeX-RosePine-Linux
|
||||
'';
|
||||
|
||||
"xdg/gtk-3.0/settings.ini".text = ''
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-cursor-theme-name=BreezeX-RosePine-Linux
|
||||
'';
|
||||
"xdg/gtk-4.0/settings.ini".text = toGtk3Ini {
|
||||
Settings = gtkIni;
|
||||
};
|
||||
"xdg/gtk-3.0/settings.ini".text = toGtk3Ini {
|
||||
Settings = gtkIni;
|
||||
};
|
||||
|
||||
"xdg/gtk-2.0/gtkrc".text = ''
|
||||
gtk-cursor-theme-name = "BreezeX-RosePine-Linux"
|
||||
gtk-cursor-theme-size = 30
|
||||
gtk-cursor-theme-name = BreezeX-RosePine-Linux
|
||||
gtk-cursor-theme-size = 32
|
||||
gtk-theme-name = Gruvbox-Dark
|
||||
gtk-icon-theme-name = Papirus-Dark
|
||||
gtk-font-name = Lexend 11
|
||||
'';
|
||||
|
||||
"xdg/Xresources".text = ''
|
||||
Xcursor.size: 30
|
||||
Xcursor.size: 32
|
||||
Xcursor.theme: BreezeX-RosePine-Linux
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue