Skip to content

Commit

Permalink
✨ (plasma-manager): Fully applied the Dracula theme and declared the …
Browse files Browse the repository at this point in the history
…panel
  • Loading branch information
theobori committed Nov 1, 2024
1 parent 49533c2 commit a0b39b4
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 13 deletions.
91 changes: 83 additions & 8 deletions modules/home/desktops/addons/plasma6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,91 @@
}:
let
inherit (lib) mkIf types;
inherit (lib.${namespace}) mkBoolOpt;
inherit (lib.${namespace}) mkBoolOpt mkOpt;

cfg = config.${namespace}.desktops.addons.plasma6;
wallpaper = pkgs.${namespace}.wallpapers.nix-simple;
in
{
options.${namespace}.desktops.addons.plasma6 = with types; {
enable = mkBoolOpt false "Whether or not to enable GNOME addons.";
extraWorkspace = mkOpt attrs {
colorScheme = "DraculaPurple";
theme = "Dracula";
lookAndFeel = "Dracula";

windowDecorations = {
library = "org.kde.kwin.aurorae";
theme = "__aurorae__svg__Dracula";
};

splashScreen = {
theme = "";
};

cursor = {
theme = "Dracula-cursors";
};

#iconTheme = "Dracula";

inherit wallpaper;
} "Extra configuration for the workspace plasma-manager module.";

kscreenlocker = mkOpt attrs {
appearance = {
inherit wallpaper;
};
} "kscreenlocker plasma-manager module configuration.";

widgets = mkOpt (listOf anything) [
{
kickoff = {
sortAlphabetically = true;
icon = "nix-snowflake-white";
};
}
{
iconTasks = {
launchers = [
"applications:systemsettings.desktop"
"applications:org.wezfurlong.wezterm.desktop"
"applications:firefox.desktop"
"applications:vesktop.desktop"
"applications:obsidian.desktop"
];
};
}
"org.kde.plasma.marginsseparator"
{
systemTray.items = {
shown = [
"org.kde.plasma.battery"
"org.kde.plasma.clipboard"
"org.kde.plasma.luminosity"
"org.kde.plasma.bluetooth"
"org.kde.plasma.networkmanagement"
"org.kde.plasma.volume"
];
};
}
{
digitalClock = {
calendar.firstDayOfWeek = "monday";
time.format = "24h";
};
}
] "List of panel widgets.";
};

config = mkIf cfg.enable {
home.packages = [ pkgs.${namespace}.my-dracula-theme ];
home.packages = [
pkgs.${namespace}.my-dracula-theme
pkgs.dracula-icon-theme
];

stylix = {
# Generate impure (not managed by nix) gtk files
# Generate impure (not managed by nix) gtk files because it is using Qt
targets.gtk.enable = false;
# Trying to apply the wallpaper too early and then it doest not load the home-manager environment
targets.kde.enable = false;
Expand All @@ -30,13 +101,17 @@ in
enable = true;

workspace = {
colorScheme = "Dracula";
theme = "Dracula";
enableMiddleClickPaste = true;
} // cfg.extraWorkspace;

wallpaper = pkgs.${namespace}.wallpapers.nix-simple;
inherit (cfg) kscreenlocker;

enableMiddleClickPaste = true;
};
panels = [
{
location = "bottom";
inherit (cfg) widgets;
}
];
};
};
}
15 changes: 11 additions & 4 deletions modules/home/messages/discord/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
...
}:
let
inherit (lib) mkIf types;
inherit (lib) mkIf types strings;
inherit (lib.${namespace})
mkBoolOpt
mkOpt
Expand All @@ -14,12 +14,20 @@ let
;

cfg = config.${namespace}.messages.discord;

trimWith' =
s:
strings.trimWith {
start = true;
end = true;
} s;
in
{
options.${namespace}.messages.discord = with types; {
enable = mkBoolOpt false "Whether or not to manage discord.";
quickCss = mkOpt str (builtins.readFile ./custom.css) "Vencord quick CSS.";
config = mkOpt attrs {
useQuickCss = true;
useQuickCss = ((trimWith' cfg.quickCss) != "");
plugins = {
betterFolders = enabled;
betterRoleContext = enabled;
Expand All @@ -44,9 +52,8 @@ in
enable = true;
discord = disabled;
vesktop.enable = true;
quickCss = builtins.readFile ./custom.css;

inherit (cfg) config;
inherit (cfg) config quickCss;
};
};
}
2 changes: 1 addition & 1 deletion modules/nixos/display-managers/sddm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ in
theme = "Dracula";
};

environment.systemPackages = with pkgs; [ theobori-nix.my-dracula-theme ];
environment.systemPackages = [ pkgs.${namespace}.my-dracula-theme ];
};
}

0 comments on commit a0b39b4

Please sign in to comment.