22 lines
719 B
Bash
Executable File
22 lines
719 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Define the directory where the screenshot will be saved
|
|
screenshot_dir="$HOME/Screenshots"
|
|
|
|
# Create the directory if it doesn't exist
|
|
mkdir -p "$screenshot_dir"
|
|
|
|
# Generate a unique filename based on date and time
|
|
timestamp=$(date +"%Y-%m-%d-%H-%M-%S")
|
|
screenshot_file="$screenshot_dir/screenshot_$timestamp.png"
|
|
|
|
# Capture the screen selection and save it to the specified file
|
|
gnome-screenshot -f "$screenshot_file"
|
|
scp "$screenshot_file" teraflops@192.168.1.37:/usr/share/nginx/fiche/
|
|
# Copy the filename to the clipboard
|
|
paste=$(basename $screenshot_file)
|
|
echo -n "https://paste.priet.us/$paste" | wl-copy
|
|
|
|
# Notify the user
|
|
#echo "Screenshot saved as $screenshot_file and copied to the clipboard"
|