[Sawfish] Print rep data in shell

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]

I have a selection of rep scripts, that I wish to also call from bash. With the addition of extra formatting when called from bash

An example rep script that I call is below.

;; file: list-names-of-managed-windows.jl
(setq windows (mapcar (lambda (win) (window-name win)) (managed-windows)))

When called from bash I post process the output into a newline formatted list

 sawfish-client -e "$(cat list-names-of-managed-window.jl)" | sed -e 's/[()]//g' -e 's/" "/"\n"/g' -e 's/"//g'

Is there a better way?


# -l load file and run code
# -p pretty print output
sawfish-client -lp list-names-of-managed-windows.jl

(also, out of curiosity can the above example be wrapped in a bash alias?)

Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/