Maybe you could try to create a @hook.subscribe.screen_change, so it notices it when you unplug your monitor, and define a function that pops out the last screen, since it's a list: screens.pop(-1).
Em quinta-feira, 13 de agosto de 2020 às 01:21:57 UTC-3, [email protected] escreveu: > I am currently using a laptop so I hotplug an external monitor often. > > This is how I currently do it in the config.py > > from screeninfo import get_monitors > > screens = [ > Screen(top=bar.Bar(get_widgets(), 24) for _ in > range(len(get_monitors())) > ] > > > > I problem is when i currently have one external monitor (ie 2 with my > laptop screen), 2 qtile screens are shown. > When I unplug the external monitor, qtile still has 2 screens when I do a > lazy.restart(), even when get_monitors() returns 1 not 2. > > Is there a way to remove the existing screens are recreate them? > > Thanks > -- 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/9a6b9b5c-4feb-4c3b-adab-616fdf635d63n%40googlegroups.com.
