I have to amend my previous statement. It seems that plugging and unplugging does more harm than a reboot. Since this is very important to me I tested some more and found this to be the case:
I set up 3 new monitors. Each with 4 spaces and each space with a non-standard desktop image. When I shutdown and them startup with just the laptop screen, I see 10 out of 12 spaces. I donât care that theyâre all on one monitor, but itâs weird that Iâm now missing 2.
The magic happens when I now plug in the monitors again⌠I get 1 of the original spaces on each monitor and they each have 3 spaces with a default desktop image, so I assume those are new. I have 12 in total.
Now I disconnect one of the monitors and the laptop screen gets 7, not 8 spaces. I think a reboot just creates the same problem as plugging and plugging monitors, but I didnât notice that much because of the time in between uses. I also suspect having a monitor plugged in when I boot or plugged in after the boot makes a difference.
I will do the plugging and unplugging while running your ruby script and post the results (I hope it changes again this time).
Ok, I had three monitors⌠unplugged each of the 2 external ones and used the command⌠no change in IDâs. So the display IDâs do not change because of the unplugging:
2 monitors, 1st unplugged, 2nd unplugged (1st plugged again), all again:
irb(main):022:0* TotalSpaces2.display_list
=> [{:display_id=>69732482, :display_name=>âColor LCDâ, :width=>1920, :height=>1200}, {:display_id=>188840115, :display_name=>âSyncMasterâ, :width=>1920, :height=>1080}, {:display_id=>188765692, :display_name=>âSyncMasterâ, :width=>1280, :height=>1024}]
irb(main):023:0> TotalSpaces2.display_list
=> [{:display_id=>69732482, :display_name=>âColor LCDâ, :width=>1920, :height=>1200}, {:display_id=>188765692, :display_name=>âSyncMasterâ, :width=>1280, :height=>1024}]
irb(main):024:0> TotalSpaces2.display_list
=> [{:display_id=>69732482, :display_name=>âColor LCDâ, :width=>1920, :height=>1200}, {:display_id=>188840115, :display_name=>âSyncMasterâ, :width=>1920, :height=>1080}]
irb(main):025:0> TotalSpaces2.display_list
=> [{:display_id=>69732482, :display_name=>âColor LCDâ, :width=>1920, :height=>1200}, {:display_id=>188840115, :display_name=>âSyncMasterâ, :width=>1920, :height=>1080}, {:display_id=>188765692, :display_name=>âSyncMasterâ, :width=>1280, :height=>1024}]
Can I test anything else for you?