Novice Questions about clfswm Usage
Alexander Stein
al at il5.in
Sun May 31 14:18:34 UTC 2015
Philippe Brochard <pbrochard at common-lisp.net> writes:
> Hi,
>
> @Alexander: Welcome on board. Hope you'll like clfswm.
>
> It's nice to have no more words to say than the perfect Andrea's response :-)
Thank you for kick-ass open source software. You helped me
procrastinate many hours in lieu of work and homework. I think I need
to take another look at CL, and this project is forcing me to sit down
and finally learn some syntax.
> Thanks Andrea,
Ditto.
> Have fun,
Sure am. Have some questions, but will ask when I spend a week or two on
them and I am certain I will not know the answer.
> Andrea De Michele writes:
>
>> 1) for switch the main modifier form Alt to left win
>> key. I take a note that the following code must be at the end of the
>> configuration file, but I don't known why and if it is really necessary:
>>
>> (defun change-alt-modifier ()
>> (binding-substitute-modifier :mod-4 :mod-1))
>>
>> (add-hook *binding-hook* 'change-alt-modifier)
Worked beautifully. Thanks.
>> 2) stumpwm like run-or-raise:
>>
>> in src/clfswm-util.lisp there is the function run-or-raise.
>> I use it like the configuration file example ./doc/dot-clfswmrc for example for emacs:
>>
>> (defun $start-emacs ()
>> "Run or raise emacs"
>> (setf *second-mode-leave-function*
>> (lambda ()
>> (run-or-raise (lambda (win) (string-equal "emacs"
>> (xlib:get-wm-class win)))
>> (lambda () (do-shell "cd $HOME && exec emacsclient -c")))))
>> (leave-second-mode))
Ditto. Also worked like a charm. Thanks.
>> and then add a binding to the new function:
>>
>> (defun binding-example ()
>> (define-second-key ("e") '$start-emacs))
>>
>> (add-hook *binding-hook* 'binding-example)
And more binding hooks. Your answer was definitely sufficient. I also
found some beautiful macros (I rewrote my first CL macro, thanks to you
guys!) having adapted it from here.
https://github.com/XuHaoJun/dotfiles/commit/db2ee9ef0966505877beff08550843faf9f38a9c#diff-e6a1bfb14fee2521e0b0d3fdcb2869f8R19
https://github.com/XuHaoJun/dotfiles/commit/db2ee9ef0966505877beff08550843faf9f38a9c#diff-e6a1bfb14fee2521e0b0d3fdcb2869f8R26
https://github.com/XuHaoJun/dotfiles/commit/db2ee9ef0966505877beff08550843faf9f38a9c#diff-e6a1bfb14fee2521e0b0d3fdcb2869f8R31
Thanks again.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/clfswm-devel/attachments/20150531/f09a371b/attachment.sig>
More information about the clfswm-devel
mailing list