freenode/#stumpwm - IRC Chatlog
Search
5:49:13
scottj
smashgen: I don't think you can call echo outside of a running stumpwm instance. the best way is probably to use stumpish client to send a message to stumpwm telling it to echo some string. you could also connect to stumpwm using slime/swank and send it a form to evaluate.
5:51:23
smashgen
I would like to be able to use functions like define-frame-preference in a script somehow, so that I can decide what frame a window opens in on-the-fly
5:55:16
smashgen
I don't see the function define-frame-preferences in the stumpish commands list though
5:56:01
scottj
smashgen: why can't you just write some lisp code and include or load it in your .stumpwmrc?
5:57:43
smashgen
so that I can dynamically change where things open up, for instance I want this firefox window to open in frame 4, then I want this firefox window to open in frame 5
5:59:32
scottj
smashgen: I don't understand why that needs to be from terminal, maybe explain more how you're going to do that part
6:02:06
scottj
smashgen: echo '(echo (+ 1 1))' | ~/.stumpwm.d/modules/util/stumpish/stumpish -e eval
6:10:02
scottj
smashgen: echo '(define-frame-preference "Default" (0 nil t :class "Firefox"))' | ~/.stumpwm.d/modules/util/stumpish/stumpish -e eval
6:20:07
smashgen
yeah, but say if I make a lot of placement rules, then want to reset a specific class without clearing all the placement rules is there a way to do this
6:22:16
scottj
smashgen: you can remove an individual rule using lisp. see source of clear-window-placement-rules.
6:27:11
scottj
smashgen: search on github, or download source and search it locally. or setup slime and use M-. in emacs.
6:29:01
scottj
smashgen: no. maybe checkout forget command. also *window-placement-rules* is the variable that holds them all.
6:41:10
smashgen
you do that same command except for the frame number, you put nil, for example: echo '(define-frame-preference "Default" (nil nil t :class "Firefox"))' | ~/.stumpwm.d/modules/util/stumpish/stumpish -e eval
6:48:26
smashgen
show-window-properies is not showing interactively though when used with stumpish -e eval
6:58:36
smashgen
do you know how I would do the same thing in placement, except when the window title contains a specific string?
7:20:05
smashgen
when I maximize youtube videos is there a way to fit the maxmized window in a frame?
7:51:40
smashgen
I was wondering something else, I'm not sure why but notifications aren't working for me in stumpwm
8:08:45
smashgen
I think I tried to use dunst in the past, I get an error message when trying to use dunst saying "Name Lost. Is Another notification daemon running?"
8:12:42
smashgen
well I might as well ask all my questions while I'm here, but another question I had was is there a way to use the echo function with newlines?
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.