#!/bin/env bash

pgrep -x "wf-recorder" && pkill -INT -x wf-recorder && notify-send -h string:wf-recorder:record -t 1000 "Finished Recording" && exit 0

for i in $(seq 1 3); do
  notify-send -h string:wf-recorder:record -t 1000 "Recording in:" "<span color='#90a4f4' font='26px'><i><b>$((4 - $i))</b></i></span>"
  sleep 1
done

dateTime=$(date +%m-%d-%Y-%H:%M:%S)
dir="$HOME/Videos/ScreenRecordings"

mkdir -p "$dir"
wf-recorder -f "$dir/$dateTime.mp4"
