about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-01-26T19·13+0000
committerVincent Ambo <tazjin@google.com>2020-01-26T19·13+0000
commita2d0b7f3998dded968074da1c282361d512d75a0 (patch)
tree196a8084bc50985bc76bb8fd3e2faa2c51428a49 /tools
parent29e1de2fd248ec4e152d5b0c83514fa57bcb0a33 (diff)
feat(emacs.d): Add interactive 'scrot-select' screenshot function r/458
Diffstat (limited to 'tools')
-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)