Hi I was trying to find a command telling which output reported by xrandr is primary one.
I managed to find a solution, but not so clean and simple. One needs to take the xdpyinfo information about mode and position from XINERAMA extension and join it with xrandr's output to get the answer. In one line: xrandr | grep $(xdpyinfo -ext XINERAMA|awk '/^ head #0:/ {sub(",","+"); printf $3"+"$5}') The simplest way would be to use xrandr, as it has all the data, but unfortunately is not showing it. I modified xrandr's source (the patch is attached) to output "primary" at the end of the line with primary output's name. Sample output: Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 8192 x 8192 DVI-D-1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm primary 1920x1200 60.0*+ 1600x1200 60.0 Do you know any other ways to check which output is primary? Maybe it is possible to merge this patch into xrandr's source or apply other changes to show this info? Best Regards -- Maciej Sitarz
--- xrandr.c_orig 2011-12-15 23:44:42.297417054 +0100 +++ xrandr.c 2011-12-15 23:42:58.202718413 +0100 @@ -2983,6 +2983,11 @@ (int)output_info->mm_width, (int)output_info->mm_height); } + if (output_is_primary(output)) + { + printf (" primary"); + } + if (crtc && crtc->panning_info && crtc->panning_info->width > 0) { XRRPanning *pan = crtc->panning_info;
_______________________________________________ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com