diff --git a/i3/config b/i3/config index 559cc7b..e4f1f2c 100644 --- a/i3/config +++ b/i3/config @@ -75,8 +75,8 @@ bindsym $mod+q kill bindsym $mod+d exec --no-startup-id rofi -show run #Screenshots! -bindsym --release Print exec imgur-screenshot -s -bindsym --release $mod+Print exec imgur-screenshot -f +bindsym --release Print exec scrot -s ~/Screenshots/%y%m%d-%H%M%S.png -e '~/.dotfiles/i3/screenshot.sh $f' +bindsym --release $mod+Print exec scrot ~/Screenshots/%y%m%d-%H%M%S.png -e '~/.dotfiles/i3 /screenshot.sh $f' #Gist the clipboard: bindsym --release $mod+p exec gist -cpPR diff --git a/i3/screenshot.sh b/i3/screenshot.sh new file mode 100755 index 0000000..2ec9c13 --- /dev/null +++ b/i3/screenshot.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -e + +basename=$(basename ${1}) + +# Full path to bypass ssh-agent +/usr/bin/scp -i ~/.ssh/screenshoter ${1} screenshots@srv2.cwgaming.co.uk:~/${basename} + +echo "https://admnt.cf/i/${basename}" | xclip -r -selection c + +notify-send -t 1500 "Screenshot: Upload Complete!" "https://admnt.cf/i/${basename}"