Removing mpv as dependency for scrot.sh and boop.sh

This commit is contained in:
Siina Mashek 2022-07-05 09:49:39 +03:00
parent 691e68d90a
commit 6565eafc58
2 changed files with 6 additions and 7 deletions

View File

@ -15,6 +15,6 @@ if [[ ! -n "$(which curl)" ]]; then echo "Please install curl"; exit; fi
url=$(curl -F"file=@$1" $remote) url=$(curl -F"file=@$1" $remote)
echo "$url" | tr -d '\n' | xsel -ib -l /tmp/xsel.log echo "$url" | tr -d '\n' | xsel -ib -l /tmp/xsel.log
if [[ -n "$(which mpv)" ]]; then if [[ -n "$(which ffplay)" ]]; then
mpv $sound ffplay $sound -nodisp -autoexit -loglevel error
fi fi

View File

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