about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tools/emacs/config/functions.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/emacs/config/functions.el b/tools/emacs/config/functions.el
index dc7ac89d78..1bec8ecd98 100644
--- a/tools/emacs/config/functions.el
+++ b/tools/emacs/config/functions.el
@@ -259,4 +259,10 @@
           (magit-status "~/depot"))
       (warn "notmuch failed to render the raw message buffer"))))
 
+(defun scrot-select ()
+  "Take a screenshot based on a mouse-selection and save it to
+  ~/screenshots."
+  (interactive)
+  (shell-command "scrot '$a_%s.png' -s -e 'mv $f ~/screenshots/'"))
+
 (provide 'functions)