stumpwm/clipboard.lisp @ dedc81b8510c
Diagram
author |
Steve Losh <steve@stevelosh.com> |
date |
Tue, 19 Mar 2024 14:06:36 -0400 |
parents |
4673e928c08e |
children |
ea681bd9c52d |
(in-package :stumpwm-user)
(load-module "clipboard-history")
(clipboard-history:start-clipboard-manager)
(defcommand generate-random-uuid () ()
(run-shell-command "uuidgen | tr -d '\\n' | ~/src/dotfiles/bin/pbcopy")
(message "Copied random UUID to clipboard."))
(defcommand bee-movie-script () ()
(run-shell-command "pbeecopy")
(message "Copied the entire Bee Movie script to clipboard."))
(defcommand urlize-jira-issue () ()
(let ((issue (str:trim (pbpaste))))
(if (ppcre:scan "^[A-Z0-9]+-\\d+$" issue)
(let* ((endpoint (str:trim (run-shell-command "grep endpoint .jira.d/config.yml | sed -e 's/.*: //'" t)))
(url (format nil "~A/browse/~A" endpoint issue)))
(pbcopy url)
(message "Copied ~A to the clipboard." url))
(message "Clipboard does not look like a JIRA issue."))))