Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun wlshot (&optional name-shot-p)
- "Takes a screen shot and then uploads it to wlair.us.to.
- If `universal-argument' is called, it asks for a filename.
- Requires TRAMP, scp, and ImageMagick."
- (interactive "P")
- (if (eq window-system 'x)
- (when (yes-or-no-p "Take a screen shot? ")
- (let (filename url)
- (if (equal name-shot-p nil)
- (setq filename (concat (format-time-string "%s") ".png"))
- (setq filename (read-from-minibuffer "Filename: ")))
- (shell-command (concat "import -window root ~/img/shots/" filename))
- (copy-file
- (concat "~/img/shots/" filename)
- "/scp:turtil.net:/srv/vhosts/wlair.us.to/public/remote/img/shots/")
- (setq url (concat "http://wlair.us.to/remote/img/shots/" filename))
- (kill-new url)
- (message url)))
- (message "This is not X. You cannot take a screen shot here.")))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement