refactor(desktop): place all theming config in same folder
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-08-05 16:23:53 -04:00
parent 755ef78440
commit 94bd0d81f5
12 changed files with 112 additions and 110 deletions

View file

@ -76,7 +76,7 @@ in {
(import ./home/hyprgrass.nix hyprgrass) (import ./home/hyprgrass.nix hyprgrass)
./home/inputs.nix ./home/inputs.nix
(import ./home/style.nix self) (import ../theme self)
]; ];
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {

View file

@ -1,57 +0,0 @@
self: {
config,
lib,
pkgs,
...
}: {
imports = [
(import ../../home/theme self)
(import ../../home/hyprpaper.nix self)
];
config = let
inherit (lib) mkIf;
cursorTheme = self.legacyPackages.${pkgs.system}.dracula.hyprcursor;
cursorThemeName = "Dracula-cursors";
hyprcursorThemeName = "Dracula-hyprcursor";
cursorSize = "24";
in {
home.file.".local/share/icons/${hyprcursorThemeName}".source = cursorTheme;
wayland.windowManager.hyprland = {
settings =
{
envd = [
"XCURSOR_THEME, ${cursorThemeName}"
"XCURSOR_SIZE, ${cursorSize}"
];
exec-once = [
"hyprctl setcursor ${hyprcursorThemeName} ${cursorSize}"
];
windowrule = [
"size 1231 950,title:^(Open Folder)$"
"float,title:^(Open Folder)$"
"size 1231 950,title:^(Open File)$"
"float,title:^(Open File)$"
];
layerrule = [
"noanim, selection"
];
}
// (
mkIf (config.home.username != "greeter") {
# This file should only be used for theming
source = ["${config.vars.configDir}/hypr/main.conf"];
}
);
};
};
# For accurate stack trace
_file = ./style.nix;
}

View file

@ -43,7 +43,7 @@ in {
({config, ...}: let ({config, ...}: let
symlink = config.lib.file.mkOutOfStoreSymlink; symlink = config.lib.file.mkOutOfStoreSymlink;
configDir = "${flakeDir}/nixosModules/desktop/desktop-environment/config"; configDir = "${flakeDir}/nixosModules/desktop/environment/config";
in { in {
xdg = { xdg = {
configFile = { configFile = {

View file

@ -1,48 +0,0 @@
self: {pkgs, ...}: {
imports = [
./gtk.nix
(import ./qt.nix self)
];
config = let
inherit (self.legacyPackages.${pkgs.system}) dracula;
in {
home.pointerCursor = {
name = "Dracula-cursors";
package = dracula.gtk;
size = 24;
gtk.enable = true;
x11 = {
enable = true;
defaultCursor = "Dracula-cursors";
};
};
xresources.extraConfig = ''
! Dracula Xresources palette
*.foreground: #F8F8F2
*.background: #282A36
*.color0: #000000
*.color8: #4D4D4D
*.color1: #FF5555
*.color9: #FF6E67
*.color2: #50FA7B
*.color10: #5AF78E
*.color3: #F1FA8C
*.color11: #F4F99D
*.color4: #BD93F9
*.color12: #CAA9FA
*.color5: #FF79C6
*.color13: #FF92D0
*.color6: #8BE9FD
*.color14: #9AEDFE
*.color7: #BFBFBF
*.color15: #E6E6E6
'';
};
# For accurate stack trace
_file = ./default.nix;
}

View file

@ -25,7 +25,7 @@ self: {
in { in {
home-manager.users.greeter = { home-manager.users.greeter = {
imports = [ imports = [
(import ../environment/home/style.nix self) (import ../theme self)
]; ];
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {

View file

@ -0,0 +1,41 @@
self: {pkgs, ...}: {
config = let
inherit (self.legacyPackages.${pkgs.system}) dracula;
cursorTheme = dracula.hyprcursor;
cursorThemeName = "Dracula-cursors";
hyprcursorThemeName = "Dracula-hyprcursor";
cursorSize = 24;
in {
home.pointerCursor = {
name = cursorThemeName;
package = dracula.gtk;
size = cursorSize;
gtk.enable = true;
x11 = {
enable = true;
defaultCursor = cursorThemeName;
};
};
home.file.".local/share/icons/${hyprcursorThemeName}".source = cursorTheme;
wayland.windowManager.hyprland = {
settings = {
envd = [
"XCURSOR_THEME, ${cursorThemeName}"
"XCURSOR_SIZE, ${toString cursorSize}"
];
exec-once = [
"hyprctl setcursor ${hyprcursorThemeName} ${toString cursorSize}"
];
};
};
};
# For accurate stack trace
_file = ./cursors.nix;
}

View file

@ -0,0 +1,42 @@
self: {
config,
lib,
...
}: let
inherit (lib) mkIf;
in {
imports = [
./gtk
./xresources.nix
(import ./cursors.nix self)
(import ./qt.nix self)
(import ./hyprpaper.nix self)
];
config.wayland.windowManager.hyprland = {
settings =
{
windowrule = [
"size 1231 950,title:^(Open Folder)$"
"float,title:^(Open Folder)$"
"size 1231 950,title:^(Open File)$"
"float,title:^(Open File)$"
];
layerrule = [
"noanim, selection"
];
}
// (
mkIf (config.home.username != "greeter") {
# This file should only be used for theming
source = ["${config.vars.configDir}/hypr/main.conf"];
}
);
};
# For accurate stack trace
_file = ./default.nix;
}

View file

@ -65,5 +65,5 @@
}; };
# For accurate stack trace # For accurate stack trace
_file = ./gtk.nix; _file = ./default.nix;
} }

View file

@ -11,11 +11,12 @@ self: {
in { in {
home.packages = with pkgs; [ home.packages = with pkgs; [
libsForQt5.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum
qt6Packages.qtstyleplugin-kvantum kdePackages.qtstyleplugin-kvantum
]; ];
qt = { qt = {
enable = true; enable = true;
style.name = "kvantum";
platformTheme.name = "qtct"; platformTheme.name = "qtct";
}; };

View file

@ -0,0 +1,23 @@
{...}: {
xresources.extraConfig = ''
! Dracula Xresources palette
*.foreground: #F8F8F2
*.background: #282A36
*.color0: #000000
*.color8: #4D4D4D
*.color1: #FF5555
*.color9: #FF6E67
*.color2: #50FA7B
*.color10: #5AF78E
*.color3: #F1FA8C
*.color11: #F4F99D
*.color4: #BD93F9
*.color12: #CAA9FA
*.color5: #FF79C6
*.color13: #FF92D0
*.color6: #8BE9FD
*.color14: #9AEDFE
*.color7: #BFBFBF
*.color15: #E6E6E6
'';
}