clipboard.lisp 517 B

123456789101112131415161718
  1. (in-package :stumpwm)
  2. (defcommand current-window->clipboard () ()
  3. (putsel (window-title (current-window))))
  4. (sb-posix:setenv "CM_HISTLENGTH" "25" 1)
  5. (sb-posix:setenv "CM_LAUNCHER" "rofi" 1)
  6. (defcommand greenclip () ()
  7. (run-shell-command
  8. (join `("rofi"
  9. ,(format nil "-modi ~s -show clipboard -run-command '{cmd}'" "clipboard:greenclip print")))))
  10. (defcommand espanso-daemon () ()
  11. (run-shell-command
  12. (join (list (concat (getenv "HOME") "/.nix-profile/bin/espanso")
  13. "start"))))