Trash Bin
July 14, 2026 ยท View on GitHub
Monitor and manage your system trash directly from your status bar.
Features
- Real-time Monitoring: Poll-based updates every 5 seconds for instant trash status detection.
- Trash Status Display: Dynamic icon colors (primary when full, outline when empty).
- Sound Feedback: Plays a sound effect when a file is moved to the trash.
- Quick Access: Left-click to open the trash in your file manager.
- Empty Trash: One-click button to permanently delete all files.
- Auto-Clean: Configurable automatic cleanup (hourly) โ deletes files older than 1, 3, 7, or 15 days.
- External Drive Support: Detects and manages trash directories on external mounts (
/mnt,/media,/run/media). - Multi-language Support: English and Chinese (zh).
Requirements
- DankMaterialShell: The plugin runs within the DankMaterialShell environment.
- gio: For trash operations (list, empty, open).
- paplay: For sound playback (optional, part of PulseAudio).
- notify-send or dms notify: For desktop notifications when trash is emptied.
Configuration
- Go to Plugin Settings.
- Enable Auto-Clean if you want automatic cleanup of old files.
- Select the Clean-up Days interval (1, 3, 7, or 15 days).
- Settings are saved automatically and persisted across sessions.
Usage
- Left-click: Open the trash in your file manager.
- Right-click: Open the settings popout to configure auto-clean options and empty the trash.
- Status Bar Icon: Changes color between empty (dimmed) and full (accent) states.
Permissions
settings_read/settings_write: For storing auto-clean preferences.process: For executing shell commands (trash count, auto-clean, empty trash).
Technical Details
- Polling Interval: 5 seconds for trash status updates.
- Auto-Clean Interval: Every hour, with
timeout(300s) andionice(idle) safeguards. - Auto-Clean Mechanism: Reads
.trashinfofiles, calculates age based onDeletionDate, and removes files older than the configured interval. - Trash Paths:
~/.local/share/Trashand external mount points (.Trash-$UID). - Sound Files:
~/.local/share/sounds/harmony2/stereo/file-trash.ogg(deletion) andtrash-empty.ogg(empty).
Changelog
- v1.3.1: Fix auto-clean default inconsistency, add process onExited handlers, remove unnecessary permissions, clean up redundant code.
- v1.3.0: Add auto-clean feature with configurable time options.
- v1.2.0: Remove trash-cli dependency, use native Linux commands.
- v1.1.0: Initial release.
License
MIT License