rofi.lisp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. (in-package :stumpwm)
  2. (defun run-rofi (command &optional dark)
  3. (run-shell-command
  4. (join `("rofi" ,command))))
  5. (defun run-rofi* (command &optional dark)
  6. (run-shell-command
  7. (join `("rofi" ,@command))))
  8. (defcommand rofi-drun () ()
  9. "Open Rofi to launch `.desktop' file."
  10. (run-rofi "-modi run,drun -show drun"))
  11. (defcommand rofi-ssh () ()
  12. "Open Rofi ssh list."
  13. (run-rofi
  14. (format nil "-ssh-command '{terminal} --title \"ssh@{host}\" --command {ssh-client} {host}' -width 20 -terminal '~a' -modi ssh -show ssh"
  15. "alacritty")))
  16. (defcommand rofi-mycli () ()
  17. "Open Rofi mycli."
  18. (run-rofi (concat "-modi mycli:" (getenv "HOME") "/.local/bin/rofi-mycli -show mycli")))
  19. (defcommand rofi-window () ()
  20. "Open Rofi window list."
  21. (run-rofi "-modi window -show window"))
  22. (defcommand rofi-twitchy () ()
  23. "Open Rofi with Twitchy plugin."
  24. (run-rofi "-modi twitchy:rofi-twitchy -show twitchy"))
  25. (defcommand rofi-mytop () ()
  26. "Open Rofi mytop."
  27. (run-rofi "-modi mycli:/home/oleg/.local/bin/rofi-mycli -show mycli"))