From 0fbac556b805e298d73a7b4ebb83ffbb55965104 Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Sun, 20 Dec 2020 20:30:34 +0200 Subject: [PATCH] Updating boop and scrot --- bin/boop.sh | 4 ++-- bin/scrot.sh | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/boop.sh b/bin/boop.sh index f97d41f..76e9352 100755 --- a/bin/boop.sh +++ b/bin/boop.sh @@ -1,9 +1,9 @@ #!/bin/sh remote="https://boop.icu" -sound="${HOME}/src/local-bin/sounds/success.ogg" +sound="$HOME/Projects/local-bin/sounds/success.ogg" url=$(curl -F"file=@$1" $remote) -echo "$url" | xsel -ib +echo "$url" | tr -d '\n' | xsel -ib > /dev/null 2>&1 || echo "please install xsel" mpv $sound diff --git a/bin/scrot.sh b/bin/scrot.sh index 53757f0..3bbcb88 100755 --- a/bin/scrot.sh +++ b/bin/scrot.sh @@ -18,8 +18,8 @@ # TODO: Autodetect mpv and boop.sh to make them optional # TODO: Figure out how to capture a specific monitor, not just main -screendir="/data/nextcloud/Screenshots/" -sound="${HOME}/src/local-bin/sounds/shutter.ogg" +screendir="$HOME/Screenshots/" +sound="$HOME/Projects/local-bin/sounds/shutter.ogg" filename="$(date +'%Y%m%d_%H%M%S').png" resolution="1920x1080" args="-m 9 -u" @@ -31,7 +31,8 @@ if [[ ${1} == "--main" ]]; then else args="${args} ${1}" fi -maim -B $args $filename + +maim -B $args $filename > /dev/null 2>&1 || echo "please install maim" mpv $sound $HOME/.local/bin/boop.sh "$screendir$filename"