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:
2026-06-21 04:18:36 -03:00
parent 02c6b3a45f
commit 4ca225ed60
6 changed files with 897 additions and 4 deletions
+2
View File
@@ -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" = _: { };
+8
View File
@@ -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;
@@ -526,9 +526,21 @@
{
"id": "privacyIndicator",
"enabled": true
},
{
"id": "ambientSound",
"enabled": true
},
{
"id": "discordVoice",
"enabled": true
}
],
"rightWidgets": [
{
"id": "ocrScanner",
"enabled": true
},
{
"id": "homeAssistantMonitor",
"enabled": true
@@ -586,7 +598,7 @@
"autoHideDelay": 250,
"showOnWindowsOpen": false,
"openOnOverview": false,
"visible": false,
"visible": true,
"popupGapsAuto": true,
"popupGapsManual": 4,
"maximizeDetection": true,
@@ -667,12 +679,477 @@
],
"systemMonitorVariants": [],
"desktopWidgetPositions": {},
"desktopWidgetGridSettings": {},
"desktopWidgetInstances": [],
"desktopWidgetGridSettings": {
"DP-3": {
"enabled": true,
"size": 50
}
},
"desktopWidgetInstances": [
{
"id": "dw_1782021985000_p2b35s81f",
"widgetType": "desktopClock",
"name": "Desktop Clock",
"enabled": true,
"config": {
"style": "analog",
"transparency": 0.8,
"colorMode": "primary",
"customColor": "#ffffff",
"showDate": true,
"showAnalogNumbers": false,
"showAnalogSeconds": true,
"displayPreferences": [
"all"
]
},
"positions": {
"DP-3": {
"width": 300,
"height": 300,
"x": 1550,
"y": 50
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 1708.3671875,
"y": 4.84765625
}
}
},
{
"id": "dw_1782021988600_vdg97np4g",
"widgetType": "systemMonitor",
"name": "System Monitor",
"enabled": true,
"config": {
"showHeader": true,
"transparency": 0.8,
"colorMode": "primary",
"customColor": "#ffffff",
"showCpu": true,
"showCpuGraph": true,
"showCpuTemp": true,
"showGpuTemp": false,
"gpuPciId": "",
"showMemory": true,
"showMemoryGraph": true,
"showNetwork": true,
"showNetworkGraph": true,
"showDisk": true,
"showTopProcesses": false,
"topProcessCount": 3,
"topProcessSortBy": "cpu",
"layoutMode": "auto",
"graphInterval": 60,
"displayPreferences": [
"all"
]
},
"positions": {
"DP-3": {
"width": 500,
"height": 250,
"x": 2000,
"y": 50
},
"DP-4": {
"width": 320,
"height": 480,
"x": 800,
"y": 300
},
"HDMI-A-3": {
"width": 320,
"height": 480,
"x": 1595.0546875,
"y": 556.515625
}
}
},
{
"id": "dw_1782022081429_08ufxr98h",
"widgetType": "appShortcut",
"name": "Application Shortcut: Obsidian",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "obsidian",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 100,
"height": 100,
"x": 150,
"y": 200
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.05859375,
"y": 0.18518518518518517,
"width": 100,
"height": 100
}
}
},
{
"id": "dw_1782022155947_1a4381zan",
"widgetType": "appShortcut",
"name": "Application Shortcut: Steam",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "steam",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 100,
"height": 100,
"x": 50,
"y": 900
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.01953125,
"y": 0.8333333333333334,
"width": 100,
"height": 100
}
}
},
{
"id": "dw_1782022159047_a0w7xwkkz",
"widgetType": "appShortcut",
"name": "Application Shortcut: Vesktop",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "vesktop",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 100,
"height": 100,
"x": 50,
"y": 200
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.01953125,
"y": 0.18518518518518517,
"width": 100,
"height": 100
}
}
},
{
"id": "dw_1782022160265_i4vr22k1v",
"widgetType": "appShortcut",
"name": "Application Shortcut: PrismLauncher",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "org.prismlauncher.PrismLauncher",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 100,
"height": 100,
"x": 250,
"y": 900
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.09765625,
"y": 0.8333333333333334,
"width": 100,
"height": 100
}
}
},
{
"id": "dw_1782022161442_3vfjq50gk",
"widgetType": "appShortcut",
"name": "Application Shortcut: Pokeclicker",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "pokeclicker-desktop-with-scripts",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 100,
"height": 100,
"x": 150,
"y": 900
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.05859375,
"y": 0.8333333333333334,
"width": 100,
"height": 100
}
}
},
{
"id": "dw_1782022229421_fuo32iz2s",
"widgetType": "appShortcut",
"name": "Application Shortcut: Edge",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"showOnOverlay": false,
"showOnOverview": false,
"showOnOverviewOnly": false,
"clickThrough": false,
"shortcutApp": "microsoft-edge",
"followTheme": false,
"drawOutlines": false,
"syncPositionAcrossScreens": true
},
"positions": {
"DP-3": {
"width": 150,
"height": 150,
"x": 50,
"y": 50
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.01953125,
"y": 0.046296296296296294,
"width": 150,
"height": 150
}
}
},
{
"id": "dw_1782022922490_aiumfxf49",
"widgetType": "cavaVisualizer",
"name": "Cava Visualizer",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"syncPositionAcrossScreens": true,
"vizMode": "bars",
"barCount": 20,
"barSpacing": 10,
"barWidth": 0,
"orientation": "bottom",
"channels": "mono",
"colorChoice": "primary",
"bgOpacity": 0
},
"positions": {
"DP-3": {
"width": 1100,
"height": 500,
"x": 700,
"y": 550
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.2734375,
"y": 0.5092592592592593,
"width": 1100,
"height": 500
}
}
},
{
"id": "dw_1782023131450_et7n3pv2q",
"widgetType": "dankDesktopWeather",
"name": "Dank Desktop Weather",
"enabled": true,
"config": {
"displayPreferences": [
"all"
],
"syncPositionAcrossScreens": true,
"viewMode": "detailed",
"colorMode": "primary",
"backgroundOpacity": 80,
"showPressure": true,
"forecastDays": 7,
"showHourlyForecast": true,
"hourlyCount": 6,
"showLocation": false,
"showCondition": true,
"showFeelsLike": true
},
"positions": {
"DP-3": {
"width": 200,
"height": 200,
"x": 1450,
"y": 200
},
"DP-4": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"HDMI-A-3": {
"width": 200,
"height": 200,
"x": 860,
"y": 440
},
"_synced": {
"x": 0.78125,
"y": 0.32407407407407407,
"width": 500,
"height": 650
}
}
}
],
"desktopWidgetGroups": [],
"builtInPluginSettings": {},
"clipboardEnterToPaste": false,
"launcherPluginVisibility": {},
"launcherPluginVisibility": {
"obsidianSearch": {
"allowWithoutTrigger": false
},
"dms_settings_search": {
"allowWithoutTrigger": true
}
},
"launcherPluginOrder": [],
"configVersion": 5
}