Refactored boop.sh, cleaned up scrot.sh
This commit is contained in:
parent
99f05b6723
commit
7a273fabd5
2 changed files with 12 additions and 10 deletions
|
@ -1,14 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Siina's bootleg boop.icu uploader
|
||||
#
|
||||
# Requires:
|
||||
# - xsel: for clipboard manipulation
|
||||
# - curl: for uploading
|
||||
remote="https://boop.icu"
|
||||
sound="$HOME/Projects/local-bin/sounds/success.ogg"
|
||||
|
||||
if [ ! -f "/usr/bin/xsel" ]; then
|
||||
echo "Please install xsel"
|
||||
exit
|
||||
fi
|
||||
# Make sure necessary applications are installed
|
||||
if [[ ! -n "$(which xsel)" ]]; then; echo "Please install xsel"; exit; fi
|
||||
if [[ ! -n "$(which curl)" ]]; then; echo "Please install curl"; exit; fi
|
||||
|
||||
url=$(curl -F"file=@$1" $remote)
|
||||
echo "$url" | tr -d '\n' | xsel -ib -l /tmp/xsel.log
|
||||
|
||||
mpv $sound
|
||||
if [[ -n "$(which mpv)" ]]; then
|
||||
mpv $sound
|
||||
fi
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
#
|
||||
# Example global keybinds can be found in scrotsh.khotkeys
|
||||
#
|
||||
# TODO: Figure out how to capture a specific monitor, not just main
|
||||
# TODO: Remove hardcoded shutter sound path
|
||||
|
||||
source ~/.profile # Workaround to avoid using /bin/bash
|
||||
|
||||
# Edit these to fit setup
|
||||
|
@ -41,7 +38,6 @@ if [[ ${1} == "--select" ]]; then
|
|||
args="$args ${1}"
|
||||
elif [[ ${1} == "--main" || ${1} == "--secondary" ]]; then
|
||||
args="$args -g $resolution"
|
||||
|
||||
fi
|
||||
|
||||
# Take the screenshot with maim
|
||||
|
|
Loading…
Reference in a new issue