https://github.com/eepp/ss
easy screenshot sharing for X
https://github.com/eepp/ss
clipboard imgur screenshot xorg
Last synced: 6 months ago
JSON representation
easy screenshot sharing for X
- Host: GitHub
- URL: https://github.com/eepp/ss
- Owner: eepp
- Created: 2013-10-22T14:40:45.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-04T21:44:27.000Z (about 11 years ago)
- Last Synced: 2025-03-24T15:41:56.640Z (7 months ago)
- Topics: clipboard, imgur, screenshot, xorg
- Language: Shell
- Homepage:
- Size: 200 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ss - easy screenshot sharing for X
==================================This simple script does the following when executed:
1. executes `scrot` to draw a rectangle on the screen and save a PNG image
2. uploads this image to a custom server or to imgur.com
3. copies the image URL on the server to the clipboard
4. notifies the user that everything is doneIf a keyboard shortcut is used to call this script, I call this easy
screenshot sharing for X.dependencies
------------You need all the following:
* [eepp's version of `scrot`](https://github.com/eepp/scrot)
if you want to support the `-r` option, which
makes it possible to resize/move the drawn rectangle; otherwise,
the upstream version is fine, just remove the `-r` option in the
script
* `curl` package
* `libnotify` package (for `notify-send`)
* `xsel` package (for copying to clipboard)using ss with a custom server
------------------------------------------`ss` sources `~/.ssrc`. This file must define two variables:
* `url`: the endpoint `curl` will access
* `password`: your password for uploading imagesHere's an example:
```
url="http://example.com/ss/up"
password="peanut-butter"
```The endpoint must accept a POST request with the following variables:
* `img`: PNG image data
* `passwd`: plain text passwordThe response body must be the full URL of the stored image.
using ss with imgur
-------------------`ss` sources `~/.ssrc`. This file must define the API key variable:
* `imgur_api_key`: a valid imgur API key
Here's an example:
```
imgur_api_key=b3625162d3418ac51a9ee805b1840452
```When calling `ss`, use the `--imgur` option.
window manager integration
--------------------------### Fluxbox
Add this to your `~/.fluxbox/keys`:
```
180 :exec /path/to/ss
```Replace `180` by the keycode or key combination of your choice.
### i3
Add this to your `~/.i3/config`:
```
bindsym $mod+c exec sleep 0.2 && bash /path/to/ss
```Replace `$mod+c` by the key combination of your choice.
(It seems that sleeping is necessary here in order to use `scrot` with
rectangle selection from an i3 key binding. Any fix is welcome.)