split theme into its own module and add xdg configuration
This commit is contained in:
parent
7f692459a9
commit
4acb6e2408
|
@ -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 = {
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
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;
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"application/pdf" = with pkgs; ["qpdfview"];
|
||||
"text/uri-list" = with pkgs; ["firefox"];
|
||||
"x-scheme-handler/file" = with pkgs; ["kitty"];
|
||||
};
|
||||
};
|
||||
|
||||
#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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
43
home/modules/gui/theme.nix
Normal file
43
home/modules/gui/theme.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue