diff options
Diffstat (limited to 'dot_local/bin/executable_s')
-rw-r--r-- | dot_local/bin/executable_s | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/dot_local/bin/executable_s b/dot_local/bin/executable_s new file mode 100644 index 0000000..e222ea7 --- /dev/null +++ b/dot_local/bin/executable_s @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +case $1 in + cf) + filename="$(date '+%d_%m_%Y-%H_%M_%s').png" + maim -s > "$HOME/media/screenshots/$filename" + xclip -sel clipb -t image/png "$HOME/media/screenshots/$filename" + ;; + cl) + filename="$(date '+%d_%m_%Y-%H_%M_%s').png" + maim -s > $HOME/media/screenshots/$filename + curl -F"file=@$HOME/media/screenshots/$filename" -Fsecret= "https://0.vern.cc/" | xclip -sel clipb + ;; + wf) + filename="$(date '+%d_%m_%Y-%H_%M_%s').png" + maim -i $(xdotool getactivewindow) > "$HOME/media/screenshots/$filename" + xclip -sel clipb -t image/png "$HOME/media/screenshots/$filename" + ;; + wl) + filename="$(date '+%d_%m_%Y-%H_%M_%s').png" + maim -i $(xdotool getactivewindow) > $HOME/media/screenshots/$filename + curl -F"file=@$HOME/media/screenshots/$filename" -Fsecret= "https://0.vern.cc/" | xclip -sel clipb + ;; + ff) + filename="$(date '+%d_%m_%Y-%H_%M_%s').png" + maim > "$HOME/media/screenshots/$filename" + xclip -sel clipb -t image/png "$HOME/media/screenshots/$filename" + ;; + fl) + filename="$(date '+%d_%m_%Y-%H_%M_%s').png" + maim > $HOME/media/screenshots/$filename + curl -F"file=@$HOME/media/screenshots/$filename" -Fsecret= "https://0.vern.cc/" | xclip -sel clipb + ;; + *) + echo "Usage info:" + echo + echo "s cf - Takes a screenshot from a region and then copies the file to the clipboard selection" + echo "s cl - Takes a screenshot from a region and then uploads it to 0.vern.cc, and automatically copies the link" + echo "s wf - Takes a screenshot from the active window and then copies the file to the clipboard selection" + echo "s wl - Takes a screenshot from the active window and then uploads it to 0.vern.cc, and automatically copies the link" + echo "s ff - Takes a screenshot of the full screen and then copies the file to the clipboard selection" + echo "s fl - Takes a screenshot of the full screen and then uploads it to 0.vern.cc, and automatically copies the link" + echo + echo "Notice: all of these commands output it's screenshots to \`~/media/screenshots/\`." +esac |