From b180fb4481bc0381ff9c760e59f3ca55e55fec2a Mon Sep 17 00:00:00 2001 From: jasmine Date: Sun, 1 Feb 2026 17:35:55 +0800 Subject: [PATCH] feat(discord): add BetterDiscord with gruvbox material dark theme Restore Discord with OpenASAR overlay and BetterDiscord CSS theming. Custom gruvbox material dark medium palette with proper read/unread channel distinction and minimal UI tweaks. Add mpd-discord-rpc for music rich presence. --- home-manager/sajenim/features/cli/mpd.nix | 15 ++- .../sajenim/features/desktop/default.nix | 1 + .../desktop/discord/config/custom.css | 95 +++++++++++++++++++ .../features/desktop/discord/default.nix | 17 ++++ home-manager/sajenim/global/default.nix | 2 + 5 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 home-manager/sajenim/features/desktop/discord/config/custom.css create mode 100644 home-manager/sajenim/features/desktop/discord/default.nix diff --git a/home-manager/sajenim/features/cli/mpd.nix b/home-manager/sajenim/features/cli/mpd.nix index 5613b4e..4b7c867 100644 --- a/home-manager/sajenim/features/cli/mpd.nix +++ b/home-manager/sajenim/features/cli/mpd.nix @@ -1,6 +1,6 @@ {pkgs, ...}: { - # Install some applications for managing mpd + # Install some applications for managing mpd home.packages = with pkgs; [ mpc ncmpcpp @@ -25,4 +25,17 @@ } ''; }; + + # Discord rich presence for MPD + services.mpd-discord-rpc = { + enable = true; + settings = { + hosts = ["localhost:6600"]; + format = { + details = "$title"; + state = "$artist - $album"; + timestamp = "elapsed"; + }; + }; + }; } diff --git a/home-manager/sajenim/features/desktop/default.nix b/home-manager/sajenim/features/desktop/default.nix index 96e9b5c..bf1ec8a 100644 --- a/home-manager/sajenim/features/desktop/default.nix +++ b/home-manager/sajenim/features/desktop/default.nix @@ -1,6 +1,7 @@ {pkgs, ...}: { imports = [ ./cava + ./discord ./mpv ./obs ]; diff --git a/home-manager/sajenim/features/desktop/discord/config/custom.css b/home-manager/sajenim/features/desktop/discord/config/custom.css new file mode 100644 index 0000000..3057b1a --- /dev/null +++ b/home-manager/sajenim/features/desktop/discord/config/custom.css @@ -0,0 +1,95 @@ +:root { + --font-primary: Fisa Code; + + /* Gruvbox Material Dark Medium */ + --bg-dim: #232323; + --bg0: #282828; + --bg1: #32302f; + --bg2: #45403d; + --bg3: #5a524c; + --bg4: #665c54; + --bg5: #7c6f64; + + --fg0: #d4be98; + --fg1: #ddc7a1; + + --grey0: #7c6f64; + --grey1: #928374; + --grey2: #a89984; + + --red: #ea6962; + --orange: #e78a4e; + --yellow: #d8a657; + --green: #a9b665; + --aqua: #89b482; + --blue: #7daea3; + --purple: #d3869b; +} + +.theme-dark { + /* Text */ + --text-default: var(--fg0); /* main chat */ + --text-strong: var(--fg1); /* usernames, selected channel, server accent */ + --text-subtle: var(--grey2); /* user status, is typing */ + --text-muted: var(--grey2); /* DM friendslist, user status */ + --white: var(--fg0); + + /* Channels */ + --channels-default: var(--grey2); /* read channel text */ + --channel-icon: var(--grey2); /* read channel icon */ + --interactive-text-active: var(--fg1); /* unread channel text */ + --icon-subtle: var(--fg1); /* unread channel icon */ + --interactive-text-hover: var(--grey2); /* hovered read channel text */ + + /* Other icons */ + --icon-muted: var(--grey2); + --icon-strong: var(--fg1); /* selected channel */ + --interactive-icon-default: var(--grey2); + --interactive-text-default: var(--grey2); + + /* Placeholders */ + --channel-text-area-placeholder: var(--grey2); + --input-placeholder-text-default: var(--grey2); + + /* Backgrounds */ + --background-base-lowest: var(--bg-dim); /* sidebar, channel list, topbar */ + --background-base-lower: var(--bg0); /* main chat, member list */ + --background-base-low: var(--bg0); /* user panel */ + + --background-surface-high: var(--bg1); /* link previews, server hover, active dm */ + --background-surface-higher: var(--bg1); /* active now game/status */ + + --background-mod-muted: var(--bg1); /* active now name bubble */ + --background-mod-subtle: var(--bg1); /* server folders, add server */ + --background-mod-normal: var(--bg2); /* hover states */ + --background-mod-strong: var(--bg1); /* username tag bubbles */ + + /* Input */ + --input-background-default: var(--bg0); /* search bar input box*/ + --chat-background-default: var(--bg1); /* chat input box */ + + /* Scrollbar */ + --scrollbar-thin-thumb: var(--green); + --scrollbar-thin-track: transparent; + --scrollbar-auto-thumb: var(--green); + --scrollbar-auto-track: transparent; +} + +/* Remove input borders */ +[class*="searchBar"], +[class*="channelTextArea"], +[class*="textArea"] { + border: none !important; +} + +/* Hide server banner and boost goal bar */ +[class*="bannerVisible"], +[class*="progressContainer"], +[class*="content"] > [aria-hidden="true"][style*="height"] { + display: none !important; +} + +/* Hide new messages bar */ +[class*="newMessagesBar"] { + display: none !important; +} diff --git a/home-manager/sajenim/features/desktop/discord/default.nix b/home-manager/sajenim/features/desktop/discord/default.nix new file mode 100644 index 0000000..4fb77a4 --- /dev/null +++ b/home-manager/sajenim/features/desktop/discord/default.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: { + nixpkgs.overlays = [ + (final: prev: { + discord = prev.discord.override {withOpenASAR = true;}; + }) + ]; + + home.packages = with pkgs; [ + discord + betterdiscordctl + ]; + + home.file.".config/BetterDiscord/data/stable/custom.css" = { + enable = true; + source = ./config/custom.css; + }; +} diff --git a/home-manager/sajenim/global/default.nix b/home-manager/sajenim/global/default.nix index 01c974d..da7e6a1 100644 --- a/home-manager/sajenim/global/default.nix +++ b/home-manager/sajenim/global/default.nix @@ -21,6 +21,8 @@ # all allowed packages here rather than scattering predicates across feature modules. allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "discord" + # Development tools "claude-code" "idea"