From e5b96481eae244195b6743c60ba29c5cb4901d75 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 8 May 2024 11:49:54 +0200 Subject: [PATCH] cleanup --- .local/libexec/dwm/dmenurecord | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.local/libexec/dwm/dmenurecord b/.local/libexec/dwm/dmenurecord index 6480afd4f..a6c755083 100755 --- a/.local/libexec/dwm/dmenurecord +++ b/.local/libexec/dwm/dmenurecord @@ -95,23 +95,24 @@ askrecording() { esac } -asktoend() { - response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") && - [ "$response" = "Yes" ] && killrecording -} - videoselected() { + mkdir -p "$XDG_VIDEOS_DIR/Captures" eval "$(slop -f "X=%x Y=%y W=%w H=%h")" ffmpeg \ -f x11grab \ -video_size "$W"x"$H" \ - -i $DISPLAY+"$X,$Y" \ + -i "$DISPLAY+$X,$Y" \ -c:v libx264 -qp 0 -r 30 \ "$XDG_VIDEOS_DIR/Captures/box-$(date '+%y%m%d-%H%M-%S').mkv" & echo $! >/tmp/recordingpid updateicon "󰍹" } +asktoend() { + response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") && + [ "$response" = "Yes" ] && killrecording +} + case "$1" in screencast) screencast ;; audio) audio ;;