On 10/06/2016 05:53 PM, Rokas Kupstys wrote: > Hey could you share /home/cocobo/scripts/single_head and > /home/cocobo/scripts/dual_head scripts? They sound very interesting if > they are what i think they are.
They are probably not as interesting as you think. single_head: #!/bin/bash # use xwininfo for geometry xrandr --output DP1 --off xdotool search --onlyvisible "Mozilla Firefox" windowmove 326 54 xdotool search --onlyvisible "Mozilla Firefox" windowsize 1350 1010 xdotool search --onlyvisible "Konsole" windowmove 86 54 xdotool search --onlyvisible "Konsole" windowsize 922 1142 xdotool search --onlyvisible "Konversation" windowmove 1016 54 xdotool search --onlyvisible "Konversation" windowsize 900 1142 xdotool search --onlyvisible "gkrellm" windowmove 0 30 dual_head: #!/bin/bash # use xwininfo for geometry xrandr --output DP1 --auto --primary --output HDMI2 --auto --right-of DP1 xdotool search --onlyvisible "Mozilla Firefox" windowmove 383 54 xdotool search --onlyvisible "Mozilla Firefox" windowsize 1350 1142 xdotool search --onlyvisible "Konsole" windowmove 0 54 xdotool search --onlyvisible "Konsole" windowsize 950 1142 xdotool search --onlyvisible "Konversation" windowmove 2936 24 xdotool search --onlyvisible "Konversation" windowsize 900 1172 xdotool search --onlyvisible "gkrellm" windowmove 1920 0 I connect both the host and guest graphic cards to my main monitor. When the host disable the main monitor with the single_head script the monitor looks for other signals and switch the the guest automatically. When the VM shuts down the monitor switch back to the host. The linux desktop have an annoying habit of moving all windows around when the virtual desktop size change and keep the new position when the size change back. I eventually created those scripts to move my regular programs to hardcoded locations. Perhaps one day we will have windows manager that won't fuck up the desktop every time a monitor is hotplugged but until then I use those scripts. _______________________________________________ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users