-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecord-menu.sh
More file actions
executable file
·65 lines (59 loc) · 1.89 KB
/
record-menu.sh
File metadata and controls
executable file
·65 lines (59 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh -x
PIC="$(xdg-user-dir PICTURES)/screen_shots_luke"
VID="$(xdg-user-dir VIDEOS)"
get_options() {
printf "\
📋 Copy Area Screenshot (to clipboard)
📋 Copy Full Screenshot (to clipboard)
🏜️ Save Area Screenshot
🏜️ Save Full Screenshot
🛑 Stop Recording
🎥 + 🎙️ Record Full Video with Mic
🎥 Record Area Video
🎥 Record Full Screen Video
"
}
main() {
choice=$( (get_options) | wofi -n -d -i)
case $choice in
'📋 Copy Area Screenshot (to clipboard)')
grim -g "$(slurp)" | wl-copy
notify-send "Screenshot" "Area screenshot copied to clipboard."
;;
'📋 Copy Full Screenshot (to clipboard)')
grim - | wl-copy
notify-send "Screenshot" "Full screenshot copied to clipboard."
;;
'🏜️ Save Area Screenshot')
grim -g "$(slurp)" ${PIC}/$(date +'%s_grim.png')
notify-send "Screenshot" "Area screenshot saved."
;;
'🏜️ Save Full Screenshot')
grim ${PIC}/$(date +'%s_grim.png')
notify-send "Screenshot" "Full screenshot saved."
;;
'🛑 Stop Recording')
pid=$(pgrep wf-recorder)
if [ "$pid" ]; then
pkill --signal SIGINT wf-recorder
notify-send "Recording" "Recording stopped."
else
notify-send "Recording" "No active recording to stop."
fi
;;
'🎥 Record Area Video')
wf-recorder -g "$(slurp)" --file=${VID}/$(date +'%s_vid_selected.mp4')
notify-send "Video Recording" "Area video recording started."
;;
'🎥 Record Full Screen Video')
wf-recorder --file=${VID}/$(date +'%s_vid_full.mp4')
notify-send "Video Recording" "Full screen video recording started."
;;
'🎥 + 🎙️ Record Full Video with Mic')
wf-recorder -a --file=${VID}/$(date +'%s_vid_full_mic.mp4')
notify-send "Video Recording" "Full screen video with mic recording started."
;;
esac
}
main &
exit 0