Skip to content

Conversation

@sunnyallana
Copy link
Contributor

Description:

This pull request introduces a customizable screenshot utility for Hyprland using a single script named screenshot. The script leverages the grim tool and other utilities like slurp, swappy, and hyprpicker. It allows users to take screenshots with various configurations, save them to their preferred location, copy them to the clipboard, or edit them interactively.

Features:

  • Region-based screenshot (rc): Allows the user to select a screen region for capturing using slurp, and copies it to the clipboard.
  • Fullscreen screenshot (rf, sf): Captures the entire screen and saves the image to the ~/Pictures/Screenshots folder with a timestamped filename.
  • Interactive screenshot (ri, si): Takes a screenshot and lets the user edit it using swappy.
  • Clipboard saving (sc): Captures the full screen and copies it directly to the clipboard.
  • Color picker (p): Captures a pixel color using hyprpicker and copies it to the clipboard.

Key Bindings:

  • Print: Default screenshot action (full screen to clipboard).
  • Super + Print: Region-based screenshot.
  • Ctrl + Print: Full-screen screenshot (saves to file).
  • Shift + Print: Captures the full screen to clipboard.
  • Super + Shift + Print: Saves the full-screen screenshot with a timestamp.
  • Ctrl + Shift + Print: Captures interactive screenshot.
  • Alt + Print: Copies color under the cursor to clipboard.

Changes:

  • Added the screenshot script to handle different screenshot actions based on input arguments (region, full screen, clipboard, interactive).
  • Creates a Screenshots folder if it doesn't exist and saves images with timestamps.
  • Adds notifications for screenshot actions, such as when a screenshot is copied or saved.

Why:

This utility provides a flexible and easy-to-use way to take, save, and manage screenshots on Hyprland. It leverages existing tools like grim, slurp, and swappy, allowing users to capture screenshots with a range of options and store them efficiently.

Testing:

  • Verified screenshot actions work as expected for region, full-screen, interactive, and clipboard options.
  • Ensured that screenshots are saved with unique filenames based on the current date and time.
  • Confirmed functionality of notifications after each action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant