Huỳnh Thiện Lộc 95ee917e37 feat(screenshot): support 4-corner resizing while holding Ctrl (#3259)
* feat(screenshot): support 4-corner resizing while holding Ctrl

- Hit-test selection corners when Ctrl is held to allow resizing.
- Set opposite corner as fixed anchor and update dynamic cursor shape
  (NwseResize/NeswResize).
- Draw corner handle indicators when Ctrl is held or during active resize.
- Add 'Ctrl resize/move' to overlay HUD and provide complete glyph
  coverage for HUD labels.
- Add comprehensive unit tests covering hit testing, inverted dragging,
  incremental handle damage, and glyph coverage.

* fix(screenshot): invalidate background cache on handle and shift modifier changes

- Track backgroundHandles and backgroundShift in RenderSlot.cacheValid.
- Rebuild background slot and HUD when handle or shift modifier states
  change with an existing selection, preventing incremental re-dimming
  from punching holes in the HUD.
- Fix trailing newline in region_resize_test.go for golangci-lint.

* fix(screenshot): gate redraw and handle dimming on render modifier changes

- Only trigger redrawSurface when Shift or Ctrl modifier states actually
  change, preventing redundant redraws when tapping Alt, Super, or Locks.
- Only re-dim and damage corner handle bounding boxes in overlayDelta and
  overlayDamage when handles move or their visibility changes, preventing
  unnecessary re-dimming of stationary handles over the HUD.
- Add TestOverlayDeltaIdenticalOverlayNoHandleDimming test.

* fix(screenshot): measure hud text advance accurately to prevent pill overflow

- Use (1+len(item.desc))*(charW+1) when calculating totalW in drawHUD,
  matching the full 9px advance used when drawing space and description.
- Add TestHUDDimensionsContainText to verify HUD pill dimensions enclose
  all text items with correct padding across all variant combinations.

* fix(screenshot): compare handle rect sets in overlay delta and damage

- Use slices.Equal to compare prev and cur handleRects in overlayDelta
  and overlayDamage instead of interior equality.
- Properly re-dim and damage handles when selection corners cross monitor
  boundaries where clamped interior is unchanged but top/bottom/left/right
  flags change.
- Add TestOverlayDeltaHandlesClampedMonitorEdge test.

* test(screenshot): verify drawHUD output buffer pixels stay within pill bounds

- Extract hudDimensions helper on RegionSelector used by drawHUD.
- Update TestHUDDimensionsContainText to drive drawHUD directly into a
  zeroed buffer and assert no lit pixel falls outside the computed
  HUD pill boundary across all configuration variants.
2026-09-02 09:23:37 -04:00
2026-09-01 10:28:46 -04:00
2026-09-01 12:42:13 -04:00
2026-07-16 12:15:20 -04:00
2026-08-28 10:21:37 -04:00
2026-09-01 12:42:13 -04:00
2025-11-12 20:34:58 -05:00
2026-08-31 14:20:45 -04:00

DankMaterialShell

DankMaterialShell

A modern desktop shell for Wayland

Built with Quickshell and Go

Documentation GitHub stars GitHub License GitHub release Arch version AUR version (git) Ko-Fi donate

DankMaterialShell is a complete desktop shell for niri, Hyprland, MangoWC, Sway, labwc, Scroll, Miracle WM, and other Wayland compositors. It replaces waybar, swaylock, swayidle, mako, fuzzel, polkit, and everything else you'd normally stitch together to make a desktop.

Repository Structure

This is a monorepo containing both the shell interface and the core backend services:

DankMaterialShell/
├── quickshell/         # QML-based shell interface
│   ├── Modules/        # UI components (panels, widgets, overlays)
│   ├── Services/       # System integration (audio, network, bluetooth)
│   ├── Widgets/        # Reusable UI controls
│   └── Common/         # Shared resources and themes
├── core/               # Go backend and CLI
│   ├── cmd/            # dms CLI and dankinstall binaries
│   ├── internal/       # System integration, IPC, distro support
│   └── pkg/            # Shared packages
├── distro/             # Distribution packaging
│   ├── fedora/         # Fedora RPM specs
│   ├── debian/         # Debian packaging
│   └── nix/            # NixOS/home-manager modules
└── flake.nix           # Nix flake for declarative installation

See it in Action

More Screenshots
Desktop Dashboard Launcher Control Center

Installation

curl -fsSL https://install.danklinux.com | sh

One command installs DMS and all dependencies on Arch, Fedora, Debian, Ubuntu, openSUSE, or Gentoo.

Manual installation guide

Features

Dynamic Theming Wallpaper-based color schemes that automatically theme GTK, Qt, terminals, editors (vscode, vscodium), and more using matugen and dank16.

System Monitoring Real-time CPU, RAM, GPU metrics and temperatures built into the dms daemon (powered by dgop). Process list with search and management.

Powerful Launcher Spotlight-style search for applications, files (dsearch), emojis, running windows, calculator, and commands. Extensible with plugins.

Control Center Unified interface for network, Bluetooth, audio devices, display settings, and night mode.

Smart Notifications Notification center with grouping, rich text support, and keyboard navigation.

Media Integration MPRIS player controls, calendar sync, weather widgets, and clipboard history with image previews.

Session Management Lock screen, idle detection, auto-lock/suspend with separate AC/battery settings, and a settings front-end for dank-greeter.

Plugin System Extend functionality with the plugin registry. DMS keeps ~/.config/DankMaterialShell/plugins.lock.json synchronized with managed plugin installs and their exact Git commits, so the same plugins can be reproduced on another machine.

Supported Compositors

Works best with niri, Hyprland, Sway, MangoWC, labwc, Scroll, and Miracle WM with full workspace switching, overview integration, and monitor management. Other Wayland compositors work with reduced features.

Compositor configuration guide

Command Line Interface

Control the shell from the command line or keybinds:

dms run              # Start the shell
dms ipc call spotlight toggle
dms ipc call audio setvolume 50
dms ipc call wallpaper set /path/to/image.jpg
dms brightness list  # List available displays
dms plugins search   # Browse plugin registry
dms plugins lock     # Refresh the portable plugin lockfile
dms plugins restore ~/plugins.lock.json

Full CLI and IPC documentation

Documentation

Dank Projects

DMS is one piece of the suite. The rest lives in its own repos:

  • dank-greeter - greetd login screen with the Dank Material aesthetic. The Greeter tab in DMS settings is the front-end for it.
  • dankcalendar - Local, Google, Microsoft, and CalDAV calendars for the dank desktop.
  • dgop - System monitoring TUI and Go library; its library powers the process list and dashboard widgets inside the dms daemon.
  • dsearch - Fast file search that powers file results in the launcher.
  • dank-qml-common - Shared QML widgets and components used by DMS, dank-greeter, and dankcalendar.
  • dankgo - Common Go modules behind the single binary apps.

Development

See component-specific documentation:

  • quickshell/ - QML shell development, widgets, and modules
  • core/ - Go backend, CLI tools, and system integration
  • distro/ - Distribution packaging (Fedora, Debian, NixOS)

Building from Source

Core + Dankinstall:

cd core
make              # Build dms CLI
make dankinstall  # Build installer

Shell:

quickshell -p quickshell/

NixOS:

{
  inputs.dms.url = "github:AvengeMedia/DankMaterialShell";

  # Use in home-manager or NixOS configuration
  imports = [ inputs.dms.homeModules.dank-material-shell ];
}

Contributing

Contributions welcome. Bug fixes, widgets, features, documentation, and plugins all help.

  1. Fork the repository
  2. Make your changes
  3. Test thoroughly
  4. Open a pull request

For documentation contributions, see DankLinux-Docs.

Credits

Star History

Star History Chart

License

MIT License - See LICENSE for details.

Languages
QML 58.1%
Go 32.3%
JavaScript 5.9%
Shell 1.3%
Python 0.9%
Other 1.5%