|
|
|
|
|
by junke
1964 days ago
|
|
While not as extreme as what is demonstrated here, I integrate things in my environment with Lisp in a way that is similar to this. I run StumpWM too so I can grab the content of the current X selection and do actions from it (e.g. the content matches a JIRA ticket regex, open it, the text matches a filename, edit it (fun fact, anything can be a filename), etc.). For processes, I wrote something that is not finished, not polished, but if anyone want to steal from it, go ahead: https://github.com/christophejunke/pipeline This allows to spawn processes or threads to pipeline input/output, like done usually with | in shells (with-pipeline ()
(program "ls" (namestring (merge-pathnames "bin/" (user-homedir-pathname))))
(program "sed" "s/a/aaaa/")
(tee/error) ;; "tee" and output a copy to error
(program "wc" "-c")
#'read)
https://github.com/christophejunke/pipeline/blob/master/test...The nmcli.lisp example starts an nmcli process and filters its output to build Lisp objects representing connections: https://github.com/christophejunke/pipeline/blob/master/nmcl... |
|