[STUMP] define run-or-raise keybinding with anonymous function

Tamas Papp <[email protected]>
Newsgroups gmane.comp.window-managers.stumpwm.devel
Message-ID <[email protected]>
Hi,

I am new to stumpwm and find it amazing, but I need to wrap my head
around a few things.

One of them is "commands", in particular, I am looking for an equivalent
of (lambda ...) when I don't want to name a command that I would just
use once. Eg instead of

(defcommand ensure-calibre () ()
  "raise calibre if there is a running instance, otherwise start it"
  (run-or-raise "calibre" '(:title "calibre")))
(define-key *root-map* (kbd "c") "ensure-calibre")

I am looking for something like

(define-key *root-map* (kbd "c")
            (lambda ()
              (run-or-raise "calibre" '(:title "calibre"))))

which of course does not work. Is there a way around this?

Thanks,

Tamas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.