Rofi is a linux modal menu for fuzzy filtering, with a similar UX to Alfred or Spotlight on OSX. Borrows quite directly from the fzf example.
12 lines
308 B
Clojure
12 lines
308 B
Clojure
(require '[babashka.process :as p])
|
|
|
|
(defn rofi [s]
|
|
(let [proc (p/process
|
|
["rofi" "-i" "-dmenu" "-mesg" "Select" "-sync" "-p" "*"]
|
|
{:in s :err :inherit
|
|
:out :string})]
|
|
(:out @proc)))
|
|
|
|
(rofi (slurp *in*))
|
|
|
|
;; `echo "hi\nthere\nclj" | bb examples/rofi.clj`
|