A CLI tool for moving newly created files (like those in download directories) to the current directory.
- Rust 1.70+ (for edition 2024 support)
cargo build --release
The compiled binary will be located at target/release/m
Run in any directory:
./m
The program will:
- Read configuration from
~/.config/m/m.json
- Scan configured directories for recently created files
- If files are found, display an interactive list for selection
- Move the selected file to the current directory
? Select a file to move:
> 14:43 12KB document.docx
14:41 3MB hello.png
[Use arrow keys to navigate, press Enter to select]
After pressing Enter:
Successfully moved 'document.docx' to current directory
The configuration file is located at ~/.config/m/m.json
and contains:
source_dir
: Array of directory paths to monitortime_limit
: File creation time limit in minutes
A default configuration file will be created on first run:
{
"source_dir": [
"/home/user/Downloads/"
],
"time_limit": 20
}
{
"source_dir": [
"/home/user/Downloads/",
"/home/user/Desktop/",
"/tmp/"
],
"time_limit": 30
}