refactor
This commit is contained in:
91
modules/home/userd/gtk/default.nix
Normal file
91
modules/home/userd/gtk/default.nix
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
packages = [pkgs.glib]; # gsettings
|
||||
pointerCursor = {
|
||||
# package = pkgs.catppuccin-cursors.latteDark;
|
||||
# name = "catppuccin-latte-dark-cursors";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
size = 28;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
};
|
||||
};
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
package = pkgs.orchis-theme;
|
||||
name = "Orchis-Grey-Dark-Compact";
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
};
|
||||
font = {
|
||||
name = "Input Sans Narrow Light";
|
||||
size = 10;
|
||||
};
|
||||
cursorTheme = {
|
||||
# package = pkgs.catppuccin-cursors.latteDark;
|
||||
# name = "catppuccin-latte-dark-cursors";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
size = 28;
|
||||
};
|
||||
|
||||
gtk2 = {
|
||||
configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
extraConfig = ''
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle="hintslight"
|
||||
gtk-xft-rgba="rgb"
|
||||
'';
|
||||
};
|
||||
|
||||
gtk3.extraConfig = {
|
||||
# Lets be easy on the eyes. This should be easy to make dependent on
|
||||
# the "variant" of the theme, but I never use a light theme anyway.
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
|
||||
# Decorations
|
||||
gtk-decoration-layout = "appmenu:none";
|
||||
gtk-toolbar-style = "GTK_TOOLBAR_BOTH";
|
||||
gtk-toolbar-icon-size = "GTK_ICON_SIZE_LARGE_TOOLBAR";
|
||||
gtk-button-images = 1;
|
||||
gtk-menu-images = 1;
|
||||
|
||||
# Silence bells and whistles, quite literally.
|
||||
gtk-error-bell = 0;
|
||||
gtk-enable-event-sounds = 0;
|
||||
gtk-enable-input-feedback-sounds = 0;
|
||||
|
||||
# Fonts
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintslight";
|
||||
};
|
||||
|
||||
gtk4.extraConfig = {
|
||||
# Prefer dark theme.
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
|
||||
# Decorations.
|
||||
gtk-decoration-layout = "appmenu:none";
|
||||
|
||||
# Sounds, again.
|
||||
gtk-error-bell = 0;
|
||||
gtk-enable-event-sounds = 0;
|
||||
gtk-enable-input-feedback-sounds = 0;
|
||||
|
||||
# Fonts, you know the drill.
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintslight";
|
||||
};
|
||||
};
|
||||
}
|
||||
140
modules/home/userd/gtk/wip.nix
Normal file
140
modules/home/userd/gtk/wip.nix
Normal file
@@ -0,0 +1,140 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) types mkOption mkIf;
|
||||
cfg = config.home.userd.gtk;
|
||||
in {
|
||||
options = {
|
||||
home.userd.gtk.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable GTK configuration.";
|
||||
};
|
||||
|
||||
home.userd.gtk.theme = mkOption {
|
||||
type = types.str;
|
||||
default = "Orchis-Grey-Dark-Compact";
|
||||
description = "GTK theme name.";
|
||||
};
|
||||
|
||||
home.userd.gtk.themePackage = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.orchis-theme;
|
||||
description = "GTK theme package.";
|
||||
};
|
||||
|
||||
home.userd.gtk.iconTheme = mkOption {
|
||||
type = types.str;
|
||||
default = "Adwaita";
|
||||
description = "GTK icon theme name.";
|
||||
};
|
||||
|
||||
home.userd.gtk.iconThemePackage = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.adwaita-icon-theme;
|
||||
description = "GTK icon theme package.";
|
||||
};
|
||||
|
||||
home.userd.gtk.font = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
default = {
|
||||
name = "Input Sans Narrow Light";
|
||||
size = 10;
|
||||
};
|
||||
description = "GTK font configuration.";
|
||||
};
|
||||
|
||||
home.userd.gtk.cursorTheme = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
default = {
|
||||
name = "Adwaita";
|
||||
size = 28;
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
};
|
||||
description = "Cursor theme configuration.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home = {
|
||||
packages = [pkgs.glib];
|
||||
|
||||
pointerCursor = {
|
||||
package = cfg.cursorTheme.package;
|
||||
name = cfg.cursorTheme.name;
|
||||
size = cfg.cursorTheme.size;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
theme = {
|
||||
package = cfg.themePackage;
|
||||
name = cfg.theme;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = cfg.iconThemePackage;
|
||||
name = cfg.iconTheme;
|
||||
};
|
||||
|
||||
font = {
|
||||
name = cfg.font.name;
|
||||
size = cfg.font.size;
|
||||
};
|
||||
|
||||
cursorTheme = {
|
||||
package = cfg.cursorTheme.package;
|
||||
name = cfg.cursorTheme.name;
|
||||
size = cfg.cursorTheme.size;
|
||||
};
|
||||
|
||||
gtk2 = {
|
||||
extraConfig = ''
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle="hintslight"
|
||||
gtk-xft-rgba="rgb"
|
||||
'';
|
||||
};
|
||||
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
|
||||
gtk-decoration-layout = "appmenu:none";
|
||||
gtk-toolbar-style = "GTK_TOOLBAR_BOTH";
|
||||
gtk-toolbar-icon-size = "GTK_ICON_SIZE_LARGE_TOOLBAR";
|
||||
gtk-button-images = 1;
|
||||
gtk-menu-images = 1;
|
||||
|
||||
gtk-error-bell = 0;
|
||||
gtk-enable-event-sounds = 0;
|
||||
gtk-enable-input-feedback-sounds = 0;
|
||||
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintslight";
|
||||
};
|
||||
|
||||
gtk4.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
|
||||
gtk-decoration-layout = "appmenu:none";
|
||||
|
||||
gtk-error-bell = 0;
|
||||
gtk-enable-event-sounds = 0;
|
||||
gtk-enable-input-feedback-sounds = 0;
|
||||
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintslight";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user