diff --git a/quiethost/screenshot_grab.sh b/image editing/screenshot_grab.sh similarity index 54% rename from quiethost/screenshot_grab.sh rename to image editing/screenshot_grab.sh index afe7145..c8a76ce 100755 --- a/quiethost/screenshot_grab.sh +++ b/image editing/screenshot_grab.sh @@ -1,4 +1,52 @@ #!/bin/bash + +############################################################################### +# Script Name: screenshot_grab.sh +# +# Description: +# Interactive screenshot capture tool for GNOME desktops. +# +# The script automatically determines a destination directory from an +# open Texmaker project when possible. If no Texmaker project is detected, +# the user is prompted to choose a destination folder manually. +# +# Features: +# - Automatic Texmaker project path detection +# - Manual directory selection fallback +# - User-defined screenshot filenames +# - Duplicate filename detection +# - Automatic filename copy to clipboard +# - Area screenshot capture using gnome-screenshot +# - Screenshot preview/confirmation loop +# +# Requirements: +# - Bash +# - zenity +# - gnome-screenshot +# - xclip +# - Texmaker (optional) +# +# Usage: +# ./screenshot_grab.sh +# +# Workflow: +# 1. Detect current Texmaker project folder or ask for a directory. +# 2. Enter a screenshot filename. +# 3. Filename is copied to the clipboard automatically. +# 4. Select a screen area using gnome-screenshot. +# 5. Confirm the result. +# 6. Retake the screenshot until satisfied. +# +# Output: +# /.png +# +# Notes: +# - The line beginning with ### contains the default fallback directory. +# - Existing filenames are checked before capturing. +# - Cancelling any dialog exits the script. +# +############################################################################### + ###/data/DatenLucas/Dokumente/Studium/Master/3.Semester/Mechatronische Systeme/Lernunterlagen/ DEFAULT_DIR="$(cat ~/scripts/screenshot_grab.sh | grep "###" | grep -v grep | sed 's/###//g')" cont=1