diff --git a/debian/control b/debian/control index ef70b0a..1f75b2d 100644 --- a/debian/control +++ b/debian/control @@ -21,6 +21,7 @@ Depends: yad, xdg-user-dirs, wlr-randr, + wf-recorder, ${misc:Depends}, Description: Librem 5 Goodies A collection of bash scripts and applications made to add functionalities to diff --git a/debian/librem5-goodies.install b/debian/librem5-goodies.install index 860359e..e261f20 100644 --- a/debian/librem5-goodies.install +++ b/debian/librem5-goodies.install @@ -4,4 +4,6 @@ l5-screenshot /usr/bin l5-screenshot.desktop /usr/share/applications l5-scale-the-screen /usr/bin l5-scale-the-screen.desktop /usr/share/applications +l5-screen-recorder /usr/bin +l5-screen-recorder.desktop /usr/share/applications sm.puri.librem5.goodies.appdata.xml /usr/share/metainfo diff --git a/l5-screen-recorder b/l5-screen-recorder new file mode 100755 index 0000000..40dbb6d --- /dev/null +++ b/l5-screen-recorder @@ -0,0 +1,26 @@ +#!/bin/bash +# GPL3 + +VIDEO="/home/purism/Videos/$(date +%Y-%m-%d-%H%M%S).avi" +yad --title ScreenCapture --text "A simple GUI to record the screen" --button="Start capture:100" --button="Quit:0" --buttons-layout=center +start_window_return=$? + +if [[ $start_window_return -eq 100 ]] +then + wf-recorder -a -f $VIDEO --codec=asv1 & +else + exit +fi + +yad --title ScreenCapture --text "Screen capture is actively running. \nFile: $VIDEO" --button='Stop capture:100' --buttons-layout=center +exit_window_return=$? + +if [[ $exit_window_return -eq 100 ]] +then + killall -2 wf-recorder +fi + +if test -f "$VIDEO" +then + notify-send ScreenCapture "Video stored at $VIDEO" +fi diff --git a/l5-screen-recorder.desktop b/l5-screen-recorder.desktop new file mode 100644 index 0000000..2274bbb --- /dev/null +++ b/l5-screen-recorder.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Screen Recorder +Type=Application +Icon=emblem-videos-symbolic +Exec=/usr/bin/l5-screen-recorder +Categories=Utility; +# Translators: Do NOT translate or transliterate this text (these are enum types)! +X-Purism-FormFactor=Workstation;Mobile;