trash-cli is a command-line interface implementing the FreeDesktop.org Trash specification. It provides five primary commands: trash-put (move files to trash), trash-list (list trashed files), trash-restore (interactively restore files), trash-empty (empty trash directories), and trash-rm (remove specific trashed files). The architecture is modular, with separate packages for each command (trashcli/put/, trashcli/list/, trashcli/restore/, trashcli/empty/, trashcli/rm/) sharing common utilities from trashcli/lib/, trashcli/fslib/, and trashcli/fstab/. Key entry points are the main() functions in each command's main.py module, invoked via shell scripts (trash, trash-put, etc.). Data flows involve reading trash directories (per the spec's rules for $XDG_DATA_HOME/Trash, .Trash/$uid, .Trash-$uid), parsing .trashinfo files, and performing file operations (move, delete, restore) with security checks (sticky bits, symlinks, world-writable directories). External dependencies include psutil (for volume detection), six (Python 2/3 compatibility), and optionally shtab (shell completion). The codebase is well-tested with a comprehensive fake filesystem for unit tests and integration tests covering edge cases.
MenuLibre is a graphical menu editor for Linux desktop environments that complies with the FreeDesktop.org Desktop Entry and Menu specifications. It allows users to create, edit, and manage application launchers (.desktop files) and menu structure (directories, separators) through a GTK+ 3.0 interface. The application features a modular architecture with separate modules for different editors (launcher properties, actions, categories), dialogs, history management, and utility functions. Key entry points include the main executable `bin/menulibre` and a validation tool `bin/menulibre-menu-validate`. The system relies on external dependencies such as GTK+ 3.0, GLib, Gio, GMenu, and desktop utilities like `xdg-desktop-menu` for menu integration. Data flows involve reading/writing .desktop files via GLib.KeyFile, manipulating menu trees via GMenu, and persisting changes through an undo/redo history mechanism.