From c71c874ce1a7718bc0523c704e83069cd1298f93 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Sun, 26 Sep 2021 22:05:02 -0400 Subject: [PATCH] feat(qtile): dynamically adjust monitor count --- users/infinidoge/config/qtile.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/users/infinidoge/config/qtile.py b/users/infinidoge/config/qtile.py index ad54081..eef9186 100644 --- a/users/infinidoge/config/qtile.py +++ b/users/infinidoge/config/qtile.py @@ -548,20 +548,17 @@ def init_widget_list(main=True): screens = [ Screen( - bottom=bar.Bar(init_widget_list(main=True), size=20, opacity=1.0), # width + bottom=bar.Bar(init_widget_list(main=(i == 0)), size=20, opacity=1.0), # width wallpaper="~/Pictures/BotanBackground.jpg", wallpaper_mode="fill", - ), - Screen( - bottom=bar.Bar(init_widget_list(main=False), size=20, opacity=1.0), # width - wallpaper="~/Pictures/BotanBackground.jpg", - wallpaper_mode="fill", - ), - Screen( - bottom=bar.Bar(init_widget_list(main=False), size=20, opacity=1.0), # width - wallpaper="~/Pictures/BotanBackground.jpg", - wallpaper_mode="fill", - ), + ) + for i in range( + int( + os.popen( + "xrandr --listmonitors | grep 'Monitors:' | awk {'print $2'}" + ).read() + ) + ) ] # Drag floating layouts.