Re: Twinview, Awesome, and dynamic switching

2011-01-31 Thread Uli Schlachter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Am 31.01.2011 03:59, Ng Oon-Ee wrote:
[...]
 So anyway, if I currently have the external monitor connected and window
 A on the laptop screen, window B on the monitor, then when I disconnect
 the external monitor and run auto-disper, I'm left with one laptop
 screen showing window A. Window B shows on the switcher, but I need to
 switch tiling layouts at least once to get it to show on the laptop
 screen (it seems to still have the old coordinates, so exists beyond the
 laptop screen).
[...]

Hi,

to find out the location of the window after disconnecting a monitor, you could
do something like this.

- - $ xwininfo | grep 'id'
  Now click on the window and remember the window id it gives you, e.g.:
xwininfo: Window id: 0x1a6 16:45 psychon@psytux:~
- - Make the window disappear via disper.
- - $ xwininfo -id 0x1a6

Absolute upper-left X and Absolute upper-left Y tells you where the window
ended up.


One question: Do you have a floating layout in awesome after the restart? If no,
then obviously the selected layout should move the window to its correct place.
If no, then the following snippet in the default rc.lua should make the window
visible:

client.add_signal(manage, function (c, startup)
[...]
  if not c.size_hints.user_position and not c.size_hints.program_position then
 awful.placement.no_overlap(c)
 awful.placement.no_offscreen(c)
  end
[...]


Cheers,
Uli

- -- 
Sometimes the people that know software the best are the ones
that hate it the most.  -- infogulch
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBCAAGBQJNRtncAAoJECLkKOvLj8sG9IwH/RyasXHuFSeb/xAhUmf+vpsM
k6YablJ2MlxZuGK6mGwFLq7zPt851Bhn5HzktNGU2kbzH8xCLtmGLZ3tc0GRfC3K
uybHgisdmqk45RAL7/uWwFCXY0itq+uKzoxXeRZNH4Ou7b/rmpSuVs4ob1FgxQt9
cGWIczrqpbadvPzqL4328T+0wSZCAkAsrD+9CnsLNRipSwS/HPboBx8ccZ4WWHr1
WcYum58brf8nvZiR4Uk6KAfkBkdhbw6GNOjuBOlbZXjAX4uMYU6qE9ppyL+W+tYc
6L7jcy1tySsUx30oJUslbXk8xLP4PHuLRt9SVUWwK0AbEXmdUH5iwx2b0y8aiZ0=
=CD1p
-END PGP SIGNATURE-

-- 
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


Twinview, Awesome, and dynamic switching

2011-01-30 Thread Ng Oon-Ee
Hi all,

I use a laptop which sometimes has an external monitor connected. I have
a shortcut key bound to the auto-disper utility, which itself calls the
disper utility based on some presets. disper is sort of a simplified
commandline interface to nvidia-settings, sort of like using xrandr
(different syntax/capabilities).

So anyway, if I currently have the external monitor connected and window
A on the laptop screen, window B on the monitor, then when I disconnect
the external monitor and run auto-disper, I'm left with one laptop
screen showing window A. Window B shows on the switcher, but I need to
switch tiling layouts at least once to get it to show on the laptop
screen (it seems to still have the old coordinates, so exists beyond the
laptop screen).

Is this sort of behaviour expected? What's the best way to work around
it?




-- 
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.