diff --git a/common/boop.sh b/common/boop.sh index 1e54c46..4943e77 100755 --- a/common/boop.sh +++ b/common/boop.sh @@ -15,6 +15,6 @@ 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 -if [[ -n "$(which mpv)" ]]; then - mpv $sound +if [[ -n "$(which ffplay)" ]]; then + ffplay $sound -nodisp -autoexit -loglevel error fi diff --git a/common/scrot.sh b/common/scrot.sh index 89fbf14..23b7170 100755 --- a/common/scrot.sh +++ b/common/scrot.sh @@ -5,7 +5,6 @@ # Requires: # - maim: takes the screenshot # - imagemagick: for custom resolution sizes -# - mpv: plays audio file upon completion # - boop.sh: uploads screenshot to boop.icu # - Checks for SCREENSHOT_DIR environment variable # @@ -16,7 +15,7 @@ source ~/.profile # Workaround to avoid using /bin/bash # Edit these to fit setup sound="$HOME/Projects/local-bin/sounds/shutter.ogg" filename="$(date +'%Y%m%d_%H%M%S').png" -main_res="1920x1080+0+510" +main_res="1920x1080+0+521" secondary_res="1080x1920+1920+0" # Ensure screenshot directory is there so the script will work @@ -48,9 +47,9 @@ if [[ ${1} == "--main" ]]; then magick convert $filename -trim +repage $SCREENSHOT_DIR/$filename fi -# Play sound if mpv is available -if [[ -n "$(which mpv)" ]]; then - mpv $sound +# Play sound if ffplay is available +if [[ -n "$(which ffplay)" ]]; then + ffplay $sound -nodisp -autoexit -loglevel error fi # Upload to boop if boop.sh is available