Stop use of && || in wf-shadow
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
parent
cab1bf18b8
commit
b394cca06c
|
@ -70,15 +70,19 @@ EOF
|
|||
}
|
||||
|
||||
record() {
|
||||
local FILE="${WF_SHADOW_SAVE:-"$HOME"/Videos/wf-shadow/}""$(date +${WF_SHADOW_FORMAT:-%Y%m%d_%H:%M:%S})__$2".mp4
|
||||
local FILE="${WF_SHADOW_SAVE:-"$HOME"/Videos/wf-shadow/}""$(date +"${WF_SHADOW_FORMAT:-%Y%m%d_%H:%M:%S}")__$2".mp4
|
||||
if [ $VERBOSE ]; then
|
||||
ffmpeg -nostdin -y -sseof -"$2" -i "$1" "$FILE" &>/dev/null &&
|
||||
notify-send "Clip saved" "$2 second clip saved to $FILE" ||
|
||||
notify-send "Error saving clip" "Start a new session with --verbose to see ffmpeg output"
|
||||
if ffmpeg -nostdin -y -sseof -"$2" -i "$1" "$FILE" &>/dev/null; then
|
||||
notify-send "Clip saved" "$2 second clip saved to $FILE"
|
||||
else
|
||||
notify-send "Error saving clip" "Start a new session with --verbose to see ffmpeg output"
|
||||
fi
|
||||
else
|
||||
ffmpeg -nostdin -y -sseof -"$2" -i "$1" "$FILE" &&
|
||||
notify-send "Clip saved" "$2 second clip saved to $FILE" ||
|
||||
notify-send "Error saving clip" "Start a new session with --verbose to see ffmpeg output"
|
||||
if ffmpeg -nostdin -y -sseof -"$2" -i "$1" "$FILE"; then
|
||||
notify-send "Clip saved" "$2 second clip saved to $FILE"
|
||||
else
|
||||
notify-send "Error saving clip" "Start a new session with --verbose to see ffmpeg output"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -95,7 +99,7 @@ start() {
|
|||
printf "%s" "$!" > "$RUNTIME"/"$MONITOR".pid
|
||||
fg || exit
|
||||
|
||||
case "$([ $VERBOSE ] && printf "$WOFI_STRING" | wofi --dmenu -i -H 500 -W 250 -x 0 -y 0 || printf "$WOFI_STRING" | wofi --dmenu -i -H 500 -W 250 -x 0 -y 0 &> /dev/null)" in
|
||||
case "$(if [ $VERBOSE ]; then printf "$WOFI_STRING" | wofi --dmenu -i -H 500 -W 250 -x 0 -y 0; else printf "$WOFI_STRING" | wofi --dmenu -i -H 500 -W 250 -x 0 -y 0 &> /dev/null; fi)" in
|
||||
'5 seconds') record "$i" 5 ;;
|
||||
'10 seconds') record "$i" 10 ;;
|
||||
'15 seconds') record "$i" 15 ;;
|
||||
|
|
Loading…
Reference in New Issue