A simple Rust program that listens for the "PrintScreen" key and captures screenshots when pressed. The screenshots are saved with timestamps in a specified directory.
- Captures screenshots of all connected screens.
- Saves each screenshot with a timestamp in the specified directory.
- Allows for custom directory specification via command-line arguments.
- Default directory is
screens
.
- Rust programming language (use rustup to install Rust).
- External dependencies:
chrono
- for working with dates and times.rdev
- for capturing keyboard events.screenshots
- for capturing the screen.
-
Clone the repository:
git clone https://github.com/vihrom/screenshot_saver.git
-
Navigate to the project directory:
cd screenshot_saver
-
Build the project using Cargo:
cargo build --release
After building the project, you can run the compiled executable from the target/release
directory.
You can also run the program without building it by using the following command:
cargo run
Example usage with a custom directory:
cargo run -- "custom_screenshots"