aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/swayrecord
blob: 90ed24ae0336e5d71c6d906e31c09b61fd065573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

if [ -f "$HOME/.recordingpid" ]; then
    killall -SIGINT wf-recorder
    rm -f ~/.recordingpid
    notify-send "⏺ Screen recording" "Recording stopped"
    killall -39 waybar
    exit
fi

wf-recorder -f "$HOME/Video/recordings/$(date '+%y%m%d-%H%M-%S').mp4" &
echo $! > ~/.recordingpid
notify-send "⏺ Screen recording" "Recording started"
killall -39 waybar