From a2d0b7f3998dded968074da1c282361d512d75a0 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 26 Jan 2020 19:13:42 +0000 Subject: feat(emacs.d): Add interactive 'scrot-select' screenshot function --- tools/emacs/config/functions.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') 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) -- cgit 1.4.1