From beren.olvar at gmail.com Sat Oct 23 13:16:45 2010 From: beren.olvar at gmail.com (Fernando Aguayo) Date: Sat, 23 Oct 2010 14:16:45 +0100 Subject: [clfswm-devel] default keybinding Message-ID: <20101023131645.GA8613@aristocracia> Hi, I'm just trying out clfswm after some time using stumpwm. I would like to know if there is a way to change globally the default modifier from mod-1 to, for example F20 (which I have mapped to the "windows" key). I could just make sed do it, but then I will have to be extra carefull when pulling from the git repository :( Other issue I'm having is that the frames flicker a lot when changing from one to another. I'm using sbcl, could that be the problem? Thanks! Fernando From pbrochard at common-lisp.net Sat Oct 23 21:16:06 2010 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sat, 23 Oct 2010 23:16:06 +0200 Subject: [clfswm-devel] default keybinding References: <20101023131645.GA8613@aristocracia> Message-ID: <87wrp81ug9.fsf@free.fr> Fernando Aguayo writes: > Hi, > Hi, > I'm just trying out clfswm after some time using stumpwm. > Thanks for your interest in clfswm! > I would like to know if there is a way to change globally the default > modifier from mod-1 to, for example F20 (which I have mapped to the > "windows" key). I could just make sed do it, but then I will have to > be extra carefull when pulling from the git repository :( > You can have a look at contrib/keyb_fr.lisp to change only some keybindings or you can redefine the functions set-default-main-keys, set-default-main-mouse from binding.lisp and the same with the second mode keybinding. For example, put this in your .clfswmrc configuration file to have only a minimal keybinding: ---------------------------------------------------------------------- (defun set-default-main-keys () (define-main-key ("F1" :F20) 'help-on-clfswm) (define-main-key ("Home" :F20 :control :shift) 'exit-clfswm)) ---------------------------------------------------------------------- You can then use sed on this function. If you prefer a more lispy way, you can pull the last git version and add something like this in your .clfswmrc: ---------------------------------------------------------------------- (defun change-mod-1-modifier () (binding-substitute-modifier :F20 :mod-1)) (add-hook *binding-hook* 'change-mod-1-modifier) ---------------------------------------------------------------------- Be sure that this hook is the last binding hook (ie: put those lines at the end of the configuration file). To identify your new modifier (I'm not sure that :F20 will be recognized as a modifier), you can use the identify key function (second-mode-key + i). > Other issue I'm having is that the frames flicker a lot when changing > from one to another. I'm using sbcl, could that be the problem? > There is a bug fixed in the last git version. There remains some frames flickering because clfswm needs to raise the parent frame to display its border. > Thanks! > Fernando > Regards, Philippe From beren.olvar at gmail.com Sun Oct 24 20:08:23 2010 From: beren.olvar at gmail.com (Fernando Aguayo) Date: Sun, 24 Oct 2010 21:08:23 +0100 Subject: [clfswm-devel] default keybinding In-Reply-To: <87wrp81ug9.fsf@free.fr> References: <20101023131645.GA8613@aristocracia> <87wrp81ug9.fsf@free.fr> Message-ID: <20101024200823.GA18277@aristocracia> On Sat, Oct 23, 2010 at 11:16:06PM +0200, Philippe Brochard wrote: > Fernando Aguayo writes: > > > Hi, > > > Hi, > > > I'm just trying out clfswm after some time using stumpwm. > > > Thanks for your interest in clfswm! au contraire! thank you for developing this wm. The idea behind is great. > > > I would like to know if there is a way to change globally the default > > modifier from mod-1 to, for example F20 (which I have mapped to the > > "windows" key). I could just make sed do it, but then I will have to > > be extra carefull when pulling from the git repository :( > > > You can have a look at contrib/keyb_fr.lisp to change only some > keybindings or you can redefine the functions set-default-main-keys, > set-default-main-mouse from binding.lisp and the same with the second > mode keybinding. > > For example, put this in your .clfswmrc configuration file to have only > a minimal keybinding: > > ---------------------------------------------------------------------- > (defun set-default-main-keys () > (define-main-key ("F1" :F20) 'help-on-clfswm) > (define-main-key ("Home" :F20 :control :shift) 'exit-clfswm)) > ---------------------------------------------------------------------- > > You can then use sed on this function. > > If you prefer a more lispy way, you can pull the last git version and > add something like this in your .clfswmrc: > > ---------------------------------------------------------------------- > (defun change-mod-1-modifier () > (binding-substitute-modifier :F20 :mod-1)) > > (add-hook *binding-hook* 'change-mod-1-modifier) > ---------------------------------------------------------------------- > > Be sure that this hook is the last binding hook (ie: put those lines at > the end of the configuration file). > > To identify your new modifier (I'm not sure that :F20 will be recognized > as a modifier), you can use the identify key function (second-mode-key + i). > > > > Other issue I'm having is that the frames flicker a lot when changing > > from one to another. I'm using sbcl, could that be the problem? > > > There is a bug fixed in the last git version. There remains some frames > flickering because clfswm needs to raise the parent frame to display its > border. > > > Thanks! > > Fernando > > > Regards, > > Philippe > > > > _______________________________________________ > clfswm-devel mailing list > clfswm-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/clfswm-devel Thanks for the recomendations. I wil try them as soon as I can make some time for it. Regards Fernando From pbrochard at common-lisp.net Sun Oct 24 22:45:24 2010 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Mon, 25 Oct 2010 00:45:24 +0200 Subject: [clfswm-devel] default keybinding In-Reply-To: <20101024200823.GA18277@aristocracia> (Fernando Aguayo's message of "Sun, 24 Oct 2010 21:08:23 +0100") References: <20101023131645.GA8613@aristocracia> <87wrp81ug9.fsf@free.fr> <20101024200823.GA18277@aristocracia> Message-ID: <87r5ff6whn.fsf@free.fr> Fernando Aguayo writes: > On Sat, Oct 23, 2010 at 11:16:06PM +0200, Philippe Brochard wrote: >> Fernando Aguayo writes: >> >> > Hi, >> > >> Hi, >> >> > I'm just trying out clfswm after some time using stumpwm. >> > >> Thanks for your interest in clfswm! > au contraire! thank you for developing this wm. The idea behind is > great. > Thanks. BTW the main idea is from Cyrille THOUVENIN :) [...] > Thanks for the recomendations. I wil try them as soon as I can make > some time for it. > In fact the flickering is not caused by a bug in clfswm but it's just that I've added to many xlib:display-finish-output. I removed those not needed in the last commit (49a779854dc7fe919946786b0a242ec6140eeaee). I'd like to have some feedback on this part. The flickering is acceptable for me but I've some ideas to prevent it if it causes to much troubles: - with a reparent windows process (surely the prefered way) - with a compositing windows process Regards, Philippe From beren.olvar at gmail.com Fri Oct 29 23:34:26 2010 From: beren.olvar at gmail.com (Fernando Aguayo) Date: Sat, 30 Oct 2010 00:34:26 +0100 Subject: [clfswm-devel] new window hooks and others Message-ID: <20101029233426.GA7980@aristocracia> Hi again, 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? 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? 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. Cheers! Fernando From pbrochard at common-lisp.net Sat Oct 30 07:54:02 2010 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sat, 30 Oct 2010 09:54:02 +0200 Subject: [clfswm-devel] new window hooks and others In-Reply-To: <20101029233426.GA7980@aristocracia> (Fernando Aguayo's message of "Sat, 30 Oct 2010 00:34:26 +0100") References: <20101029233426.GA7980@aristocracia> Message-ID: <87pqus15gl.fsf@free.fr> 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*)) > 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) ------------------------------------------------------------ > 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). > Cheers! > Fernando > Regards, Philippe From beren.olvar at gmail.com Sat Oct 30 14:46:49 2010 From: beren.olvar at gmail.com (Fernando Aguayo) Date: Sat, 30 Oct 2010 15:46:49 +0100 Subject: [clfswm-devel] new window hooks and others In-Reply-To: <87pqus15gl.fsf@free.fr> References: <20101029233426.GA7980@aristocracia> <87pqus15gl.fsf@free.fr> Message-ID: <20101030144649.GA32445@aristocracia> 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 From pbrochard at common-lisp.net Sat Oct 30 20:00:27 2010 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sat, 30 Oct 2010 22:00:27 +0200 Subject: [clfswm-devel] new window hooks and others In-Reply-To: <20101030144649.GA32445@aristocracia> (Fernando Aguayo's message of "Sat, 30 Oct 2010 15:46:49 +0100") References: <20101029233426.GA7980@aristocracia> <87pqus15gl.fsf@free.fr> <20101030144649.GA32445@aristocracia> Message-ID: <87d3qr1mec.fsf@free.fr> Fernando Aguayo writes: [...] >> > 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? > Ah, ok. Where do you put your code and how do you assign your key ? I'd like to be able to reproduce the bug. >> >> > 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 > Indeed :) > So if you could fix it would be great. > Yes, I'll do my best. > 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. > Actually the border size is hardcoded to 1 pixel. It's not to much efforts to make it variable. I put this on the TODO list for the next release. Regards, Philippe From beren.olvar at gmail.com Sat Oct 30 20:28:20 2010 From: beren.olvar at gmail.com (Fernando Aguayo) Date: Sat, 30 Oct 2010 21:28:20 +0100 Subject: [clfswm-devel] new window hooks and others In-Reply-To: <87d3qr1mec.fsf@free.fr> References: <20101029233426.GA7980@aristocracia> <87pqus15gl.fsf@free.fr> <20101030144649.GA32445@aristocracia> <87d3qr1mec.fsf@free.fr> Message-ID: <20101030202820.GA30899@aristocracia> On Sat, Oct 30, 2010 at 10:00:27PM +0200, Philippe Brochard wrote: > Fernando Aguayo writes: > > > [...] > > > >> > 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? > > > Ah, ok. Where do you put your code and how do you assign your key ? > I'd like to be able to reproduce the bug. Oops, my bad. After all you was right. In a keybinding it works fine, the problem was I was invoking it through slime. Sorry about that. > > >> > >> > 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 > > > Indeed :) > > > So if you could fix it would be great. > > > Yes, I'll do my best. > > > 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. > > > Actually the border size is hardcoded to 1 pixel. It's not to much > efforts to make it variable. I put this on the TODO list for the next > release. Great! that will allow me to keep my configs separated from the source :) > > Regards, > > Philippe > > > > _______________________________________________ > clfswm-devel mailing list > clfswm-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/clfswm-devel Regards Fernando