Init screen recorder

This commit is contained in:
David Hamner 2021-09-24 07:58:03 -07:00
parent 6fe0c7143d
commit 300fced68a
4 changed files with 37 additions and 0 deletions

1
debian/control vendored
View File

@ -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

View File

@ -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

26
l5-screen-recorder Executable file
View File

@ -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

View File

@ -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;