aboutsummaryrefslogtreecommitdiff
path: root/hypr/wf-recorder/record.sh
blob: c828feed9a96821dd1ac12f613f5edc8357e6b38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash

# Check if a recording is already in progress
if pgrep -x wf-recorder > /dev/null
then
    # If recording, stop it
    notify-send -h string:wf-recorder:record -t 1000 "Recording Stopped"
    pkill wf-recorder
else
    # If not recording, start it
    mkdir -p ~/Videos
    mkdir -p ~/Videos/Screencasts/
    notify-send -h string:wf-recorder:record -t 1000 "Recording Started"
    wf-recorder \
        -f ~/Videos/Screencasts/$(date '+%H%M%S-%d-%m-%Y').mp4 \
        --audio --audio-device alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI3__sink.monitor

fi