Added script screenshot
This commit is contained in:
parent
61bc70d7ff
commit
298d6218d8
|
@ -1,5 +1,11 @@
|
||||||
librem5-goodies (0.0.2) amber-phone; urgency=medium
|
librem5-goodies (0.0.2) amber-phone; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
- Added the script: screenshot
|
||||||
|
|
||||||
|
-- João Azevedo <joao.azevedo@puri.sm> Tue, 04 Aug 2020 22:17:24 +0200
|
||||||
|
|
||||||
|
|
||||||
* New upstream release.
|
* New upstream release.
|
||||||
- Changed the project name.
|
- Changed the project name.
|
||||||
- Changed the target repo to amber-phone.
|
- Changed the target repo to amber-phone.
|
||||||
|
|
|
@ -17,9 +17,11 @@ Depends:
|
||||||
libnotify-bin,
|
libnotify-bin,
|
||||||
syncevolution,
|
syncevolution,
|
||||||
yad,
|
yad,
|
||||||
|
grim,
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
Description: Librem 5 Goodies
|
Description: Librem 5 Goodies
|
||||||
A collection of bash scripts and applications made to add functionalities to
|
A collection of bash scripts and applications made to add functionalities to
|
||||||
the Librem 5 phone and Phosh Shell. It includes the following:
|
the Librem 5 phone and Phosh Shell. It includes the following:
|
||||||
- Contacts Importer: A simple application to import contacts from a vcard file
|
- Contacts Importer: A simple application to import contacts from a vcard file
|
||||||
to GNOME Contacts.
|
to GNOME Contacts.
|
||||||
|
- Screenshot: A simple application to make screenshots on the Librem 5
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
contacts-importer /usr/bin
|
contacts-importer /usr/bin
|
||||||
contacts-importer.desktop /usr/share/applications
|
contacts-importer.desktop /usr/share/applications
|
||||||
|
screenshot /usr/bin
|
||||||
|
screenshot.desktop /usr/share/applications
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# This screenshot program was based on an initial command-line only version
|
||||||
|
# by the purismforum user in community/librem-5
|
||||||
|
#
|
||||||
|
# I've since expanded it to use libnotify and provide a GUI
|
||||||
|
# It requires the grim, libnotify-bin and yad packages:
|
||||||
|
# sudo apt install grim yad libnotify-bin
|
||||||
|
|
||||||
|
#Variable
|
||||||
|
|
||||||
|
SCREENSHOT="/home/$USER/Pictures/$(date +%Y-%m-%d-%H%M%S).png"
|
||||||
|
|
||||||
|
if [ -e /usr/bin/yad ]; then
|
||||||
|
INPUT=`yad --title Screenshot --text="Take screenshot after X seconds" --form --field=filename:SFL --field=seconds:NUM "$SCREENSHOT" "5" --focus-field=2`
|
||||||
|
echo $INPUT
|
||||||
|
SCREENSHOT=`echo $INPUT | cut -d '|' -f1`
|
||||||
|
SECONDS=`echo $INPUT | cut -d '|' -f2`
|
||||||
|
else
|
||||||
|
SECONDS=`zenity --title Screenshot --text="Take screenshot after X seconds" --entry-text=5 --entry`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$SECONDS" -eq 0 ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
notify-send -t 1000 screenshot "Taking a screenshot in $SECONDS seconds"
|
||||||
|
sleep $SECONDS;
|
||||||
|
grim "$SCREENSHOT"
|
||||||
|
notify-send screenshot "Screenshot stored at ${SCREENSHOT}"
|
|
@ -0,0 +1,6 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Screen Shot
|
||||||
|
Type=Application
|
||||||
|
Icon=applets-screenshooter
|
||||||
|
Exec=/usr/bin/screenshot %U
|
||||||
|
Categories=Utility;
|
Loading…
Reference in New Issue