Intelligent desktop file organization tool that automatically sorts and categorizes files on the macOS desktop into appropriate folders based on file type, age, and usage patterns.
- Automatic File Categorization: Sorts files into folders based on their types (images, documents, code, etc.)
- Smart Organization Rules: Uses file age, access patterns, and importance to determine appropriate actions
- DELETE Folder: Creates a special folder for temporary or low-value files awaiting review
- Interactive Mode: Confirms before moving important files with detailed information
- Scheduling: Supports automated cleanup on hourly, daily, or weekly schedules
- Quiet Hours: Prevents scheduled runs during specified time periods
- Undo Capability: Can reverse the most recent organization operation
- Detailed Logging: Maintains comprehensive logs for all actions
-
Clone the repository:
git clone <repository-url> cd desktidy -
Make the main script executable:
chmod +x desktidy.py -
Optionally, create a symbolic link to make it accessible globally:
ln -s $(pwd)/desktidy.py /usr/local/bin/desktidy
Run the tool with default settings (interactive mode):
./desktidy.py
usage: desktidy.py [-h] [--dry-run] [--non-interactive] [--undo] [--auto]
[--schedule {hourly,daily,weekly}] [--time TIME]
[--day {monday,tuesday,wednesday,thursday,friday,saturday,sunday}]
[--interval INTERVAL] [--unschedule] [--schedule-info]
[--quiet-hours {enable,disable}] [--quiet-start QUIET_START]
[--quiet-end QUIET_END]
Intelligent desktop file organization tool
options:
-h, --help show this help message and exit
--dry-run Run without actually moving any files (default: False)
--non-interactive Run without asking for confirmation for each file
(default: False)
--undo Undo the last organization operation (default: False)
--auto Run automatically (used by scheduler) (default: False)
Scheduling options:
--schedule {hourly,daily,weekly}
Schedule automatic cleanup
--time TIME Time for scheduled cleanup (HH:MM format)
--day {monday,tuesday,wednesday,thursday,friday,saturday,sunday}
Day for weekly scheduled cleanup
--interval INTERVAL Minutes between runs for hourly schedule
--unschedule Remove scheduled cleanup (default: False)
--schedule-info Show scheduled cleanup information (default: False)
Quiet hours options:
--quiet-hours {enable,disable}
Enable or disable quiet hours
--quiet-start QUIET_START
Start time for quiet hours (HH:MM format)
--quiet-end QUIET_END
End time for quiet hours (HH:MM format)
-
Run in dry-run mode (no actual changes):
./desktidy.py --dry-run -
Run in non-interactive mode:
./desktidy.py --non-interactive -
Undo the last organization:
./desktidy.py --undo -
Schedule daily cleanup at 3 AM:
./desktidy.py --schedule daily --time 03:00 -
Schedule weekly cleanup on Sunday at 1 AM:
./desktidy.py --schedule weekly --day sunday --time 01:00 -
Set quiet hours (9 AM to 6 PM):
./desktidy.py --quiet-hours enable --quiet-start 09:00 --quiet-end 18:00 -
View current schedule:
./desktidy.py --schedule-info -
Remove scheduling:
./desktidy.py --unschedule
The tool organizes files into the following folders on your desktop:
- Images: Photos and graphics (.jpg, .png, .gif, etc.)
- Documents: Text files and office documents (.pdf, .doc, .txt, etc.)
- Code: Programming and markup files (.py, .js, .html, etc.)
- Archives: Compressed files (.zip, .tar.gz, .rar, etc.)
- Audio: Sound files (.mp3, .wav, .aac, etc.)
- Video: Video files (.mp4, .mov, .avi, etc.)
- Apps: Executable files (.app, .exe, .dmg, etc.)
- Screenshots: macOS screenshot files
- Miscellaneous: Files that don't fit other categories
- DELETE: Temporary and low-value files for review
All logs and configuration files are stored in the ~/.desktidy/ directory:
- Logs:
~/.desktidy/logs/ - History:
~/.desktidy/history/ - Schedule Config:
~/.desktidy/schedule.json