split theme into its own module and add xdg configuration

This commit is contained in:
Fabian Montero 2025-01-27 19:01:09 -06:00
parent 7f692459a9
commit 4acb6e2408
Signed by: fabian
GPG key ID: 1FFAC35E1798174F
3 changed files with 53 additions and 49 deletions

View file

@ -13,17 +13,6 @@ in {
config = mkIf cfg.enable {
xdg = {
enable = true;
mimeApps = {
enable = true;
defaultApplications = {};
};
portal = {
# this shouldnt be on baseline, as servers have no GUI
enable = true;
xdgOpenUsePortal = true;
extraPortals = with pkgs; [xdg-desktop-portal-gtk]; #wtf is this
configPackages = with pkgs; [xdg-desktop-portal-gtk]; #wtf is this
};
};
home = {

View file

@ -81,8 +81,9 @@ in {
./fonts.nix
./i3.nix
./polybar.nix
./startx.nix # move to ly once 24.11 comes out :(
./startx.nix
./picom.nix
./theme.nix
];
config = let
@ -113,45 +114,16 @@ in {
picom.enable = true;
};
gtk = {
xdg = {
enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
mimeApps = {
enable = true;
defaultApplications = {
"application/pdf" = with pkgs; ["qpdfview"];
"text/uri-list" = with pkgs; ["firefox"];
"x-scheme-handler/file" = with pkgs; ["kitty"];
};
};
theme = {
package = pkgs.materia-theme;
name = "Materia-dark";
};
gtk2.extraConfig = ''
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-menu-images=1
gtk-button-images=1
'';
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
#qt = { mentioning qt makes qt applications not work, I should probably check how to fix this
# enable = true;
# style.name = "bb10dark";
#};
home.sessionVariables = {
# Use gtk in jvm apps
_JAVA_OPTIONS = concatStringsSep " " [
"-Dawt.useSystemAAFontSettings=on"
"-Dswing.aatext=true"
"-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
"-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
];
};
};
}

View file

@ -0,0 +1,43 @@
{
config,
lib,
pkgs,
...
}:
with lib; {
gtk = {
enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
theme = {
package = pkgs.materia-theme;
name = "Materia-dark";
};
gtk2.extraConfig = ''
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-menu-images=1
gtk-button-images=1
'';
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
home.sessionVariables = {
# Use gtk in jvm apps
_JAVA_OPTIONS = concatStringsSep " " [
"-Dawt.useSystemAAFontSettings=on"
"-Dswing.aatext=true"
"-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
"-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
];
};
}