Init screen recorder
This commit is contained in:
parent
6fe0c7143d
commit
300fced68a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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;
|
Loading…
Reference in New Issue