Re: Laptop and external screen on the fly
2012/3/3 Uli Schlachter psyc...@znc.in On 03.03.2012 22:40, Raphael Fournier wrote: (to the devs: is it really the expected behavior, to have the terms stay on a screen, even if its numbers goes from 1 to 2 ?) WHICH MERE MORTAL DARES TO SUMMON THE ALMIGHTY DEV? *insert evil laughter* Let's see... Function scan() in awesome.c looks for existing windows and does some magic. Nothing screen-related yet. Each client (which should be managed) is passed to client_manage(). This function then checks which screen the client is on: /* Set the right screen */ screen_client_moveto(c, screen_getbycoord(wgeom-x, wgeom-y), false); So nothing gets moved around. It just stays at the position it was before awesome started. (Later, the client layout code kicks in and rearranges each screen, but each client stays on the screen that it was on when awesome started). And yes, awesome restarting due to a new screen appearing is just a special case. So if the new screen is to the right or below existing screens, clients will stay on the screen they were on previously. If the new screen is above or left of existing screens, stuff gets shuffles around. This is the key point I needed to know, thanks. I now understand that it is a matter of geometry coordinates on the screen. I was a bit confused because my big display receives screen number 1, whether it is set left or right of my laptop (and I thought clients would follow screen numbers). I will physically switch my screens then, so that my laptop is on the right (which will make clients move to the bigger screen when connected). If the new screen has a smaller resolution than existing screens, clients could even be randomly distributed between the screens. I hope that explains what the current behavior is. Yes, Thank you very much, almighty and worshipped dev! You ask if this is the expected behavior? Of course it is. For one because that means I don't have to change anything and because awesome doesn't save any state across restarts, thus not much can be done about this. /dev -- - Buck, when, exactly, did you lose your mind? - Three months ago. I woke up one morning married to a pineapple. An ugly pineapple... But I loved her. -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.
Re: Laptop and external screen on the fly
diff rc.dualhead rc.singlehead 399c399 properties = { tag = tags[2][8] } }, Don't do this. Just use screen.count() instead of hard coded screen ID in a single rc.lua. It will return 1 to you with one screen and 2 with two screens. -- Adrian C. (anrxc) | anrxc..sysphere.org | PGP ID: D20A0618 PGP FP: 02A5 628A D8EE 2A93 996E 929F D5CB 31B7 D20A 0618 -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.
Re: Laptop and external screen on the fly
Excerpts from Dariusz Luksza's message of Fri Mar 02 20:20:57 +0100 2012: You can try screenful, it will automatically discover connected monitors and setup proper arrangement based on configuration [1] https://github.com/dluksza/screenful Thank you soo much, seriously. \o/ -- Regards, Alfredo Palhares -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.
Re: Laptop and external screen on the fly
I will also try screenful sounds very promising. A little typo in the README (No - Now). Perhaps you could add it to the wiki (at least make a link to github), it may help other awesome users ! Thanks ! And, indeed, thanks to others for their solutions (I may also try the sharedtags solution). (to the devs: is it really the expected behavior, to have the terms stay on a screen, even if its numbers goes from 1 to 2 ?) 2012/3/3 Alfredo Palhares masterk...@masterkorp.net Excerpts from Dariusz Luksza's message of Fri Mar 02 20:20:57 +0100 2012: You can try screenful, it will automatically discover connected monitors and setup proper arrangement based on configuration [1] https://github.com/dluksza/screenful Thank you soo much, seriously. \o/ -- Regards, Alfredo Palhares -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.
Re: Laptop and external screen on the fly
On 03.03.2012 22:40, Raphael Fournier wrote: (to the devs: is it really the expected behavior, to have the terms stay on a screen, even if its numbers goes from 1 to 2 ?) WHICH MERE MORTAL DARES TO SUMMON THE ALMIGHTY DEV? *insert evil laughter* Let's see... Function scan() in awesome.c looks for existing windows and does some magic. Nothing screen-related yet. Each client (which should be managed) is passed to client_manage(). This function then checks which screen the client is on: /* Set the right screen */ screen_client_moveto(c, screen_getbycoord(wgeom-x, wgeom-y), false); So nothing gets moved around. It just stays at the position it was before awesome started. (Later, the client layout code kicks in and rearranges each screen, but each client stays on the screen that it was on when awesome started). And yes, awesome restarting due to a new screen appearing is just a special case. So if the new screen is to the right or below existing screens, clients will stay on the screen they were on previously. If the new screen is above or left of existing screens, stuff gets shuffles around. If the new screen has a smaller resolution than existing screens, clients could even be randomly distributed between the screens. I hope that explains what the current behavior is. You ask if this is the expected behavior? Of course it is. For one because that means I don't have to change anything and because awesome doesn't save any state across restarts, thus not much can be done about this. /dev -- - Buck, when, exactly, did you lose your mind? - Three months ago. I woke up one morning married to a pineapple. An ugly pineapple... But I loved her. -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.
Re: Laptop and external screen on the fly
What if you set the extern monitor as primary? I usually set my HDMI output as primary, sometimes I even disable my laptop monitor. -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.
Re: Laptop and external screen on the fly
My external monitor is already set as primary (at least it is screen 1 for awesome). But my urxvts act as if they are stuck on the laptop screen (as if there tag table contain screen.count instead of 1). Yes, I could also disable the laptop screen but I like to keep a root term there and a few other dedicated apps (which behave well with awesome). 2012/3/2 Claudio Roberto França Pereira spide...@gmail.com What if you set the extern monitor as primary? I usually set my HDMI output as primary, sometimes I even disable my laptop monitor.
Re: Laptop and external screen on the fly
On 03/02/12 17:42, Gabriel Lecouvreur wrote: Hello, I have a small issue with awesome : I sometimes plug my laptop to an external screen and then issue an xrandr command to make the new screen available. Then, Awesome restarts. And I am not pleased with the way it deals with clients : clients with no rule in my rc.lua (like my urxvt-terms) stay on the laptop screen (the former main screen) and I would like them to go on the new main screen (while keeping their tags positions). I have searched and read some old threads of the mailing list, and apparently there is no way to store these positions before restarting. I wonder however if it would be possible to make a transfer-to-mainscreen.lua (or sh) script using some awesome-client magic to do it. You can try screenful, it will automatically discover connected monitors and setup proper arrangement based on configuration [1] https://github.com/dluksza/screenful -- Best regards GSM: +48 695 192 160 Blog: http://luksza.org LinkedIn: http://www.linkedin.com/in/dariuszluksza -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.
Re: Laptop and external screen on the fly
I use this method. it's not perfect but works for me. have two rc config in ~/.config/awesome, one is rc.dualhead (for two monitor), one is rc.singlehead. the only difference is for dual head, you can specify Class/Name application been put in tags[2][x]. [2] is the second monitor. diff rc.dualhead rc.singlehead 399c399 properties = { tag = tags[2][8] } }, --- properties = { tag = tags[1][8] } }, 401c401 properties = { tag = tags[2][2] } }, --- properties = { tag = tags[1][2] } }, 403c403 properties = { tag = tags[2][2] } }, --- properties = { tag = tags[1][2] } }, 405c405 and create two bash shell : a1 and a2. kevinrong@x220-kr:/usr/local/bin$ cat a1 cp ~/.config/awesome/rc.singlehead ~/.config/awesome/rc.lua kevinrong@x220-kr:/usr/local/bin$ cat a2 cp ~/.config/awesome/rc.dualhead ~/.config/awesome/rc.lua before you switch to dual monitor, enter a2, before you switch back to laptop only, enter a1. Kevin On Sat, Mar 3, 2012 at 6:20 AM, Dariusz Luksza dariusz.luk...@gmail.comwrote: On 03/02/12 17:42, Gabriel Lecouvreur wrote: Hello, I have a small issue with awesome : I sometimes plug my laptop to an external screen and then issue an xrandr command to make the new screen available. Then, Awesome restarts. And I am not pleased with the way it deals with clients : clients with no rule in my rc.lua (like my urxvt-terms) stay on the laptop screen (the former main screen) and I would like them to go on the new main screen (while keeping their tags positions). I have searched and read some old threads of the mailing list, and apparently there is no way to store these positions before restarting. I wonder however if it would be possible to make a transfer-to-mainscreen.lua (or sh) script using some awesome-client magic to do it. You can try screenful, it will automatically discover connected monitors and setup proper arrangement based on configuration [1] https://github.com/dluksza/**screenfulhttps://github.com/dluksza/screenful -- Best regards GSM: +48 695 192 160 Blog: http://luksza.org LinkedIn: http://www.linkedin.com/in/**dariuszlukszahttp://www.linkedin.com/in/dariuszluksza -- To unsubscribe, send mail to awesome-unsubscribe@naquadah.**orgawesome-unsubscr...@naquadah.org . -- Kevin Rong Network Engineer Corporate Network Operations Google INC Sydney, Australia Tel: +61-2-9374-4084
Re: Laptop and external screen on the fly
On 03/02/12 22:01, kevinrong wrote: before you switch to dual monitor, enter a2, before you switch back to laptop only, enter a1. using screenful you don't need to copy anything, it will automatically detect that external screen was connected/disconnected and launch proper xrandr configuration based on unique screen EDID -- Best regards GSM: +48 695 192 160 Blog: http://luksza.org LinkedIn: http://www.linkedin.com/in/dariuszluksza -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.