Skip to content

fedded-net/screenshot-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Screenshot-linux

Small Bash helper to take an area screenshot, upload it to the fedded.net API endpoint, copy the resulting URL to the clipboard, and show a desktop notification.

What it does

  1. Runs gnome-screenshot -a so you can select a region.
  2. Uploads the captured PNG to an HTTP API (multipart/form-data).
  3. Parses the returned JSON for .url.
  4. Copies the URL to the clipboard (wl-copy).
  5. Shows a notification (notify-send).

Requirements

  • bash
  • gnome-screenshot
  • curl
  • jq
  • wl-copy (Wayland clipboard; package is usually wl-clipboard)
  • notify-send (usually from libnotify)

If you’re not on GNOME/Wayland you may need to swap gnome-screenshot and/or clipboard tooling.

Setup

Make the script executable:

chmod +x ./ss.sh

Configuration

This script is intended to be used with fedded.net. Configure via environment variable:

  • API_KEY (default: fedded-net-api-key)

Example:

API_KEY="your-real-key" \
./ss.sh

Usage

Run:

./ss.sh

Select an area. On success, the resulting URL is:

  • copied to your clipboard
  • shown in a notification

Keybinding (optional)

Bind ss.sh in your desktop environment’s custom shortcuts (e.g., GNOME Settings → Keyboard → Custom Shortcuts) to run it on a hotkey.

Troubleshooting

  • “Missing dependency: …”: install the named tool and retry.
  • Upload failed / notification shows raw response: the API likely returned an error; re-check API_URL, API_KEY, and server status.
  • Clipboard not working: ensure wl-copy exists and you’re on Wayland, or modify the script to use xclip/xsel for X11.

About

Shell script for linux screenshot uploading.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages