freenode/#stumpwm - IRC Chatlog
Search
9:22:28
smashgen
yeah, I got it working loke, I had to eval the echo function and not run it as a command for some reason
9:37:51
scottj
smashgen: https://stumpwm.github.io/git/stumpwm-git_10.html#index-run_002dshell_002dcommand
9:37:58
loke
The problem is that if you just do it outright, you will block stumpwm while it runs. So you should run it in a thread, and display the output using (CALL-IN-MAIN-THREAD)
9:40:29
smashgen
I might run longer commands, but what would the function call-in-main-thread while using ls as the shell command?
9:44:59
loke
(make-thread (lambda () (let ((output (stumpwm::run-prog-collect-output .....))) (stumpwm:call-in-main-thread (lambda () (stumpwm:message output)))))
10:05:22
smashgen
well I use arch linux, so I used yaourt and installed it from the arch user repository
10:08:45
loke
smashgen: I'm not sure tthere are such things as version numbers. :-) I just pull whatever is latest from the repository
10:10:04
smashgen
I'm not to familiar with common lisp, you have any example code for how I would use quicklisp for stumpwm?
10:12:56
loke
sbcl --eval '(ql:quickload "stumpwm")' --eval '(sb-ext:save-lisp-and-die "stumpwm" :toplevel #'"'"'stumpwm:stumpwm :executable t)'
10:13:48
loke
Quicklisp from a repository doesn't make any sense. It's fully installd in your home directory, with a lot of files downloaded there.
10:17:38
smashgen
well, I mostly use the shell for everything, I am not too experienced in lisp coding
10:34:39
smashgen
would I need to install stumpwm using quicklisp in order to call stumpwm functions from sbcl?
10:35:10
ecraven
smashgen: if you want to interact with a running stumpwm, you might want to look into starting swank on it and connecting with SLIME
10:35:50
smashgen
I did (ql:quickload "stumpwm"), and tried running (stumpwm:echo "foo") and it didn't work
10:45:56
jason_m
smashgen: You need to start a swank server inside the running stumpwm, and then connect to that. You can eval lisp forms in stump using 'C-t :'
10:47:20
jason_m
Then you can connect to it. If you use Emacs/SLIME, you can do 'M-x slime-connect' and specify the localhost and port 4004 to connect.
10:49:23
jason_m
So I don't have to deal with package prefixes, I usually switch to the stumpwm-user package.
10:51:07
smashgen
I just installed quicklisp, will I need to reboot in order to get my running instance of stumpwm to recognize it?
10:54:33
jason_m
smashgen: You don't need to reboot. If you want to rebuild stumpwm, you'll need to log out and back into your window manager to pick up the new build.