Add DMS plugins and configuration enhancements
- Introduced multiple DMS plugins including ambient sound, calculator, home assistant, dropdown menu, OCR scanner, and more. - Updated flake.nix to include new plugin URLs and configurations. - Enhanced the DMS home-manager module to support third-party plugins and their settings. - Added keybindings for new plugins in the Niri configuration. - Updated default settings to include new plugins and their visibility options.
This commit is contained in:
@@ -65,6 +65,8 @@ let
|
||||
"Mod+M"."spawn-sh" = "dms ipc call processlist toggle"; #TODO[epic=Binds] This should only be set if having dms
|
||||
"Mod+B"."spawn-sh" = "dms ipc call bar toggle name \"Main Bar\"; dms ipc call bar toggle name \"Bar 2\""; #TODO[epic=Binds] This should only be set if having dms
|
||||
"Mod+Shift+B"."spawn-sh" = "dms ipc call bar toggle name \"Bar 2\""; #TODO[epic=Binds] This should only be set if having dms
|
||||
"Mod+A"."spawn-sh" = "dms ipc call ephemera toggle"; #TODO[epic=Binds] This should only be set if having dms
|
||||
"Mod+numbersign"."spawn-sh" = "dms ipc call wallpaperCarousel toggle"; # Mod+# — TODO[epic=Binds] This should only be set if having dms
|
||||
"Mod+L"."spawn-sh" = "dms ipc call lock lock"; #TODO[epic=Binds] This should only be set if having dms
|
||||
|
||||
"Mod+Q"."close-window" = _: { };
|
||||
|
||||
@@ -47,6 +47,13 @@
|
||||
`default-settings.nix` template on fresh profiles.
|
||||
'';
|
||||
};
|
||||
bundleThirdPartyPlugins = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Install bundled third-party DMS plugins from flake inputs on all DMS hosts.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -95,6 +102,7 @@
|
||||
++ (cfg.extraRightBarWidgets or [ ]);
|
||||
programs.nix-monitor.rebuildCommand = rebuildCommand;
|
||||
dms.defaultSettingsFile = cfg.defaultSettingsFile or null;
|
||||
dms.bundleThirdPartyPlugins = cfg.bundleThirdPartyPlugins or true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -70,6 +70,33 @@
|
||||
dmsSeedFile = jsonFormat.generate "dms-settings-seed.json" dmsSeedSettings;
|
||||
dmsSettingsPath = "${config.xdg.configHome}/DankMaterialShell/settings.json";
|
||||
|
||||
# Directory name must match each plugin's `id` in plugin.json.
|
||||
thirdPartyPlugins = {
|
||||
dankVault = inputs.dms-plugin-dank-vault;
|
||||
calculator = inputs.dms-plugin-calculator;
|
||||
homeAssistantMonitor = inputs.dms-plugin-home-assistant;
|
||||
dropdownMenu = inputs.dms-plugin-dropdown-menu;
|
||||
ocrScanner = inputs.dms-plugin-ocr-scanner;
|
||||
unifiedTaskbar = inputs.dms-plugin-unified-taskbar;
|
||||
widgetGroup = inputs.dms-plugin-widget-group;
|
||||
nixPackageRunner = inputs.dms-plugin-nix-package-runner;
|
||||
ambientSound = inputs.dms-plugin-ambient-sound;
|
||||
cavaVisualizer = inputs.dms-plugin-cava-visualizer;
|
||||
emojiLauncher = inputs.dms-plugin-emoji-launcher;
|
||||
dankDesktopWeather = inputs.dms-plugin-official + "/DankDesktopWeather";
|
||||
webSearch = inputs.dms-plugin-web-search;
|
||||
wallpaperCarousel = inputs.dms-plugin-wallpaper-carousel;
|
||||
ephemera = inputs.dms-plugin-ephemera;
|
||||
appShortcut = inputs.dms-plugin-app-shortcut;
|
||||
};
|
||||
|
||||
shipThirdPartyPlugin =
|
||||
id: src:
|
||||
{
|
||||
source = src;
|
||||
onChange = "${dmsRestartOnceScript}";
|
||||
};
|
||||
|
||||
in {
|
||||
options = {
|
||||
dms.enable = lib.mkOption {
|
||||
@@ -139,6 +166,15 @@ in {
|
||||
`default-settings.nix` template on fresh profiles.
|
||||
'';
|
||||
};
|
||||
|
||||
dms.bundleThirdPartyPlugins = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Install bundled third-party DMS plugins (DankVault, Calculator, Home Assistant, …)
|
||||
into `~/.config/DankMaterialShell/plugins/` from flake inputs.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
@@ -170,6 +206,10 @@ in {
|
||||
onChange = "${dmsRestartOnceScript}";
|
||||
};
|
||||
})
|
||||
(lib.mkIf cfg.bundleThirdPartyPlugins {
|
||||
xdg.configFile =
|
||||
lib.mapAttrs (id: src: shipThirdPartyPlugin id src) thirdPartyPlugins;
|
||||
})
|
||||
{
|
||||
|
||||
# Nix rebuild widget used by DankMaterialShell (via nix-monitor).
|
||||
@@ -188,6 +228,20 @@ in {
|
||||
kdePackages.kirigami.unwrapped
|
||||
kdePackages.qtmultimedia
|
||||
kdePackages.sonnet
|
||||
# ocrScanner DMS plugin — eng/fra/vie and 120+ langs ship in nixpkgs tessdata.
|
||||
tesseract
|
||||
# ambientSound DMS plugin — mpv playback + socat IPC to mpv socket.
|
||||
mpv
|
||||
socat
|
||||
# dankVault / emojiLauncher / ephemera — Wayland clipboard.
|
||||
wl-clipboard
|
||||
# nixPackageRunner DMS plugin.
|
||||
jq
|
||||
# cavaVisualizer DMS plugin.
|
||||
cava
|
||||
# ephemera DMS plugin — API requests + optional keyring storage.
|
||||
curl
|
||||
libsecret
|
||||
];
|
||||
programs.dank-material-shell = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user