1
0
mirror of https://github.com/Adam-Ant/dotfiles synced 2024-07-06 05:36:16 +00:00

Use custom screenshot tool instead of imgur-screenshot

This commit is contained in:
Adam Dodman 2018-02-03 18:34:36 +00:00
parent 6099f3626f
commit 1b0053e218
2 changed files with 13 additions and 2 deletions

View File

@ -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

11
i3/screenshot.sh Executable file
View File

@ -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}"