Initial commit

This commit is contained in:
2026-03-26 01:01:07 -07:00
commit 4775b7efea

29
screencap.el Normal file
View File

@@ -0,0 +1,29 @@
;;; Provided screenshot capability
(defun screencap-dwm ()
"Call dwm-screnshot and display filename in minibuffer."
(interactive)
(shell-command "dwm-screenshot"))
(defun screencap-el ()
"take a screenshot with imagemagick and elisp"
(interactive)
(setq-local fn
(concat "/home/oc/Pictures/screenshot-"
(if (boundp 'screenshot-context)
(if (not (string-equal screenshot-context ""))
(concat screenshot-context "-")
"")
"")
(format-time-string "%Y-%m-%d-%H.%M.%S")
".png"))
(set-process-sentinel
(start-process "screenshot" "*screenshot*"
"import" "-verbose"
"-window" "root"
fn)
(lambda (p e)
(when (eq 0 (process-exit-status p))
(message fn)))))
(provide 'screencap)