Alessandro Serra 3248f97ce6 review app package 3 yıl önce
..
examples 9093fd0fc9 improve dmenu 3 yıl önce
src 3248f97ce6 review app package 3 yıl önce
tests 3248f97ce6 review app package 3 yıl önce
LICENSE 37e8f06a17 move folders 3 yıl önce
README.md 91a5094050 add application to dmenu 3 yıl önce
README.org 91a5094050 add application to dmenu 3 yıl önce
lilu-dmenu.asd 3248f97ce6 review app package 3 yıl önce
packages.lisp 93ef5da341 improve apllications 3 yıl önce

README.md

Table of Contents

  1. lilu-dmenu
    1. Usage
    2. Installation
    3. Author
    4. Licence
    5. Copyright
    6. ToDo

lilu-dmenu

Call dmenu/rofi program from Common Lisp

Usage

(dynamic-menu "select a number" '(1 2 3 4 5)
              :item-fn #'(lambda (x) (format nil "~r" x)))

(multiple-value-bind (sel match-p)
    (dynamic-menu "select a number" '(1 2 3 4 5)
                  :item-fn #'(lambda (x) (format nil "~r" x)))
  (format t "Selection: ~A (~A) ~%" sel (if match-p "matched" "unmatched")))

(let ((*dmenu* :rofi))
  (multiple-value-bind (sel match-p)
      (dynamic-menu "select a number" '(1 2 3 4 5)
                    :item-fn #'(lambda (x) (format nil "~r" x)))
    (format t "Selection: ~A (~A) ~%" sel (if match-p "matched" "unmatched"))))

(multiple-value-bind (sel match-p)
    (dmenu "select a number" '(1 2 3 4 5)
           :item-fn #'(lambda (x) (format nil "~r" x)))
  (format t "Selection: ~A (~A) ~%" sel (if match-p "matched" "unmatched")))

(multiple-value-bind (sel match-p)
    (rofi "select a number" '(1 2 3 4 5)
          :item-fn #'(lambda (x) (format nil "~r" x)))
  (format t "Selection: ~A (~A) ~%" sel (if match-p "matched" "unmatched")))

The default theme:

lilu-dmenu:*dmenu-theme*
lilu-dmenu:*rofi-theme*

To use a different theme:

(let ((*dmenu-theme* (append '((:bg . "#ff0000")
                               (:fg . "#00ff00")) *dmenu-theme*)))
  (dmenu "select a number" '(1 2 3 4 5)
         :item-fn #'(lambda (x) (format nil "~r" x))))

Installation

Clone the project into local-projects of quicklisp, then

(ql:quickload :lilu-dmenu)

Author

  • Alessandro Serra

Licence

CC0

Copyright

Copyright (c) 2019,2021 Alessandro Serra

ToDo