Introduction¶
The DSH plugin ecosystem emphasizes “everything is a plugin,” and pages across different plugins often need to maintain visual consistency. When a page from a dependent plugin needs to integrate with Lifiwallpaper’s glassmorphism theme, hardcoding styles directly leads to inconsistencies once the theme is updated and makes maintenance difficult. This plugin bridges third-party DSH plugin pages and cards into Lifiwallpaper’s glass system and provides an external contract so that other plugins can easily reuse the same glass effect.
Plugin Purpose¶
dsh-lifi-adapters is an adapter package that provides a glass surface contract for Lifiwallpaper. Maintained by LiueCreater, it is installed and uninstalled independently and is not included in the Lifiwallpaper main package. It implements glass effect injection through pure client-side CSS and minimal JS — no Host port, no network requests, no data read/write.
Core Features¶
Version Binding¶
This package version 0.1.0 is only compatible with Lifiwallpaper 0.2.7. If 0.2.7 is not detected, no styles are injected at all (the page remains unchanged), and a message is printed to the console. When Lifiwallpaper upgrades to a new protocol, a corresponding new adapter version must be released and REQUIRED_LIFI in client.js must be updated.
External Contract¶
After installing this package, other plugins only need to add a single class to their container:
<div class="lifi-glass">…</div>
They will then get a glass effect consistent with Lifiwallpaper: background color, blur, border, and border-radius all follow the user’s Lifiwallpaper settings.
Available variables (defined by this package on <html>):
| Variable | Description |
|---|---|
--lifi-surface-bg |
Glass background color (auto light/dark) |
--lifi-surface-border |
Glass border color |
--lifi-blur |
Background blur radius |
--lifi-radius |
Border-radius |
Detection:
if (window.dshLifiGlass?.protocol === 'lifi-appearance/0.2.7') {
// .lifi-glass is available
}
When Lifiwallpaper’s glass mode is set to “None” or this adapter package is disabled, window.dshLifiGlass does not exist, .lifi-glass produces no styles, and plugins should fall back to their own default background.
Installation & Activation¶
Install this package from the DSH “Plugins” page (or use plugin_manager install_bundle), then refresh the page after enabling. It only takes effect when Lifiwallpaper is also enabled and the glass mode is not set to “None”.
Adapted Third-Party Pages¶
| Plugin | Treatment |
|---|---|
dsh-memory-evolve (Memory / Skills / Todos / Memory Evolve) |
Page root transparent; top-level cards glass; nested items transparent |
billion-context (Context) |
Only the outer iframe frame gets border-radius and shadow; internal content is a cross-origin document, so styles cannot be injected |
For specific selectors, refer to the CSS at the top of client.js.
Known Limitations¶
billion-context’s “Context” panel is a cross-origin iframe (/__bili/?embed=1&theme=…). The browser’s same-origin policy prevents the parent page from modifying its internal styles; only the outer frame can be styled. Unifying the internal background requires bili-side support for a transparent background or a theme parameter.- If a third-party page migrates to Shadow DOM in the future, separate adaptation will be required.
- This package has only been validated against Lifiwallpaper 0.2.7; other versions will be actively disabled.
Use Cases & Notes¶
Intended for DSH plugin developers who need to maintain visual consistency with Lifiwallpaper’s glass style. This plugin runs with the current DSH process privileges; please review the source code and license before installing.
Conclusion¶
By providing a unified glass surface contract, this plugin reduces the integration cost between different plugins and the Lifiwallpaper theme, allowing developers to focus on business logic rather than repeatedly handling the details of glass effects. For more information, visit the plugin directory page or the GitHub repository.