/ de-omarchy / bin / omarchy-capture-screenrecording-with-webcam
swadhinbiswas Initial de-omarchy: Omarchy UI layer for Arch-based distros · 8/22/2026
9f393b2
22 lines · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

# omarchy:summary=Pick a webcam and start a screen recording with it
# omarchy:examples=omarchy capture screenrecording-with-webcam

mapfile -t devices < <(omarchy-capture-webcam-list)
if (( ${#devices[@]} == 0 )); then
  omarchy-notification-send "No webcam devices found" -u critical -t 3000
  exit 1
fi

if (( ${#devices[@]} == 1 )); then
  device="${devices[0]%%[[:space:]]*}"
else
  selection=$(omarchy-menu-select "Select Webcam" "${devices[@]}" -- --width 520 --maxheight 520) || exit 1
  device="${selection%%[[:space:]]*}"
fi

exec omarchy-capture-screenrecording \
  --with-desktop-audio --with-microphone-audio \
  --with-webcam --webcam-device="$device"