#!/bin/sh if pgrep -f "wf-recorder -g" then pkill -f "wf-recorder -g" else wf-recorder -g "$(slurp)" -f ~/Videos/wf-rec/$(rofi -dmenu -p ">" -l 0 -mesg "Enter recording name").mp4 # Will send notification early if wf-recorder fails early notify-send "Recording finished"; fi