From 46e0a2f0609698d9342482437989dc606f35bf77 Mon Sep 17 00:00:00 2001 From: Dominic Zimmer Date: Tue, 5 Nov 2019 22:51:01 +0100 Subject: [PATCH] Update requirements --- dm-recording/README.md | 4 ++-- dm-recording/dm-recording.sh | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dm-recording/README.md b/dm-recording/README.md index 712b8b3..087f07a 100644 --- a/dm-recording/README.md +++ b/dm-recording/README.md @@ -5,7 +5,7 @@ dm-recording is a dmenu controlled utility that manages screen recordings using You can either select Fullscreen or Region mode. Fullscreen mode records the entire default X display, Region mode lets the user click on a window or drag a region to be recorded. A notification brief (900ms) notification is displayed after which (100ms later) the recording is started. Unless in fullscreen mode, a frame is drawn around the recorded region. ## Usage -Run `dm-recording`. Everything else is managed and communicated by `dmenu` and `notify-send`. +Make sure you meet [the requirements](https://gitea.leafbla.de/dominic/dm-scripts/src/branch/master/dm-recording#requirements) and run `dm-recording`. Everything else is managed and communicated by `dmenu` and `notify-send`. Click [Click me](https://gitea.leafbla.de/dominic/dm-scripts/src/branch/master/dm-recording/.media/example.mp4) to see a sample video. @@ -14,4 +14,4 @@ Click [Click me](https://gitea.leafbla.de/dominic/dm-scripts/src/branch/master/d In order to stop the recording, kill the corresponding process. While not the prettiest solution, `killall ffmpeg` works for non-nested recordings. ## Requirements -You need to have `dmenu`, `ffmpeg` and `libxcb` (for ffmpeg) installed in order to run dm-recording. It is recommended to have a notification server setup that allows communication via `notify-send`. \ No newline at end of file +You need to have `dmenu`, `slop` (for the region and window selection), `ffmpeg` (for the recording) and `libxcb` (for recording X displays using ffmpeg) installed in order to run dm-recording. It is recommended to have a notification server setup that allows communication via `notify-send`. diff --git a/dm-recording/dm-recording.sh b/dm-recording/dm-recording.sh index 01822a9..2a3d832 100755 --- a/dm-recording/dm-recording.sh +++ b/dm-recording/dm-recording.sh @@ -12,6 +12,13 @@ if ! hash ffmpeg 2>/dev/null; then echo "Aborting." exit 1 fi +if ! hash slop 2>/dev/null; then + notify-send "Error" "slop is not installed.\n\nAborting." + echo "slop is not installed." + echo "slop is used to select the windows and regions." + echo "Aborting." + exit 1 +fi if ! ldconfig -p | grep libxcb >/dev/null; then notify-send "Error" "libxcb is not installed.\n\nffmepg requires libxcb for it's x11grab option.\n\nAborting." echo "libxcb is not installed."