A command-line tool for capturing screenshots on X11 systems.
- Full Screen Capture: Take a screenshot of the entire screen immediately or after a delay.
- Active Window Capture: Capture the currently active window after a click.
- Area Selection: Select a specific area of the screen to capture using the mouse.
- Error Handling: Handling of file operations and memory issues.
- PNG Saving: Screenshots are saved in PNG format and copied to the clipboard.
- Notifications: Receive a desktop notification upon saving a screenshot.
To use this utility, you need to compile the source code. Ensure you have the necessary dependencies installed:
gcc
compilerlibX11
libpng
notify-send (optional)
On Debian-based distributions such as Debian, Ubuntu, or Linux Mint, use apt to install the required packages:
sudo apt-get update
sudo apt-get install gcc libx11-dev libpng-dev libnotify-bin
On Fedora, you can use dnf to install the dependencies:
sudo dnf install gcc libX11-devel libpng-devel libnotify
On Arch Linux or Arch-based distributions, you can install the necessary dependencies using pacman:
sudo pacman -S gcc libx11 libpng notify-osd
To install ScreenshotR on your system, run the following command:
make install
This will compile and install ScreenshotR system-wide. Ensure you have the necessary permissions to install software on your system.
If you prefer to compile ScreenshotR without installing it system-wide, use:
make
Alternatively, you can compile it directly using GCC with the following command:
gcc -o screenshotr main.c -O2 -lX11 -lpng
After compilation, you can run the executable with the following options:
- Immediate Screenshot: Use
--now
to capture the full screen without delay. - Delayed Screenshot: Use
--inX
followed by the delay in seconds to capture the full screen after the specified delay. - Active Window: Use
--active
to capture the window currently in focus after clicking on it. - Selected Area: Use
--select
to capture a user-defined area of the screen by dragging the mouse.
This project is licensed under the MIT License. See the LICENSE file for details.
The utility interacts with the X11 display server to capture screenshots. It uses the libX11
library to interface with the X server and libpng
for saving images in PNG format. Notifications are displayed using the notify-send
command, and screenshots are copied to the clipboard using xclip
.
For detailed changes and updates, refer to the CHANGELOG.md file.
Contributions are welcome! If you have suggestions, bug reports, or would like to contribute code, please submit an issue or pull request via the GitHub repository.
For further inquiries or support, you can reach out via:
- Email: oliviamaxw@gmail.com