Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[lipstick] Provide a simple tool for taking screenshots
  • Loading branch information
Vesa Halttunen committed Sep 26, 2013
1 parent 6ecd8aa commit 68269bd
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 1 deletion.
2 changes: 2 additions & 0 deletions rpm/lipstick-qt5.spec
Expand Up @@ -149,6 +149,8 @@ rm -rf %{buildroot}
%files tools
%defattr(-,root,root,-)
%{_bindir}/notificationtool
%{_bindir}/screenshottool
%{_datadir}/applications/screenshottool.desktop
# >> files tools
# << files tools

Expand Down
2 changes: 2 additions & 0 deletions rpm/lipstick-qt5.yaml
Expand Up @@ -70,6 +70,8 @@ SubPackages:
License: LGPLv2.1
Files:
- "%{_bindir}/notificationtool"
- "%{_bindir}/screenshottool"
- "%{_datadir}/applications/screenshottool.desktop"
- Name: doc
Summary: Documentation for lipstick
Description: Documentation for the lipstick package.
Expand Down
19 changes: 19 additions & 0 deletions tools/screenshottool/screenshottool
@@ -0,0 +1,19 @@
#!/bin/sh

if [ -n "$1" ]
then
SCREENSHOTPATH="$1"
else
SCREENSHOTPATH="${HOME}/Pictures/`date +%Y%m%d%H%M%S`.png"
fi

if [ -n "$2" ]
then
DELAY="$2"
else
DELAY=10
fi

sleep "${DELAY}"
dbus-send --type=method_call --dest=org.nemomobile.lipstick /org/nemomobile/lipstick/screenshot org.nemomobile.lipstick.saveScreenshot "string:${SCREENSHOTPATH}"
notificationtool -o add -c device.added "" "" "" "Screenshot saved to $SCREENSHOTPATH"
5 changes: 5 additions & 0 deletions tools/screenshottool/screenshottool.desktop
@@ -0,0 +1,5 @@
[Desktop Entry]
Type=Application
Name=Screenshot
Icon=icon-launcher-settings
Exec=screenshottool
7 changes: 7 additions & 0 deletions tools/screenshottool/screenshottool.pro
@@ -0,0 +1,7 @@
TEMPLATE = subdirs
INSTALLS += screenshottool desktop

screenshottool.files = screenshottool
screenshottool.path = /usr/bin
desktop.files = screenshottool.desktop
desktop.path = /usr/share/applications
2 changes: 1 addition & 1 deletion tools/tools.pro
@@ -1,2 +1,2 @@
TEMPLATE = subdirs
SUBDIRS += notificationtool
SUBDIRS += notificationtool screenshottool

0 comments on commit 68269bd

Please sign in to comment.