Looks like the last few outputs of the log show the config being 
successfully used and number of monitors being detected as 3. Could you 
elaborate on what the actual issue is?

Note that for my version of `python-xlib`, I had to use item access rather 
than attribute access to get the `get_num_monitors` function to work 
correctly, but that appears to not be an issue for you. For documentation's 
sake, here's that function:

def get_num_monitors():
    num_monitors = 0
    try:
        display = xdisplay.Display()
        screen = display.screen()
        resources = screen.root.xrandr_get_screen_resources()._data

        for output in resources['outputs']:
            monitor = display.xrandr_get_output_info(output, 
resources['config_timestamp'])._data
            preferred = False
            if "preferred" in monitor.keys():
                preferred = monitor['preferred']
            elif "num_preferred" in monitor.keys():
                preferred = monitor['num_preferred']
            if preferred:
                num_monitors += 1
    except Exception:
        # always setup at least one monitor                                
                      
        return 1
    else:
        return num_monitors


On Monday, May 17, 2021 at 2:18:33 AM UTC-6 [email protected] wrote:

> I have a laptop with docking stations, that's sometimes connected to 2 
> extra 16:9 1080p monitors and other times used alone or with a single 1444p 
> 21:9 monitor.
> So I need a dynamic screen setup. For some reason I cannot get it working 
> though.
> I tried to use the code from the wiki(
> https://github.com/qtile/qtile/wiki/screens#setup-multiple-screens-dynamically),
>  
> but no success. Here's my config: 
> https://github.com/Mithrandir2k18/dotfiles/blob/master/qtile/config.py
>
> And here's my error output:
>
> https://pastebin.com/uBTYhS5S
>
> Hope you guys can help me :)
> Thanks for any help in advance!
>

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qtile-dev/bc4f7c6f-059b-43c3-b779-76c32cd3e08cn%40googlegroups.com.

Reply via email to