[clfswm-devel] new window hooks and others

Fernando Aguayo beren.olvar at gmail.com
Sat Oct 30 14:46:49 UTC 2010


Hi

On Sat, Oct 30, 2010 at 09:54:02AM +0200, Philippe Brochard wrote:
> Fernando Aguayo writes:
> 
> > Hi again,
> >
> Hi,
> 
> > I've been looking to the various nw-hook's but I cannot find a way to
> > make certain windows (classes) to be sent to a certain frame. For
> > example, I would like to make all the pidgin windows to spawn in a
> > frame named "Comm". Is that possible?
> >
> Yes, of course. Here is what I use to have all uzbl windows go in the
> uzbl frame:
> 
> ------------------------------------------------------------
> (defun set-uzbl-frame-nw-hook (&optional (frame *current-child*))
>   "Open the window in the UZBL frame if it match uzbl absorb-nw-test"
>   (when (frame-p frame)
>     (setf (frame-nw-hook frame) 'absorb-window-nw-hook
> 	  (frame-data-slot frame :nw-absorb-test)  (nw-absorb-test-class "uzbl-core"))))
> 
> ;; Add this if you want a menu entry
> ;; (add-menu-key 'frame-nw-hook-menu "z" 'set-uzbl-frame-nw-hook)
> 
> (defun uzbl-init-hook ()
>   (let ((uzbl-frame (create-frame :name "Uzbl")))
>     (add-frame uzbl-frame *root-frame*)
>     (set-uzbl-frame-nw-hook uzbl-frame)))
> 
> (add-hook *init-hook* 'uzbl-init-hook)
> ------------------------------------------------------------
> 
> You'll have to adapt the name and classes. To know the class you can
> display the window informations with the identify menu entry 
> (Second mode+w+i or with the window menu)
> 
> Indeed, here the frame is created in the root frame. You can create it
> in the default frame -> (first (frame-child *root-frame*))
> 
Thank you, I'll try that later.

> > Other problem I'm having is regarding the info-mode. If I try
> > something like
> > (info-mode '("hello" "world!"))
> > clfswm will crash complaining about an unhandled throw.
> > Am I doing something wrong or is it a bug?
> >
> Well, you can't call directly a function which use the display in your
> configuration file since the display is not opened when the
> configuration file is loaded. This is to let us redefine all what we
> want before clfswm is really started.
> 
> For this, you can add an init-hook which is executed just before the
> main loop. Something like this:
> 
> ------------------------------------------------------------
> (defun my-show-hello-world ()
>   (info-mode '("Hello" "World!")))
> 
> (add-hook *init-hook* 'my-show-hello-world)
> ------------------------------------------------------------ 
> 
Probably that is not the problem, since I was doing it in a function
bounded to a key, not directly in the configuration file. Have any
other ideas?

> 
> > Btw, the keybindings are working fine now, but lamentably I don't know
> > anything about how xlib works, so I'am afraid I am of very little help
> > in the flickering problem.
> >
> No problem with the xlib. I'd just like to know if the flickering
> problem is really annoying for you or if you can live with it. 
> BTW I think I know how to prevent it (reparent windows), but I'll
> make this change after the next release (coming soon).
> 
Althoug I can live with it, I rather not have it :P
So if you could fix it would be great.
I'm glad to know a next release is coming. Do you think you could add
the width of the frame and windows borders as a parameter? I find it difficult to
know where I am when I have a maximized window inside a frame.

> > Cheers!
> > Fernando
> >
> Regards,
> 
> Philippe
> 
> 
> 
> _______________________________________________
> clfswm-devel mailing list
> clfswm-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/clfswm-devel

Again, Thank you very much,
regards
Fernando




More information about the clfswm-devel mailing list