From pbrochard at common-lisp.net Tue Mar 5 16:40:39 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Tue, 05 Mar 2013 17:40:39 +0100 Subject: [clfswm-devel] CLFSWM keybindings In-Reply-To: <5135a3dd.e1c3320a.0419.ffffbdd2@mx.google.com> (Akshay Srinivasan's message of "Mon, 04 Mar 2013 23:46:14 -0800") References: <5135a3dd.e1c3320a.0419.ffffbdd2@mx.google.com> Message-ID: <87vc95ajg8.fsf@common-lisp.net> Akshay Srinivasan writes: > Hi Philippe, > Hi, > I just tried out your new WM, and was rather impressed with it (the > nested thing is brilliant!). > Thanks :-) but it's not that new (~7 years). > I did want to change the default modifier from Alt to Super though > before using it for a longer time, however. I thought changing this > would be fairly trivial, but I can't seem to find the macro for > define-main-key in the source, is this macro defined somewhere in CLX ? > You can use the binding-substitute-modifier functions. Add something like this in your configuration file: -------------------------------------------------- (defun change-alt-modifier () (binding-substitute-modifier :mod-4 :mod-1)) (add-hook *binding-hook* 'change-alt-modifier) -------------------------------------------------- If you want to go deep in the code, the define-main-key macro is built at compile time by the define-define-key macro defined in clfswm-keys.lisp. > Thanks, > Regards, > Akshay > Philippe From renaud at casenave-pere.fr Sat Mar 16 09:34:37 2013 From: renaud at casenave-pere.fr (=?iso-8859-1?Q?Renaud_Casenave-P=E9r=E9?=) Date: Sat, 16 Mar 2013 18:34:37 +0900 Subject: [clfswm-devel] Mplayer Window suddenly disappears when started in fullscreen Message-ID: <877gl7sn6a.fsf@zahikel.casenave.fr> Hi, For some time now, when I try to run mplayer directly in fullscreen (with the -fs option), the video shows itself for less than 1 second and suddenly disappears. I am using the latest revision from git. I tried with several drivers (xv, sdl, gl and gl2) and sdl is the only one without problem. The weird thing is that if I run it in window mode and I put it manually in fullscreen, it works with every drivers. I don't know if it is related or not, but when I try to move a window to another frame and release the mouse button without moving the cursor (when I don't really want to move it after all), the window disappears. Thanks ! -- Renaud Casenave-P?r? From pbrochard at common-lisp.net Sun Mar 17 09:35:33 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sun, 17 Mar 2013 10:35:33 +0100 Subject: [clfswm-devel] Mplayer Window suddenly disappears when started in fullscreen In-Reply-To: <877gl7sn6a.fsf@zahikel.casenave.fr> ("Renaud \=\?iso-8859-1\?Q\?Casenave-P\=E9r\=E9\=22's\?\= message of "Sat, 16 Mar 2013 18:34:37 +0900") References: <877gl7sn6a.fsf@zahikel.casenave.fr> Message-ID: <871ubee5cq.fsf@common-lisp.net> Renaud Casenave-P?r? a ?crit : > Hi, > Hi, > For some time now, when I try to run mplayer directly in fullscreen (with the > -fs option), the video shows itself for less than 1 second and suddenly > disappears. I am using the latest revision from git. > > I tried with several drivers (xv, sdl, gl and gl2) and sdl is the only one > without problem. The weird thing is that if I run it in window mode and I put it > manually in fullscreen, it works with every drivers. > I confirm this bug. I'll have a look soon. > I don't know if it is related or not, but when I try to move a window to another > frame and release the mouse button without moving the cursor (when I don't > really want to move it after all), the window disappears. > This bug has been fixed some times ago and I can't reproduce it here. BTW, I'll have a look at this too. > Thanks ! > Thanks a lot for the feedback ! Philippe From pbrochard at common-lisp.net Sun Mar 17 22:38:22 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sun, 17 Mar 2013 23:38:22 +0100 Subject: [clfswm-devel] Mplayer Window suddenly disappears when started in fullscreen In-Reply-To: <877gl7sn6a.fsf@zahikel.casenave.fr> ("Renaud \=\?iso-8859-1\?Q\?Casenave-P\=E9r\=E9\=22's\?\= message of "Sat, 16 Mar 2013 18:34:37 +0900") References: <877gl7sn6a.fsf@zahikel.casenave.fr> Message-ID: <87fvzt3b4x.fsf@common-lisp.net> Renaud Casenave-P?r? a ?crit : > Hi, > Hi, > For some time now, when I try to run mplayer directly in fullscreen (with the > -fs option), the video shows itself for less than 1 second and suddenly > disappears. I am using the latest revision from git. > > I tried with several drivers (xv, sdl, gl and gl2) and sdl is the only one > without problem. The weird thing is that if I run it in window mode and I put it > manually in fullscreen, it works with every drivers. > I've fixed the problem in a very simple manner (following some other window manager) in the commit 13ebf06. Please, can you test and report any regression. > I don't know if it is related or not, but when I try to move a window to another > frame and release the mouse button without moving the cursor (when I don't > really want to move it after all), the window disappears. > Do you still got this weird behaviour? I don't get it on my machine. > Thanks ! > Regards, Philippe From renaud at casenave-pere.fr Mon Mar 18 13:10:54 2013 From: renaud at casenave-pere.fr (=?iso-8859-1?Q?Renaud_Casenave-P=E9r=E9?=) Date: Mon, 18 Mar 2013 22:10:54 +0900 Subject: [clfswm-devel] Mplayer Window suddenly disappears when started in fullscreen In-Reply-To: <87fvzt3b4x.fsf@common-lisp.net> (Philippe Brochard's message of "Sun, 17 Mar 2013 23:38:22 +0100") References: <877gl7sn6a.fsf@zahikel.casenave.fr> <87fvzt3b4x.fsf@common-lisp.net> Message-ID: <87fvzsontt.fsf@zahikel.casenave.fr> On Mon, Mar 18 2013, Philippe Brochard wrote: > I've fixed the problem in a very simple manner (following some other > window manager) in the commit 13ebf06. > Please, can you test and report any regression. I updated and it is working fine now, thank you. > Do you still got this weird behaviour? I don't get it on my machine. You're right, I can't reproduce it either? I must have used an older version. I'm sorry for the noise. -- Renaud Casenave-P?r? From renaud at casenave-pere.fr Wed Mar 20 10:10:52 2013 From: renaud at casenave-pere.fr (=?iso-8859-1?Q?Renaud_Casenave-P=E9r=E9?=) Date: Wed, 20 Mar 2013 19:10:52 +0900 Subject: [clfswm-devel] Questions / Feature requests regarding the focus policy Message-ID: <87wqt21ivn.fsf@casenave-pere.fr> Hi, I am starting to fiddle with the focus policy of my frames and windows and I am missing "follow mouse" focus policy. There are three sloppy variants but I would really like a follow mouse one. May I ask for its addition to clfswm ? I also would like to be able to keep windows from stealing the focus automatically. For example, if I launch conkeror from the terminal (even if it is already open), the focus automatically change to conkeror, but I would like to be able to stay on the terminal window and prevent conkeror from stealing my focus. Would this be possible in a simple way ? Thanks ! -- Renaud Casenave-P?r? From pbrochard at common-lisp.net Wed Mar 20 14:49:58 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Wed, 20 Mar 2013 15:49:58 +0100 Subject: [clfswm-devel] Questions / Feature requests regarding the focus policy In-Reply-To: <87wqt21ivn.fsf@casenave-pere.fr> ("Renaud \=\?iso-8859-1\?Q\?Cas\?\= \=\?iso-8859-1\?Q\?enave-P\=E9r\=E9\=22's\?\= message of "Wed, 20 Mar 2013 19:10:52 +0900") References: <87wqt21ivn.fsf@casenave-pere.fr> Message-ID: <87boae5dnt.fsf@common-lisp.net> Renaud Casenave-P?r? a ?crit : > Hi, > Hi, > I am starting to fiddle with the focus policy of my frames and windows and I am > missing "follow mouse" focus policy. There are three sloppy variants but I would > really like a follow mouse one. May I ask for its addition to clfswm ? > Yes of course, we can add this in clfswm. But before this, the focus policy is handled by frames. So I think you want sloppy focus for windows in their own frame when they're in tilling mode. A simple way to do this is to explode windows in their frame to create a frame per window in the current frame : Second mode -> f (frame) -> s (miscellaneous menu) -> x (create a window for each windows in frame) And then set a sloppy focus policy for all windows. Or make it the default from your configuration file. Is this enough or do we have to add a new focus system and follow the focus for windows and not only for frames? > I also would like to be able to keep windows from stealing the focus > automatically. For example, if I launch conkeror from the terminal (even if it > is already open), the focus automatically change to conkeror, but I would like > to be able to stay on the terminal window and prevent conkeror from stealing my > focus. Would this be possible in a simple way ? > If you don't want to create a new frame, you can use the leave-focus-frame-nw-hook new window hook. Second mode -> f (frame) -> n (frame new window hook) -> f (open the next window in the current frame and leave the focus on the current child). Indeed, you can bind a key for it if you often need it. If you need the same but with a new frame not focused, we need to add some little code (see clfswm-nw-hooks.lisp). > Thanks ! > Hope This Helps, Philippe From renaud at casenave-pere.fr Sun Mar 24 12:03:09 2013 From: renaud at casenave-pere.fr (=?UTF-8?Q?Renaud_Casenave-P=C3=A9r=C3=A9?=) Date: Sun, 24 Mar 2013 13:03:09 +0100 Subject: [clfswm-devel] Questions / Feature requests regarding the focus policy In-Reply-To: <87boae5dnt.fsf@common-lisp.net> References: <87wqt21ivn.fsf@casenave-pere.fr> <87boae5dnt.fsf@common-lisp.net> Message-ID: <12f59786260026ff4cc317acdc0c2745@casenave-pere.fr> Hi, Sorry for the late reply? I tried using your solutions but unfortunately, it's not working so well in my case. When I use the "one frame for one window" option, I usually end up with my window in fullscreen when I use run-or-raise to move around (which I often do). In a frame where I have 3 or 4 windows I want to keep an eye on at all time, it is a bit annoying. Then, I realised that if I want a follows mouse type of focus, I would also need to have a feature that moves the mouse to the newly focused window. Again, if I use run-or-raise to move around, if the mouse doesn't move to the new focused window, with the sloppy select method, the focus revert back to where the mouse is? For the second problem, the existing feature is good to know, but again (sorry if I'm being annoying?), I would like it to be the default behavior, and not only for newly opening windows, but for already opened windows that sometimes steal the focus, like if I use browse-url in emacs to open a link in an already opened conkeror window. Maybe I'm trying too much to get the behavior I had before with xmonad? I even wrote a layout I used then, if you want to put it in the sources I'd gladly paste it here. I realised I was still unaware of many of clfswm features while watching the screencasts on the website so I still have a lot to learn. -- Renaud Casenave-P?r? From pbrochard at common-lisp.net Sun Mar 24 16:01:42 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sun, 24 Mar 2013 17:01:42 +0100 Subject: [clfswm-devel] Questions / Feature requests regarding the focus policy In-Reply-To: <12f59786260026ff4cc317acdc0c2745@casenave-pere.fr> ("Renaud \=\?iso-8859-1\?Q\?Casenave-P\=E9r\=E9\=22's\?\= message of "Sun, 24 Mar 2013 13:03:09 +0100") References: <87wqt21ivn.fsf@casenave-pere.fr> <87boae5dnt.fsf@common-lisp.net> <12f59786260026ff4cc317acdc0c2745@casenave-pere.fr> Message-ID: <87ppyokcrd.fsf@common-lisp.net> Renaud Casenave-P?r? a ?crit : > Hi, Sorry for the late reply? > Hi, no problem. > I tried using your solutions but unfortunately, it's not working so well > in my > case. > When I use the "one frame for one window" option, I usually end up with my > window > in fullscreen when I use run-or-raise to move around (which I often do). > In a > frame where I have 3 or 4 windows I want to keep an eye on at all time, it > is a > bit annoying. > > Then, I realised that if I want a follows mouse type of focus, I would > also need > to have a feature that moves the mouse to the newly focused window. Again, > if I > use run-or-raise to move around, if the mouse doesn't move to the new > focused > window, with the sloppy select method, the focus revert back to where the > mouse > is? > Ok, so we need to hack a new sloppy focus method which follow mouse over windows and not only over frames. And we need to move the mouse on the new focused window since its position may have changed according to the frame layout used. Does something like :sloppy-select-window in commit d6b1dd9 do what you want? It's not finished code (there is some glitch) but the idea is here. Myself I think I don't like the automatic mouse move. And I think you've already check for :sloppy focus method. > For the second problem, the existing feature is good to know, but again > (sorry > if I'm being annoying?), I would like it to be the default behavior, and > not > only for newly opening windows, but for already opened windows that > sometimes > steal the focus, like if I use browse-url in emacs to open a link in an > already > opened conkeror window. > Ah, so, you can make it the default new window hook: (setf *default-nw-hook* 'leave-focus-frame-nw-hook) > > Maybe I'm trying too much to get the behavior I had before with xmonad? I > even > wrote a layout I used then, if you want to put it in the sources I'd > gladly > paste it here. > Yes you can paste it here or fork clfswm git repo and ask for a git pull request. > I realised I was still unaware of many of clfswm features while watching > the screencasts on the website so I still have a lot to learn. > yes, clfswm is very rich and I use myself only a few part of all its features :-) From renaud at casenave-pere.fr Mon Mar 25 03:18:30 2013 From: renaud at casenave-pere.fr (=?iso-8859-1?Q?Renaud_Casenave-P=E9r=E9?=) Date: Mon, 25 Mar 2013 12:18:30 +0900 Subject: [clfswm-devel] Questions / Feature requests regarding the focus policy In-Reply-To: <87ppyokcrd.fsf@common-lisp.net> (Philippe Brochard's message of "Sun, 24 Mar 2013 17:01:42 +0100") References: <87wqt21ivn.fsf@casenave-pere.fr> <87boae5dnt.fsf@common-lisp.net> <12f59786260026ff4cc317acdc0c2745@casenave-pere.fr> <87ppyokcrd.fsf@common-lisp.net> Message-ID: <87k3oww4jd.fsf@casenave-pere.fr> On Mon, Mar 25 2013, Philippe Brochard wrote: > Ok, so we need to hack a new sloppy focus method which follow mouse over > windows and not only over frames. And we need to move the mouse on the > new focused window since its position may have changed according to the > frame layout used. Does something like :sloppy-select-window in commit > d6b1dd9 do what you want? > It's not finished code (there is some glitch) but the idea is here. Yes that's the behavior I was hoping for. Thank you. > Myself I think I don't like the automatic mouse move. I just thought of :tile-layout-keep-position when set to false, and you're right, if the mouse automatically moves, it would feel pretty weird... Maybe move it only when the focus changes with the keyboard... It's a more complex change than I thought. > Ah, so, you can make it the default new window hook: > > (setf *default-nw-hook* 'leave-focus-frame-nw-hook) Oh, very nice. I didn't know it would work for every focus stealing. Thanks. > Yes you can paste it here or fork clfswm git repo and ask for a git pull > request. Here you go: #+begin_src lisp (defun three-columns-layout (child parent) "Three Colums: main child in the middle, others on the two sides." (with-slots (rx ry rw rh) parent (let* ((managed-children (update-layout-managed-children child parent)) (pos (child-position child managed-children)) (len (max (1- (length managed-children)) 1)) (dy (round (/ rh (max (truncate (/ (+ (if (oddp pos) 1 0) len) 2)) 1)))) (size (or (frame-data-slot parent :tile-size) 0.75)) (other-size (if (> len 1) (/ (- 1 size) 2) (- 1 size)))) (if (> (length managed-children) 1) (if (= pos 0) (values (adj-border-xy (if (> len 1) (round (+ rx (* rw other-size))) rx) parent) (adj-border-xy ry parent) (adj-border-wh (round (* rw size)) child) (adj-border-wh rh child)) (values (adj-border-xy (if (oddp pos) (round (+ rx (* rw (if (> len 1) (+ size other-size) size)))) rx) parent) (adj-border-xy (round (+ ry (* dy (truncate (/ (1- pos) 2))))) parent) (adj-border-wh (round (* rw other-size)) parent) (adj-border-wh dy parent))) (no-layout child parent))))) (defun set-three-columns-layout () "Three Columns: main child in the middle, others on the two sides." (layout-ask-size "Tile size in percent (%)" :tile-size) (set-layout-managed-children) (set-layout #'three-columns-layout)) #+end_src It's a bit ugly, though... You are free to rewrite it as much as you want. At least it gets the job done. > yes, clfswm is very rich and I use myself only a few part of all its > features :-) Yes, I see that :) -- Renaud Casenave-P?r? From pbrochard at common-lisp.net Thu Mar 28 21:59:55 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Thu, 28 Mar 2013 22:59:55 +0100 Subject: [clfswm-devel] Questions / Feature requests regarding the focus policy In-Reply-To: <87k3oww4jd.fsf@casenave-pere.fr> ("Renaud \=\?iso-8859-1\?Q\?Cas\?\= \=\?iso-8859-1\?Q\?enave-P\=E9r\=E9\=22's\?\= message of "Mon, 25 Mar 2013 12:18:30 +0900") References: <87wqt21ivn.fsf@casenave-pere.fr> <87boae5dnt.fsf@common-lisp.net> <12f59786260026ff4cc317acdc0c2745@casenave-pere.fr> <87ppyokcrd.fsf@common-lisp.net> <87k3oww4jd.fsf@casenave-pere.fr> Message-ID: <87hajvfan8.fsf@common-lisp.net> Renaud Casenave-P?r? a ?crit : > On Mon, Mar 25 2013, Philippe Brochard wrote: > [Sorry for the lag] >> Ok, so we need to hack a new sloppy focus method which follow mouse over >> windows and not only over frames. And we need to move the mouse on the >> new focused window since its position may have changed according to the >> frame layout used. Does something like :sloppy-select-window in commit >> d6b1dd9 do what you want? >> It's not finished code (there is some glitch) but the idea is here. > > Yes that's the behavior I was hoping for. Thank you. > Ok, so I'll clean it up. >> Myself I think I don't like the automatic mouse move. > > I just thought of :tile-layout-keep-position when set to false, and you're > right, if the mouse automatically moves, it would feel pretty weird... > Maybe move it only when the focus changes with the keyboard... It's a more > complex change than I thought. > I think we can focus window without changing their position even when :tile-layout-keep-position is set to true. This'll need some little more work. I'll have a look as soon as possible. >> Ah, so, you can make it the default new window hook: >> >> (setf *default-nw-hook* 'leave-focus-frame-nw-hook) > > Oh, very nice. I didn't know it would work for every focus stealing. Thanks. > Yes, and you can write your own if your not happy with mine :-) >> Yes you can paste it here or fork clfswm git repo and ask for a git pull >> request. > > Here you go: > > #+begin_src lisp > (defun three-columns-layout (child parent) > "Three Colums: main child in the middle, others on the two sides." > (with-slots (rx ry rw rh) parent > (let* ((managed-children (update-layout-managed-children child parent)) > (pos (child-position child managed-children)) > (len (max (1- (length managed-children)) 1)) > (dy (round (/ rh (max (truncate (/ (+ (if (oddp pos) 1 0) len) 2)) 1)))) > (size (or (frame-data-slot parent :tile-size) 0.75)) > (other-size (if (> len 1) (/ (- 1 size) 2) (- 1 size)))) > (if (> (length managed-children) 1) > (if (= pos 0) > (values (adj-border-xy (if (> len 1) > (round (+ rx (* rw other-size))) > rx) parent) > (adj-border-xy ry parent) > (adj-border-wh (round (* rw size)) child) > (adj-border-wh rh child)) > (values (adj-border-xy (if (oddp pos) > (round (+ rx (* rw (if (> len 1) (+ size other-size) size)))) > rx) parent) > (adj-border-xy (round (+ ry (* dy (truncate (/ (1- pos) 2))))) parent) > (adj-border-wh (round (* rw other-size)) parent) > (adj-border-wh dy parent))) > (no-layout child parent))))) > > (defun set-three-columns-layout () > "Three Columns: main child in the middle, others on the two sides." > (layout-ask-size "Tile size in percent (%)" :tile-size) > (set-layout-managed-children) > (set-layout #'three-columns-layout)) > #+end_src > > It's a bit ugly, though... You are free to rewrite it as much as you want. > At least it gets the job done. > Ok, same thing, I'll have a look as soon as possible. Thanks a lot for the code. >> yes, clfswm is very rich and I use myself only a few part of all its >> features :-) > > Yes, I see that :)