diff --git a/common/boop.sh b/common/boop.sh index d6ca269..0826e28 100755 --- a/common/boop.sh +++ b/common/boop.sh @@ -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 diff --git a/common/scrot.sh b/common/scrot.sh index 9e97aac..89fbf14 100755 --- a/common/scrot.sh +++ b/common/scrot.sh @@ -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