commit 1e78b45dc182a32ad2130e86cd8131ef75e768d1 parent 84c155eaf0e90f30dc0925d1328c829585764f9b Author: Oleh Krehel <ohwoeowho@gmail.com> Date: Thu, 31 Oct 2013 15:20:01 +0100 org-download.el(org-download-gnome-screenshot): capture area by default, whole screen if with prefix. Diffstat:
| M | org-download.el | | | 12 | ++++++++---- |
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/org-download.el b/org-download.el @@ -201,11 +201,15 @@ scrot supports: (shell-command (format "scrot -s %s" link)) (org-download-image link))) -(defun org-download-gnome-screenshot () - "Call gnome-screenshot and insert the resulting file." - (interactive) +(defun org-download-gnome-screenshot (arg) + "Call gnome-screenshot and insert the resulting file. +Without a prefix argument screen area is selected with the mouse. +With a prefix argument grab the entire screen." + (interactive "P") (let ((link "/tmp/screenshot.png")) - (shell-command (format "gnome-screenshot -f %s" link)) + (shell-command (format "gnome-screenshot %s -f %s" + (if arg "" "-a") + link)) (org-download-image link))) (defun org-download-image (link)