This is what I do (uses xlib module):

from Xlib import display


# Get resources from the display
d = display.Display()
s = d.screen()
r = s.root
res = r.xrandr_get_screen_resources()._data


# Count the number of screens
num_screens = 0
for output in res['outputs']:
    print("Output %d:" % (output))
    mon = d.xrandr_get_output_info(output, res['config_timestamp'])._data
    print("%s: %d" % (mon['name'], mon['num_preferred']))
    if mon['num_preferred']:
        num_screens += 1

# Generate bars/widgets for all the screens.
screens = []
for screen in range(0, num_screens):
    prompt = "{0}@{1}: ".format(os.environ["USER"], hostname)
    screens.append(
        Screen(
            top=bar.Bar(
                [add your bars/widgets here],
                bar_height,
            ),
        )
    )


There's probably a way to do with with xcb though.



On Saturday, December 14, 2019 at 7:31:05 PM UTC+1, J A wrote:
>
> Perhaps I am missing the documentation but I'm having issues wrapping my 
> head around how multiple screens are applied to the situation of multiple 
> monitors? Can anyone point me to a config or tutorial of some sort?
>
> Jerrad
>

-- 
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/d9e16c66-cc23-4645-bc56-195ec49cae93%40googlegroups.com.

Reply via email to