1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-03 20:32:07 -04:00

meta: monorepo updates

This commit is contained in:
bbedward
2025-11-12 20:34:58 -05:00
parent 24e800501a
commit e8510b925e
29 changed files with 1340 additions and 677 deletions

View File

@@ -0,0 +1,23 @@
# DankMaterialShell License Change
Relicensing from GPL-3.0 to MIT.
Consent and documentation is available in [pull request #686](https://github.com/AvengeMedia/DankMaterialShell/pull/686) and is summarized below.
## Contributors
The project has 21 contributors requiring consent:
- 2 primary authors (10k+ lines each)
- 7 major contributors (1k+ lines or 10+ commits)
- 12 significant contributors (100+ lines)
- 2 derivative works (code adapted from other projects)
Contributors with <50 lines are excluded as they don't meet copyright thresholds. Automated bots don't hold copyright.
## Consent Status
All 21 contributors have provided consent. Three contributions were sufficiently reverted or rewritten by maintainers, making them eligible without original author consent.
## Reasoning
GPL-3.0 may require plugins to also be GPL-3.0 licensed. MIT allows plugin authors to choose their own licenses.

View File

@@ -1,219 +1,238 @@
# DankMaterialShell (dms)
# DMS Quickshell Interface
<div align="center">
<a href="https://danklinux.com">
<img src="assets/danklogo2.svg" alt="DankMaterialShell Logo" width="200">
</a>
QML-based desktop shell interface for DankMaterialShell providing panels, widgets, and overlays.
### A modern Wayland desktop shell
**See [root README](../README.md) for project overview and installation.**
Built with [Quickshell](https://quickshell.org/) and [Go](https://go.dev/)
## Architecture
[![Documentation](https://img.shields.io/badge/docs-danklinux.com-9ccbfb?style=for-the-badge&labelColor=101418)](https://danklinux.com/docs)
[![GitHub stars](https://img.shields.io/github/stars/AvengeMedia/DankMaterialShell?style=for-the-badge&labelColor=101418&color=ffd700)](https://github.com/AvengeMedia/DankMaterialShell/stargazers)
[![GitHub License](https://img.shields.io/github/license/AvengeMedia/DankMaterialShell?style=for-the-badge&labelColor=101418&color=b9c8da)](https://github.com/AvengeMedia/DankMaterialShell/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/v/release/AvengeMedia/DankMaterialShell?style=for-the-badge&labelColor=101418&color=9ccbfb)](https://github.com/AvengeMedia/DankMaterialShell/releases)
[![AUR version](https://img.shields.io/aur/version/dms-shell-bin?style=for-the-badge&labelColor=101418&color=9ccbfb)](https://aur.archlinux.org/packages/dms-shell-bin)
[![AUR version (git)](https://img.shields.io/aur/version/dms-shell-git?style=for-the-badge&labelColor=101418&color=9ccbfb&label=AUR%20(git))](https://aur.archlinux.org/packages/dms-shell-git)
[![Ko-Fi donate](https://img.shields.io/badge/donate-kofi?style=for-the-badge&logo=ko-fi&logoColor=ffffff&label=ko-fi&labelColor=101418&color=f16061&link=https%3A%2F%2Fko-fi.com%2Favengemediallc)](https://ko-fi.com/avengemediallc)
**Modular QML Structure**
- `Modules/` - UI components (panels, widgets, overlays)
- `Services/` - System integration singletons (audio, network, bluetooth)
- `Widgets/` - Reusable UI controls
- `Common/` - Shared resources and themes
</div>
**Technology Stack**
- [Quickshell](https://quickshell.org/) - QML-based shell framework
- Qt/QtQuick - UI rendering and controls
- Material Design 3 - Design system and theming
DankMaterialShell is a complete desktop shell for [niri](https://github.com/YaLTeR/niri), [Hyprland](https://hypr.land), [MangoWC](https://github.com/DreamMaoMao/mangowc), [Sway](https://swaywm.org), and other Wayland compositors. It replaces waybar, swaylock, swayidle, mako, fuzzel, polkit, and everything else you'd normally stitch together to make a desktop - all in one cohesive package with a gorgeous interface.
## Development
**Run the shell:**
```bash
quickshell -p quickshell/
```
**Code formatting:**
```bash
qmlfmt -t 4 -i 4 -b 250 -w path/to/file.qml
qmllint **/*.qml
```
## Components
DankMaterialShell combines two main components:
**Panels & Bars**
- `Modules/TopBar/` - Multi-monitor status bars with workspace switching
- `Modules/DankBar/` - Customizable widget bar with plugin support
- `Modules/Dock/` - Application dock with window management
- **[QML/UI Layer](https://github.com/AvengeMedia/DankMaterialShell)** (this repo) - All the visual components, widgets, and shell interface built with Quickshell
- **[Go Backend](https://github.com/AvengeMedia/danklinux)** - System integration, IPC, process management, and core services
**System Controls**
- `Modules/ControlCenter/` - WiFi, Bluetooth, audio, display settings
- `Modules/Notifications/` - Notification center with popups
- `Modules/Greetd/` - Login greeter interface
---
**Overlays**
- `Modules/Spotlight/` - Application and file launcher
- `Modules/Overview/` - Workspace overview
- `Modules/Lock/` - Screen lock system
## See it in Action
**Utilities**
- `Modules/ProcessList/` - System monitoring and process management
- `Modules/Calendar/` - Calendar widget with event sync
- `Modules/Weather/` - Weather display
<div align="center">
## Services
https://github.com/user-attachments/assets/1200a739-7770-4601-8b85-695ca527819a
Singletons providing system integration:
</div>
**Media & Audio**
- `AudioService` - PipeWire/PulseAudio volume and device control
- `MprisController` - Media player integration
<details><summary><strong>More Screenshots</strong></summary>
**Network**
- `NetworkService` - NetworkManager WiFi control
- `BluetoothService` - BlueZ Bluetooth management
<div align="center">
**Display**
- `DisplayService` - Brightness control and night mode
- `WallpaperService` - Wallpaper management and effects
<img src="https://github.com/user-attachments/assets/203a9678-c3b7-4720-bb97-853a511ac5c8" width="600" alt="Desktop" />
**System**
- `BatteryService` - Battery status and power profiles
- `IdleService` - Idle detection and inhibit locks
- `ClipboardService` - Clipboard history with images
- `DgopService` - System metrics (CPU, RAM, GPU)
<img src="https://github.com/user-attachments/assets/a937cf35-a43b-4558-8c39-5694ff5fcac4" width="600" alt="Dashboard" />
**Integration**
- `NiriService` - Niri workspace integration
- `HyprlandService` - Hyprland workspace integration
- `PluginService` - Plugin discovery and lifecycle
<img src="https://github.com/user-attachments/assets/2da00ea1-8921-4473-a2a9-44a44535a822" width="450" alt="Launcher" />
## Widgets
<img src="https://github.com/user-attachments/assets/732c30de-5f4a-4a2b-a995-c8ab656cecd5" width="600" alt="Control Center" />
Reusable Material Design 3 components in `Widgets/`:
</div>
</details>
---
## Quick Install
```bash
curl -fsSL https://install.danklinux.com | sh
```
That's it. One command installs dms and all dependencies on Arch, Fedora, Debian, Ubuntu, openSUSE, or Gentoo.
**[Manual Installation Guide →](https://danklinux.com/docs/dankmaterialshell/installation)**
---
## What You Get
**Dynamic Theming**
Wallpaper-based color schemes that automatically theme GTK, Qt, terminals, editors (like vscode, vscodium), and more with [matugen](https://github.com/InioX/matugen) and [dank16](https://github.com/AvengeMedia/danklinux/blob/master/internal/dank16/dank16.go).
**System Monitoring**
Real-time CPU, RAM, GPU metrics and temps with [dgop](https://github.com/AvengeMedia/dgop). Full process list with search and management.
**Powerful Launcher**
Spotlight-style search for apps, files (via [dsearch](https://github.com/AvengeMedia/danksearch)), emojis, running windows, calculator, commands - extensible with plugins.
**Control Center**
Network, Bluetooth, audio devices, display settings, night mode - all in one clean interface.
**Smart Notifications**
Notification center with grouping, rich text support, and keyboard navigation.
**Media Integration**
MPRIS player controls, calendar sync, weather widgets, clipboard history with image previews.
**Complete Session Management**
Lock screen, idle detection, auto-lock/suspend with separate AC/battery settings, greeter support.
**Plugin System**
Endless customization with the [plugin registry](https://plugins.danklinux.com).
**TL;DR** - One shell replaces waybar, swaylock, swayidle, mako, fuzzel, polkit and everything else you normally piece together to create a linux desktop.
---
## Supported Compositors
DankMaterialShell works best with **[niri](https://github.com/YaLTeR/niri)**, **[Hyprland](https://hyprland.org/)**, **[sway](https://swaywm.org/)**, and **[dwl/MangoWC](https://github.com/DreamMaoMao/mangowc)**. - with full workspace switching, overview integration, and monitor management.
Other Wayland compositors work too, just with a reduced feature set.
**[Compositor configuration guide →](https://danklinux.com/docs/dankmaterialshell/compositors)**
---
## Keybinds & IPC
Control everything from the command line or keybinds:
```bash
dms ipc call spotlight toggle
dms ipc call audio setvolume 50
dms ipc call wallpaper set /path/to/image.jpg
dms ipc call theme toggle
```
**[Full keybind and IPC documentation →](https://danklinux.com/docs/dankmaterialshell/keybinds-ipc)**
---
- `DankIcon` - Icon component with Material font
- `DankSlider` - Enhanced slider with animations
- `DankToggle` - Toggle switch component
- `DankTabBar` - Tab bar implementation
- `DankGridView` - Grid layout with adaptive columns
- `DankListView` - Scrollable list view
- `DankTextField` - Text input with validation
- `DankDropdown` - Dropdown selection
- `DankPopout` - Base for overlay components
- `StateLayer` - Material interaction states
## Theming
DankMaterialShell automatically generates color schemes from your wallpaper or theme and applies them to GTK, Qt, terminals, and more.
**Dynamic Color Schemes**
DMS is not opinionated or forcing these themes - they are created as optional themes you can enable. You can refer to the documentation if you want to use them:
Wallpaper-based theming using [matugen](https://github.com/InioX/matugen):
**Application theming:** [GTK, Qt, Firefox, terminals, vscode+vscodium →](https://danklinux.com/docs/dankmaterialshell/application-themes)
```qml
import qs.Common
**Custom themes:** [Create your own color schemes →](https://danklinux.com/docs/dankmaterialshell/custom-themes)
---
## Plugins
Extend dms with the plugin system. Browse community plugins at [plugins.danklinux.com](https://plugins.danklinux.com).
**[Plugin development guide →](https://danklinux.com/docs/dankmaterialshell/plugins-overview)**
---
## Documentation
**Website:** [danklinux.com](https://danklinux.com)
**Docs:** [danklinux.com/docs](https://danklinux.com/docs)
**Support:** [Ko-fi](https://ko-fi.com/avengemediallc)
---
## Contributing
Contributions welcome! Bug fixes, new widgets, theme improvements, or docs - it all helps.
**Contributing Code:**
1. Fork the repository
2. Set up the development environment
3. Make your changes
4. Open a pull request
**Contributing Documentation:**
1. Fork the [DankLinux-Docs](https://github.com/AvengeMedia/DankLinux-Docs) repository
2. Update files in the `docs/` folder
3. Open a pull request
### Development Setup
**Requirements:**
- `python3` - Translation management
**Git Hooks:**
Enable the pre-commit hook to check translation sync status:
```bash
git config core.hooksPath .githooks
Rectangle {
color: Theme.container
border.color: Theme.outline
}
```
**Translation Workflow**
Theme singleton provides Material Design 3 color system, spacing, fonts, and elevation.
Set POEditor credentials:
**Application Themes**
```bash
export POEDITOR_API_TOKEN="your_api_token"
export POEDITOR_PROJECT_ID="your_project_id"
Templates in `scripts/templates/` generate themes for:
- GTK 3/4
- Qt5/Qt6
- Alacritty, Kitty, Foot terminals
- VSCode/VSCodium
- Firefox
## Multi-Monitor Support
Per-monitor panel instances using Quickshell `Variants`:
```qml
Variants {
model: Quickshell.screens
PanelWindow {
screen: modelData
// Per-screen configuration
}
}
```
Sync translations before committing:
Workspace switchers adapt to compositor (Niri/Hyprland).
## Plugin System
External plugins in `~/.config/DankMaterialShell/plugins/`:
**Widget plugins** - UI components in DankBar
**Daemon plugins** - Background processes without UI
Plugin manifest (`plugin.json`):
```json
{
"id": "pluginId",
"name": "Plugin Name",
"version": "1.0.0",
"type": "widget",
"component": "./Widget.qml",
"settings": "./Settings.qml",
"permissions": ["settings_read", "settings_write"]
}
```
Plugins access `pluginService` for persistent data:
```qml
pluginService.savePluginData("pluginId", "key", value)
pluginService.loadPluginData("pluginId", "key", defaultValue)
```
## IPC Integration
Backend IPC socket communication:
```qml
import Quickshell.Io
Process {
command: ["dms", "ipc", "call", "spotlight", "toggle"]
running: true
}
```
Common IPC commands exposed through services for reactive property bindings.
## Code Conventions
**Component Structure:**
```qml
import QtQuick
import Quickshell
import qs.Common
import qs.Services
Item {
id: root
property type name: value
signal customSignal(type param)
Component { /* children */ }
}
```
**Services (Singletons):**
```qml
import QtQuick
import Quickshell
pragma Singleton
pragma ComponentBehavior: Bound
Singleton {
id: root
property bool featureAvailable: false
property type currentValue: defaultValue
function performAction(param) { /* implementation */ }
}
```
**Guidelines:**
- Use `Theme.propertyName` for consistent styling
- Bind directly to service properties for reactivity
- Use `DankIcon` for all icons
- Implement feature detection and graceful degradation
- 4-space indentation, no unnecessary comments
## Translation
Internationalization using POEditor:
```bash
export POEDITOR_API_TOKEN="token"
export POEDITOR_PROJECT_ID="id"
python3 scripts/i18nsync.py sync
```
This script:
- Extracts strings from QML files
- Uploads changed English terms to POEditor
- Downloads updated translations from POEditor
- Stages all changes for commit
Pre-commit hook checks translation sync status.
The pre-commit hook will block commits if translations are out of sync and remind you to run the sync script.
## License
Without POEditor credentials, the hook is skipped and commits proceed normally.
Check the [issues](https://github.com/AvengeMedia/DankMaterialShell/issues) or join the community.
---
## Credits
- [quickshell](https://quickshell.org/) the core of what makes a shell like this possible.
- [niri](https://github.com/YaLTeR/niri) for the awesome scrolling compositor.
- [Ly-sec](http://github.com/ly-sec) for awesome wallpaper effects among other things from [Noctalia](https://github.com/noctalia-dev/noctalia-shell)
- [soramanew](https://github.com/soramanew) who built [caelestia](https://github.com/caelestia-dots/shell) which served as inspiration and guidance for many dank widgets.
- [end-4](https://github.com/end-4) for [dots-hyprland](https://github.com/end-4/dots-hyprland) which also served as inspiration and guidance for many dank widgets.
MIT License - See [LICENSE](../LICENSE) for details.

View File

@@ -1,261 +0,0 @@
# Spec for DMS Greeter - Git builds using rpkg macros
%global debug_package %{nil}
%global version {{{ git_repo_version }}}
%global pkg_summary DankMaterialShell greeter for greetd
Name: dms-greeter
Version: %{version}
Release: 0.git%{?dist}
Summary: %{pkg_summary}
License: MIT
URL: https://github.com/AvengeMedia/DankMaterialShell
VCS: {{{ git_repo_vcs }}}
Source0: {{{ git_repo_pack }}}
BuildRequires: git-core
BuildRequires: rpkg
# For the _tmpfilesdir macro.
BuildRequires: systemd-rpm-macros
Requires: greetd
Requires: (quickshell-git or quickshell)
Requires(post): /usr/sbin/useradd
Requires(post): /usr/sbin/groupadd
Recommends: policycoreutils-python-utils
Suggests: niri
Suggests: hyprland
Suggests: sway
# Provides: greetd-dms-greeter = %{version}-%{release}
# Conflicts: greetd-dms-greeter
%description
DankMaterialShell greeter for greetd login manager. A modern, Material Design 3
inspired greeter interface built with Quickshell for Wayland compositors.
Supports multiple compositors including Niri, Hyprland, and Sway with automatic
compositor detection and configuration. Features session selection, user
authentication, and dynamic theming.
%prep
{{{ git_repo_setup_macro }}}
%install
# Install greeter files to shared data location
install -dm755 %{buildroot}%{_datadir}/quickshell/dms-greeter
cp -r * %{buildroot}%{_datadir}/quickshell/dms-greeter/
# Install launcher script
install -Dm755 Modules/Greetd/assets/dms-greeter %{buildroot}%{_bindir}/dms-greeter
# Install documentation
install -Dm644 Modules/Greetd/README.md %{buildroot}%{_docdir}/dms-greeter/README.md
# Create cache directory for greeter data
install -Dpm0644 ./systemd/tmpfiles-dms-greeter.conf %{buildroot}%{_tmpfilesdir}/dms-greeter.conf
# Create greeter home directory
install -dm755 %{buildroot}%{_sharedstatedir}/greeter
# Note: We do NOT install a PAM config here to avoid conflicting with greetd package
# Instead, we verify/fix it in %post if needed
# Remove build and development files
rm -rf %{buildroot}%{_datadir}/quickshell/dms-greeter/.git*
rm -f %{buildroot}%{_datadir}/quickshell/dms-greeter/.gitignore
rm -rf %{buildroot}%{_datadir}/quickshell/dms-greeter/.github
rm -f %{buildroot}%{_datadir}/quickshell/dms-greeter/*.spec
rm -f %{buildroot}%{_datadir}/quickshell/dms-greeter/dms.spec
rm -f %{buildroot}%{_datadir}/quickshell/dms-greeter/dms-greeter.spec
%posttrans
# Clean up old installation path from previous versions (only if empty)
if [ -d "%{_sysconfdir}/xdg/quickshell/dms-greeter" ]; then
# Remove directories only if empty (preserves any user-added files)
rmdir "%{_sysconfdir}/xdg/quickshell/dms-greeter" 2>/dev/null || true
rmdir "%{_sysconfdir}/xdg/quickshell" 2>/dev/null || true
rmdir "%{_sysconfdir}/xdg" 2>/dev/null || true
fi
%files
%license LICENSE
%doc %{_docdir}/dms-greeter/README.md
%{_bindir}/dms-greeter
%{_datadir}/quickshell/dms-greeter/
%{_tmpfilesdir}/%{name}.conf
%pre
# Create greeter user/group if they don't exist (greetd expects this)
getent group greeter >/dev/null || groupadd -r greeter
getent passwd greeter >/dev/null || \
useradd -r -g greeter -d %{_sharedstatedir}/greeter -s /bin/bash \
-c "System Greeter" greeter
exit 0
%post
# Set SELinux contexts for greeter files on Fedora systems
if [ -x /usr/sbin/semanage ] && [ -x /usr/sbin/restorecon ]; then
# Greeter launcher binary
semanage fcontext -a -t bin_t '%{_bindir}/dms-greeter' >/dev/null 2>&1 || true
restorecon %{_bindir}/dms-greeter >/dev/null 2>&1 || true
# Greeter home directory
semanage fcontext -a -t user_home_dir_t '%{_sharedstatedir}/greeter(/.*)?' >/dev/null 2>&1 || true
restorecon -R %{_sharedstatedir}/greeter >/dev/null 2>&1 || true
# Cache directory for greeter data
semanage fcontext -a -t cache_home_t '%{_localstatedir}/cache/dms-greeter(/.*)?' >/dev/null 2>&1 || true
restorecon -R %{_localstatedir}/cache/dms-greeter >/dev/null 2>&1 || true
# Shared data directory
semanage fcontext -a -t usr_t '%{_datadir}/quickshell/dms-greeter(/.*)?' >/dev/null 2>&1 || true
restorecon -R %{_datadir}/quickshell/dms-greeter >/dev/null 2>&1 || true
# PAM configuration
restorecon %{_sysconfdir}/pam.d/greetd >/dev/null 2>&1 || true
fi
# Ensure proper ownership of greeter directories
chown -R greeter:greeter %{_localstatedir}/cache/dms-greeter 2>/dev/null || true
chown -R greeter:greeter %{_sharedstatedir}/greeter 2>/dev/null || true
# Verify PAM configuration - only fix if insufficient
PAM_CONFIG="/etc/pam.d/greetd"
if [ ! -f "$PAM_CONFIG" ]; then
# PAM config doesn't exist - create it
cat > "$PAM_CONFIG" << 'PAM_EOF'
#%PAM-1.0
auth substack system-auth
auth include postlogin
account required pam_nologin.so
account include system-auth
password include system-auth
session required pam_selinux.so close
session required pam_loginuid.so
session required pam_selinux.so open
session optional pam_keyinit.so force revoke
session include system-auth
session include postlogin
PAM_EOF
chmod 644 "$PAM_CONFIG"
# Only show message on initial install
[ "$1" -eq 1 ] && echo "Created PAM configuration for greetd"
elif ! grep -q "pam_systemd\|system-auth" "$PAM_CONFIG"; then
# PAM config exists but looks insufficient - back it up and replace
cp "$PAM_CONFIG" "$PAM_CONFIG.backup-dms-greeter"
cat > "$PAM_CONFIG" << 'PAM_EOF'
#%PAM-1.0
auth substack system-auth
auth include postlogin
account required pam_nologin.so
account include system-auth
password include system-auth
session required pam_selinux.so close
session required pam_loginuid.so
session required pam_selinux.so open
session optional pam_keyinit.so force revoke
session include system-auth
session include postlogin
PAM_EOF
chmod 644 "$PAM_CONFIG"
# Only show message on initial install
[ "$1" -eq 1 ] && echo "Updated PAM configuration (old config backed up to $PAM_CONFIG.backup-dms-greeter)"
fi
# Auto-configure greetd config
GREETD_CONFIG="/etc/greetd/config.toml"
CONFIG_STATUS="Not modified (already configured)"
# Check if niri or hyprland exists
COMPOSITOR="niri"
if ! command -v niri >/dev/null 2>&1; then
if command -v Hyprland >/dev/null 2>&1; then
COMPOSITOR="hyprland"
fi
fi
# If config doesn't exist, create a default one
if [ ! -f "$GREETD_CONFIG" ]; then
mkdir -p /etc/greetd
cat > "$GREETD_CONFIG" << 'GREETD_EOF'
[terminal]
vt = 1
[default_session]
user = "greeter"
command = "/usr/bin/dms-greeter --command COMPOSITOR_PLACEHOLDER"
GREETD_EOF
sed -i "s|COMPOSITOR_PLACEHOLDER|$COMPOSITOR|" "$GREETD_CONFIG"
CONFIG_STATUS="Created new config with $COMPOSITOR "
# If config exists and doesn't have dms-greeter, update it
elif ! grep -q "dms-greeter" "$GREETD_CONFIG"; then
# Backup existing config
BACKUP_FILE="${GREETD_CONFIG}.backup-$(date +%%Y%%m%%d-%%H%%M%%S)"
cp "$GREETD_CONFIG" "$BACKUP_FILE" 2>/dev/null || true
# Update command in default_session section
sed -i "/^\[default_session\]/,/^\[/ s|^command =.*|command = \"/usr/bin/dms-greeter --command $COMPOSITOR\"|" "$GREETD_CONFIG"
sed -i '/^\[default_session\]/,/^\[/ s|^user =.*|user = "greeter"|' "$GREETD_CONFIG"
CONFIG_STATUS="Updated existing config (backed up) with $COMPOSITOR "
fi
# Only show banner on initial install
if [ "$1" -eq 1 ]; then
cat << 'EOF'
=========================================================================
DMS Greeter Installation Complete!
=========================================================================
Status:
Greeter user: Created
Greeter directories: /var/cache/dms-greeter, /var/lib/greeter
SELinux contexts: Applied
EOF
echo " Greetd config: $CONFIG_STATUS"
cat << 'EOF'
Next steps:
1. Disable any existing display managers (IMPORTANT):
sudo systemctl disable gdm sddm lightdm
2. Enable greetd service:
sudo systemctl enable greetd
3. (Optional) Sync your theme with the greeter:
If you have DankMaterialShell (DMS) installed, you can sync with:
dms greeter sync
Check sync status: dms greeter status
Then logout/login to see your wallpaper on the greeter!
Ready to test? Reboot or run: sudo systemctl start greetd
Documentation: /usr/share/doc/dms-greeter/README.md
Website: https://danklinux.com/docs/dankgreeter/
=========================================================================
EOF
fi
%postun
# Clean up SELinux contexts on package removal
if [ "$1" -eq 0 ] && [ -x /usr/sbin/semanage ]; then
semanage fcontext -d '%{_bindir}/dms-greeter' 2>/dev/null || true
semanage fcontext -d '%{_sharedstatedir}/greeter(/.*)?' 2>/dev/null || true
semanage fcontext -d '%{_localstatedir}/cache/dms-greeter(/.*)?' 2>/dev/null || true
semanage fcontext -d '%{_datadir}/quickshell/dms-greeter(/.*)?' 2>/dev/null || true
fi
%changelog
{{{ git_repo_changelog }}}

View File

@@ -1,181 +0,0 @@
# Spec for DMS - uses rpkg macros for git builds
%global debug_package %{nil}
%global version {{{ git_repo_version }}}
%global pkg_summary DankMaterialShell - Material 3 inspired shell for Wayland compositors
Name: dms
Epoch: 1
Version: %{version}
Release: 1%{?dist}
Summary: %{pkg_summary}
License: MIT
URL: https://github.com/AvengeMedia/DankMaterialShell
VCS: {{{ git_repo_vcs }}}
Source0: {{{ git_repo_pack }}}
# DMS CLI from danklinux latest commit
Source1: https://github.com/AvengeMedia/danklinux/archive/refs/heads/master.tar.gz
BuildRequires: git-core
BuildRequires: rpkg
BuildRequires: gzip
BuildRequires: golang >= 1.24
BuildRequires: make
BuildRequires: wget
BuildRequires: systemd-rpm-macros
# Core requirements
Requires: (quickshell-git or quickshell)
Requires: accountsservice
Requires: dms-cli
Requires: dgop
# Core utilities (Highly recommended for DMS functionality)
Recommends: cava
Recommends: cliphist
Recommends: danksearch
Recommends: hyprpicker
Recommends: matugen
Recommends: quickshell-git
Recommends: wl-clipboard
# Recommended system packages
Recommends: NetworkManager
Recommends: qt6-qtmultimedia
Suggests: qt6ct
%description
DankMaterialShell (DMS) is a modern Wayland desktop shell built with Quickshell
and optimized for the niri, hyprland, sway, and dwl (MangoWC) compositors. Features notifications,
app launcher, wallpaper customization, and fully customizable with plugins.
Includes auto-theming for GTK/Qt apps with matugen, 20+ customizable widgets,
process monitoring, notification center, clipboard history, dock, control center,
lock screen, and comprehensive plugin system.
%package -n dms-cli
Summary: DankMaterialShell CLI tool
License: MIT
URL: https://github.com/AvengeMedia/danklinux
%description -n dms-cli
Command-line interface for DankMaterialShell configuration and management.
Provides native DBus bindings, NetworkManager integration, and system utilities.
%package -n dgop
Summary: Stateless CPU/GPU monitor for DankMaterialShell
License: MIT
URL: https://github.com/AvengeMedia/dgop
Provides: dgop
%description -n dgop
DGOP is a stateless system monitoring tool that provides CPU, GPU, memory, and
network statistics. Designed for integration with DankMaterialShell but can be
used standalone. This package always includes the latest stable dgop release.
%prep
{{{ git_repo_setup_macro }}}
# Extract DankLinux source
tar -xzf %{SOURCE1} -C %{_builddir}
# Download and extract DGOP binary for target architecture
case "%{_arch}" in
x86_64)
DGOP_ARCH="amd64"
;;
aarch64)
DGOP_ARCH="arm64"
;;
*)
echo "Unsupported architecture: %{_arch}"
exit 1
;;
esac
wget -O %{_builddir}/dgop.gz "https://github.com/AvengeMedia/dgop/releases/latest/download/dgop-linux-${DGOP_ARCH}.gz" || {
echo "Failed to download dgop for architecture %{_arch}"
exit 1
}
gunzip -c %{_builddir}/dgop.gz > %{_builddir}/dgop
chmod +x %{_builddir}/dgop
%build
# Build DMS CLI from source
cd %{_builddir}/danklinux-master
make dist
%install
# Install dms-cli binary (built from source) - use architecture-specific path
case "%{_arch}" in
x86_64)
DMS_BINARY="dms-linux-amd64"
;;
aarch64)
DMS_BINARY="dms-linux-arm64"
;;
*)
echo "Unsupported architecture: %{_arch}"
exit 1
;;
esac
install -Dm755 %{_builddir}/danklinux-master/bin/${DMS_BINARY} %{buildroot}%{_bindir}/dms
# Shell completions
install -d %{buildroot}%{_datadir}/bash-completion/completions
install -d %{buildroot}%{_datadir}/zsh/site-functions
install -d %{buildroot}%{_datadir}/fish/vendor_completions.d
%{_builddir}/danklinux-master/bin/${DMS_BINARY} completion bash > %{buildroot}%{_datadir}/bash-completion/completions/dms || :
%{_builddir}/danklinux-master/bin/${DMS_BINARY} completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_dms || :
%{_builddir}/danklinux-master/bin/${DMS_BINARY} completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish || :
# Install dgop binary
install -Dm755 %{_builddir}/dgop %{buildroot}%{_bindir}/dgop
# Install systemd user service
install -Dm644 assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service
# Install shell files to shared data location
install -dm755 %{buildroot}%{_datadir}/quickshell/dms
cp -r * %{buildroot}%{_datadir}/quickshell/dms/
# Remove build files
rm -rf %{buildroot}%{_datadir}/quickshell/dms/.git*
rm -f %{buildroot}%{_datadir}/quickshell/dms/.gitignore
rm -rf %{buildroot}%{_datadir}/quickshell/dms/.github
rm -f %{buildroot}%{_datadir}/quickshell/dms/*.spec
%posttrans
# Clean up old installation path from previous versions (only if empty)
if [ -d "%{_sysconfdir}/xdg/quickshell/dms" ]; then
# Remove directories only if empty (preserves any user-added files)
rmdir "%{_sysconfdir}/xdg/quickshell/dms" 2>/dev/null || true
rmdir "%{_sysconfdir}/xdg/quickshell" 2>/dev/null || true
rmdir "%{_sysconfdir}/xdg" 2>/dev/null || true
fi
# Restart DMS for active users after upgrade
if [ "$1" -ge 2 ]; then
pkill -USR1 -x dms >/dev/null 2>&1 || true
fi
%files
%license LICENSE
%doc README.md CONTRIBUTING.md
%{_datadir}/quickshell/dms/
%{_userunitdir}/dms.service
%files -n dms-cli
%{_bindir}/dms
%{_datadir}/bash-completion/completions/dms
%{_datadir}/zsh/site-functions/_dms
%{_datadir}/fish/vendor_completions.d/dms.fish
%files -n dgop
%{_bindir}/dgop
%changelog
{{{ git_repo_changelog }}}

69
quickshell/flake.lock generated
View File

@@ -1,69 +0,0 @@
{
"nodes": {
"dgop": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1762435535,
"narHash": "sha256-QhzRn7pYN35IFpKjjxJAj3GPJECuC+VLhoGem3ezycc=",
"owner": "AvengeMedia",
"repo": "dgop",
"rev": "6cf638dde818f9f8a2e26d0243179c43cb3458d7",
"type": "github"
},
"original": {
"owner": "AvengeMedia",
"repo": "dgop",
"type": "github"
}
},
"dms-cli": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1762491516,
"narHash": "sha256-oGLH5Gje/p2Hc1kO3m8P5eAZ7JldBI30EmwzEET4cNU=",
"owner": "AvengeMedia",
"repo": "danklinux",
"rev": "050cf28a2963a7698ed4759736fe5fe77eee7cc2",
"type": "github"
},
"original": {
"owner": "AvengeMedia",
"repo": "danklinux",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1762363567,
"narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ae814fd3904b621d8ab97418f1d0f2eb0d3716f4",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"dgop": "dgop",
"dms-cli": "dms-cli",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@@ -1,86 +0,0 @@
{
description = "Dank Material Shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
dgop = {
url = "github:AvengeMedia/dgop";
inputs.nixpkgs.follows = "nixpkgs";
};
dms-cli = {
url = "github:AvengeMedia/danklinux";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
dgop,
dms-cli,
...
}: let
forEachSystem = fn:
nixpkgs.lib.genAttrs
["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux"]
(system: fn system nixpkgs.legacyPackages.${system});
buildDmsPkgs = pkgs: {
dmsCli = dms-cli.packages.${pkgs.stdenv.hostPlatform.system}.default;
dgop = dgop.packages.${pkgs.stdenv.hostPlatform.system}.dgop;
dankMaterialShell = self.packages.${pkgs.stdenv.hostPlatform.system}.dankMaterialShell;
};
in {
formatter = forEachSystem (_: pkgs: pkgs.alejandra);
packages = forEachSystem (system: pkgs: {
dankMaterialShell = let
mkDate = longDate: pkgs.lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
];
in pkgs.stdenvNoCC.mkDerivation {
pname = "dankMaterialShell";
version = pkgs.lib.removePrefix "v" (pkgs.lib.trim (builtins.readFile ./VERSION))
+ "+date=" + mkDate (self.lastModifiedDate or "19700101")
+ "_" + (self.shortRev or "dirty");
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
!(builtins.any (prefix: pkgs.lib.path.hasPrefix (./. + prefix) (/. + path)) [
/.github
/.gitignore
/dms.spec
/dms-greeter.spec
/nix
/flake.nix
/flake.lock
/alejandra.toml
]);
};
installPhase = ''
mkdir -p $out/etc/xdg/quickshell/dms
cp -r . $out/etc/xdg/quickshell/dms
'';
};
default = self.packages.${system}.dankMaterialShell;
});
homeModules.dankMaterialShell.default = {pkgs, ...}: let
dmsPkgs = buildDmsPkgs pkgs;
in {
imports = [./nix/default.nix];
_module.args.dmsPkgs = dmsPkgs;
};
homeModules.dankMaterialShell.niri = import ./nix/niri.nix;
nixosModules.greeter = {pkgs, ...}: let
dmsPkgs = buildDmsPkgs pkgs;
in {
imports = [./nix/greeter.nix];
_module.args.dmsPkgs = dmsPkgs;
};
};
}

View File

@@ -1,170 +0,0 @@
{
config,
pkgs,
lib,
dmsPkgs,
...
}: let
cfg = config.programs.dankMaterialShell;
jsonFormat = pkgs.formats.json { };
in {
imports = [
(lib.mkRemovedOptionModule ["programs" "dankMaterialShell" "enableNightMode"] "Night mode is now always available.")
(lib.mkRenamedOptionModule ["programs" "dankMaterialShell" "enableSystemd"] ["programs" "dankMaterialShell" "systemd" "enable"])
];
options.programs.dankMaterialShell = with lib.types; {
enable = lib.mkEnableOption "DankMaterialShell";
systemd = {
enable = lib.mkEnableOption "DankMaterialShell systemd startup";
restartIfChanged = lib.mkOption {
type = bool;
default = true;
description = "Auto-restart dms.service when dankMaterialShell changes";
};
};
enableSystemMonitoring = lib.mkOption {
type = bool;
default = true;
description = "Add needed dependencies to use system monitoring widgets";
};
enableClipboard = lib.mkOption {
type = bool;
default = true;
description = "Add needed dependencies to use the clipboard widget";
};
enableVPN = lib.mkOption {
type = bool;
default = true;
description = "Add needed dependencies to use the VPN widget";
};
enableBrightnessControl = lib.mkOption {
type = bool;
default = true;
description = "Add needed dependencies to have brightness/backlight support";
};
enableColorPicker = lib.mkOption {
type = bool;
default = true;
description = "Add needed dependencies to have color picking support";
};
enableDynamicTheming = lib.mkOption {
type = bool;
default = true;
description = "Add needed dependencies to have dynamic theming support";
};
enableAudioWavelength = lib.mkOption {
type = bool;
default = true;
description = "Add needed dependencies to have audio waveleng support";
};
enableCalendarEvents = lib.mkOption {
type = bool;
default = true;
description = "Add calendar events support via khal";
};
enableSystemSound = lib.mkOption {
type = bool;
default = true;
description = "Add needed dependencies to have system sound support";
};
quickshell = {
package = lib.mkPackageOption pkgs "quickshell" {};
};
default = {
settings = lib.mkOption {
type = jsonFormat.type;
default = { };
description = "The default settings are only read if the settings.json file don't exist";
};
session = lib.mkOption {
type = jsonFormat.type;
default = { };
description = "The default session are only read if the session.json file don't exist";
};
};
plugins = lib.mkOption {
type = attrsOf (types.submodule ({ config, ... }: {
options = {
enable = lib.mkOption {
type = types.bool;
default = true;
description = "Whether to link this plugin";
};
src = lib.mkOption {
type = types.path;
description = "Source to link to DMS plugins directory";
};
};
}));
default = {};
description = "DMS Plugins to install";
};
};
config = lib.mkIf cfg.enable
{
programs.quickshell = {
enable = true;
package = cfg.quickshell.package;
configs.dms = "${dmsPkgs.dankMaterialShell}/etc/xdg/quickshell/dms";
};
systemd.user.services.dms = lib.mkIf cfg.systemd.enable {
Unit = {
Description = "DankMaterialShell";
PartOf = [ config.wayland.systemd.target ];
After = [ config.wayland.systemd.target ];
X-Restart-Triggers = lib.optional cfg.systemd.restartIfChanged config.programs.quickshell.configs.dms;
};
Service = {
ExecStart = lib.getExe dmsPkgs.dmsCli + " run";
Restart = "on-failure";
};
Install.WantedBy = [ config.wayland.systemd.target ];
};
xdg.stateFile."DankMaterialShell/default-session.json" = lib.mkIf (cfg.default.session != { }) {
source = jsonFormat.generate "default-session.json" cfg.default.session;
};
xdg.configFile = lib.mkMerge [
(lib.mapAttrs' (name: plugin: {
name = "DankMaterialShell/plugins/${name}";
value.source = plugin.src;
}) (lib.filterAttrs (n: v: v.enable) cfg.plugins))
{
"DankMaterialShell/default-settings.json" = lib.mkIf (cfg.default.settings != { }) {
source = jsonFormat.generate "default-settings.json" cfg.default.settings;
};
}
];
home.packages =
[
pkgs.material-symbols
pkgs.inter
pkgs.fira-code
pkgs.ddcutil
pkgs.libsForQt5.qt5ct
pkgs.kdePackages.qt6ct
dmsPkgs.dmsCli
]
++ lib.optional cfg.enableSystemMonitoring dmsPkgs.dgop
++ lib.optionals cfg.enableClipboard [pkgs.cliphist pkgs.wl-clipboard]
++ lib.optionals cfg.enableVPN [pkgs.glib pkgs.networkmanager]
++ lib.optional cfg.enableBrightnessControl pkgs.brightnessctl
++ lib.optional cfg.enableColorPicker pkgs.hyprpicker
++ lib.optional cfg.enableDynamicTheming pkgs.matugen
++ lib.optional cfg.enableAudioWavelength pkgs.cava
++ lib.optional cfg.enableCalendarEvents pkgs.khal
++ lib.optional cfg.enableSystemSound pkgs.kdePackages.qtmultimedia;
};
}

View File

@@ -1,127 +0,0 @@
{
lib,
config,
pkgs,
dmsPkgs,
...
}: let
inherit (lib) types;
cfg = config.programs.dankMaterialShell.greeter;
user = config.services.greetd.settings.default_session.user;
greeterScript = pkgs.writeShellScriptBin "dms-greeter" ''
export PATH=$PATH:${lib.makeBinPath [ cfg.quickshell.package config.programs.${cfg.compositor.name}.package ]}
${lib.escapeShellArgs ([
"sh"
"${../Modules/Greetd/assets/dms-greeter}"
"--cache-dir"
"/var/lib/dmsgreeter"
"--command"
cfg.compositor.name
"-p"
"${dmsPkgs.dankMaterialShell}/etc/xdg/quickshell/dms"
]
++ lib.optionals (cfg.compositor.customConfig != "") [
"-C"
"${pkgs.writeText "dmsgreeter-compositor-config" cfg.compositor.customConfig}"
])} ${lib.optionalString cfg.logs.save "> ${cfg.logs.path} 2>&1"}
'';
in {
imports =
let
msg = "The option 'programs.dankMaterialShell.greeter.compositor.extraConfig' is deprecated. Please use 'programs.dankMaterialShell.greeter.compositor.customConfig' instead.";
in
[ (lib.mkRemovedOptionModule [ "programs" "dankMaterialShell" "greeter" "compositor" "extraConfig" ] msg) ];
options.programs.dankMaterialShell.greeter = {
enable = lib.mkEnableOption "DankMaterialShell greeter";
compositor.name = lib.mkOption {
type = types.enum ["niri" "hyprland" "sway"];
description = "Compositor to run greeter in";
};
compositor.customConfig = lib.mkOption {
type = types.lines;
default = "";
description = "Custom compositor config";
};
configFiles = lib.mkOption {
type = types.listOf types.path;
default = [];
description = "Config files to copy into data directory";
example = [
"/home/user/.config/DankMaterialShell/settings.json"
];
};
configHome = lib.mkOption {
type = types.nullOr types.str;
default = null;
example = "/home/user";
description = ''
User home directory to copy configurations for greeter
If DMS config files are in non-standard locations then use the configFiles option instead
'';
};
quickshell = {
package = lib.mkPackageOption pkgs "quickshell" {};
};
logs.save = lib.mkEnableOption "saving logs from DMS greeter to file";
logs.path = lib.mkOption {
type = types.path;
default = "/tmp/dms-greeter.log";
description = ''
File path to save DMS greeter logs to
'';
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = (config.users.users.${user} or { }) != { };
message = ''
dmsgreeter: user set for greetd default_session ${user} does not exist. Please create it before referencing it.
'';
}
];
services.greetd = {
enable = lib.mkDefault true;
settings.default_session.command = lib.mkDefault (lib.getExe greeterScript);
};
fonts.packages = with pkgs; [
fira-code
inter
material-symbols
];
systemd.tmpfiles.settings."10-dmsgreeter" = {
"/var/lib/dmsgreeter".d = {
user = user;
group = if config.users.users.${user}.group != ""
then config.users.users.${user}.group else "greeter";
mode = "0755";
};
};
systemd.services.greetd.preStart = ''
cd /var/lib/dmsgreeter
${lib.concatStringsSep "\n" (lib.map (f: ''
if [ -f "${f}" ]; then
cp "${f}" .
fi
'') cfg.configFiles)}
if [ -f session.json ]; then
if cp "$(${lib.getExe pkgs.jq} -r '.wallpaperPath' session.json)" wallpaper.jpg; then
mv session.json session.orig.json
${lib.getExe pkgs.jq} '.wallpaperPath = "/var/lib/dmsgreeter/wallpaper.jpg"' session.orig.json > session.json
fi
fi
mv dms-colors.json colors.json || :
chown ${user}: * || :
'';
programs.dankMaterialShell.greeter.configFiles = lib.mkIf (cfg.configHome != null) [
"${cfg.configHome}/.config/DankMaterialShell/settings.json"
"${cfg.configHome}/.local/state/DankMaterialShell/session.json"
"${cfg.configHome}/.cache/DankMaterialShell/dms-colors.json"
];
};
}

View File

@@ -1,105 +0,0 @@
{
config,
lib,
...
}: let
cfg = config.programs.dankMaterialShell;
in {
options.programs.dankMaterialShell = {
niri = {
enableKeybinds = lib.mkEnableOption "DankMaterialShell niri keybinds";
enableSpawn = lib.mkEnableOption "DankMaterialShell niri spawn-at-startup";
};
};
config = lib.mkIf cfg.enable {
programs.niri.settings = lib.mkMerge [
(lib.mkIf cfg.niri.enableKeybinds {
binds = with config.lib.niri.actions; let
dms-ipc = spawn "dms" "ipc";
in
{
"Mod+Space" = {
action = dms-ipc "spotlight" "toggle";
hotkey-overlay.title = "Toggle Application Launcher";
};
"Mod+N" = {
action = dms-ipc "notifications" "toggle";
hotkey-overlay.title = "Toggle Notification Center";
};
"Mod+Comma" = {
action = dms-ipc "settings" "toggle";
hotkey-overlay.title = "Toggle Settings";
};
"Mod+P" = {
action = dms-ipc "notepad" "toggle";
hotkey-overlay.title = "Toggle Notepad";
};
"Super+Alt+L" = {
action = dms-ipc "lock" "lock";
hotkey-overlay.title = "Toggle Lock Screen";
};
"Mod+X" = {
action = dms-ipc "powermenu" "toggle";
hotkey-overlay.title = "Toggle Power Menu";
};
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = dms-ipc "audio" "increment" "3";
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action = dms-ipc "audio" "decrement" "3";
};
"XF86AudioMute" = {
allow-when-locked = true;
action = dms-ipc "audio" "mute";
};
"XF86AudioMicMute" = {
allow-when-locked = true;
action = dms-ipc "audio" "micmute";
};
"Mod+Alt+N" = {
allow-when-locked = true;
action = dms-ipc "night" "toggle";
hotkey-overlay.title = "Toggle Night Mode";
};
}
// lib.attrsets.optionalAttrs cfg.enableSystemMonitoring {
"Mod+M" = {
action = dms-ipc "processlist" "toggle";
hotkey-overlay.title = "Toggle Process List";
};
}
// lib.attrsets.optionalAttrs cfg.enableClipboard {
"Mod+V" = {
action = dms-ipc "clipboard" "toggle";
hotkey-overlay.title = "Toggle Clipboard Manager";
};
}
// lib.attrsets.optionalAttrs cfg.enableBrightnessControl {
"XF86MonBrightnessUp" = {
allow-when-locked = true;
action = dms-ipc "brightness" "increment" "5" "";
};
"XF86MonBrightnessDown" = {
allow-when-locked = true;
action = dms-ipc "brightness" "decrement" "5" "";
};
};
})
(lib.mkIf cfg.niri.enableSpawn {
spawn-at-startup =
[
{command = ["dms" "run"];}
]
++ lib.optionals cfg.enableClipboard [
{
command = ["wl-paste" "--watch" "cliphist" "store"];
}
];
})
];
};
}