Evaluating a lisp file with stumpwm functions

1 view
Skip to first unread message

Yonatan Zilpa

unread,
Jun 19, 2023, 5:27:16 PM6/19/23
to stumpw...@nongnu.org
Sorry for this trivial question.
I have a lisp file with stumpwm functions. How do I evaluate it?

Michael Raskin

unread,
Jun 19, 2023, 5:37:35 PM6/19/23
to yz1...@gmail.com, stumpw...@nongnu.org
>Sorry for this trivial question.
>I have a lisp file with stumpwm functions. How do I evaluate it?

Evaluate from stumpwmrc or from UI (or from connected SLIME)?

In stumpwmrc: (load "/path/to/file.lisp")
In UI: press [PREFIX] (normally C-t by default) then colon key (:);
in the prompt type (load "/path/to/file.lisp")



Yonatan Zilpa

unread,
Jun 20, 2023, 4:16:18 AM6/20/23
to 38a9...@rambler.ru, stumpw...@nongnu.org
Can I load this file using the terminal?

Phil Hudson

unread,
Jun 20, 2023, 4:51:49 AM6/20/23
to Yonatan Zilpa, 38a9...@rambler.ru, stumpw...@nongnu.org
Yes. In your rc, create a command that prompts the user to enter a
filename and then loads that file.

Executing a command using the StumpWM UI is very similar to evaluating
a form as described by Michael, but instead of a colon (:) you type
[prefix] then semi-colon (;).

From the second invocation on, the filename will be accessible in
command history (using M-p to scroll backward through that history).

You could even create a command that has your specific filename
hard-coded and that simply loads it without prompting the user.

Phil Hudson

unread,
Jun 20, 2023, 4:52:39 AM6/20/23
to Yonatan Zilpa, 38a9...@rambler.ru, stumpw...@nongnu.org
Sorry, forgot to finish this up:

Then you can invoke the command using the 'stumpish' command line tool:

stumpish load-my-file /path/to/my/file.lisp
Reply all
Reply to author
Forward
0 new messages