mainly styling things

This commit is contained in:
xunuwu 2024-10-30 09:13:46 +01:00
parent 06397e1f66
commit 48f90b854a
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
16 changed files with 379 additions and 149 deletions

View file

@ -1,71 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.xun.desktop;
dark = {
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
gtk = {
theme = {
package = pkgs.gnome-themes-extra;
name = "Adwaita-dark";
};
iconTheme = {
package = pkgs.adwaita-icon-theme;
name = "Adwaita-dark";
};
gtk2.extraConfig = "gtk-application-prefer-dark-theme=1";
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
};
qt = {
platformTheme.name = "gtk3";
style = {
name = "Adwaita-dark";
package = pkgs.adwaita-qt;
};
};
};
light = {
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-light";
gtk = {
theme = {
package = pkgs.gnome-themes-extra;
name = "Adwaita";
};
iconTheme = {
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
};
gtk2.extraConfig = "gtk-application-prefer-dark-theme=false";
gtk3.extraConfig.gtk-application-prefer-dark-theme = 0;
gtk4.extraConfig.gtk-application-prefer-dark-theme = 0;
};
qt = {
style = {
name = "adwaita";
package = pkgs.adwaita-qt;
};
};
};
in {
options.xun.desktop.colorscheme = lib.mkOption {
default = null;
type = lib.types.enum [null "dark" "light"]; # might add more in the future
};
config = lib.mkIf (cfg.colorscheme != null) (lib.mkMerge [
(lib.mkIf (cfg.colorscheme == "dark") dark)
(lib.mkIf (cfg.colorscheme == "light") light)
]);
# config = lib.mkIf (cfg.colorscheme != null) (let
# switch = {
# dark = {};
# light = {};
# };
# in
# switch."${toString cfg.colorscheme}");
}

View file

@ -6,50 +6,32 @@
}: let
cfg = config.xun.desktop;
in {
imports = [
./colorscheme
];
options.xun.desktop = {
xdg.enable = lib.mkEnableOption "xdg env vars";
# colorscheme = lib.mkOption {
# default = null;
# type = lib.types.enum ["dark" "light"];
# };
};
config = lib.mkMerge [
# (let
# switch = {
# "dark" = {};
# "light" = {};
# };
# in
# switch."${toString cfg.colorscheme}")
config = lib.mkIf cfg.xdg.enable {
xdg = let
home = config.home.homeDirectory;
in {
enable = true;
cacheHome = config.home.homeDirectory + "/.local/cache";
(lib.mkIf cfg.xdg.enable {
xdg = let
home = config.home.homeDirectory;
in {
userDirs = {
enable = true;
cacheHome = config.home.homeDirectory + "/.local/cache";
userDirs = {
enable = true;
desktop = home + "/desktop";
documents = home + "/docs";
download = home + "/down";
music = home + "/music";
pictures = home + "/pics";
publicShare = home + "/share";
videos = home + "/vids";
extraConfig = {
XDG_SCREENSHOTS_DIR = config.xdg.userDirs.pictures + "/screenshots";
};
desktop = home + "/desktop";
documents = home + "/docs";
download = home + "/down";
music = home + "/music";
pictures = home + "/pics";
publicShare = home + "/share";
videos = home + "/vids";
extraConfig = {
XDG_SCREENSHOTS_DIR = config.xdg.userDirs.pictures + "/screenshots";
};
};
};
home.packages = [pkgs.xdg-utils];
})
];
home.packages = [pkgs.xdg-utils];
};
}