Skip to content

Instantly share code, notes, and snippets.

@teoulas
Created May 13, 2022 13:59
Show Gist options
  • Save teoulas/a1e0ae3e1a0edba417df2a1bd695fef6 to your computer and use it in GitHub Desktop.
Save teoulas/a1e0ae3e1a0edba417df2a1bd695fef6 to your computer and use it in GitHub Desktop.
gnome-screenshot2swappy
#!/usr/bin/env bash
tmpfile=$(mktemp -u --suffix=.png)
gnome-screenshot -a -f $tmpfile
swappy -f $tmpfile
last=$(ls -t ~/Pictures/Swappy_* | head -n1)
[[ ! -z "$last" ]] && nautilus -s $last
rm $tmpfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment