diff options
author | Vincent Ambo <tazjin@google.com> | 2020-01-26T19·13+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-01-26T19·13+0000 |
commit | a2d0b7f3998dded968074da1c282361d512d75a0 (patch) | |
tree | 196a8084bc50985bc76bb8fd3e2faa2c51428a49 /tools | |
parent | 29e1de2fd248ec4e152d5b0c83514fa57bcb0a33 (diff) |
feat(emacs.d): Add interactive 'scrot-select' screenshot function r/458
Diffstat (limited to 'tools')
-rw-r--r-- | tools/emacs/config/functions.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/emacs/config/functions.el b/tools/emacs/config/functions.el index dc7ac89d782d..1bec8ecd98a7 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) |