aboutsummaryrefslogtreecommitdiff
path: root/.config/qtile/screens.py
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2023-08-22 19:46:15 +0100
committerJustine Smithies <justine@smithies.me.uk>2023-08-22 19:46:15 +0100
commit6aaea9cf4b283d41016e60735f52c8feb3cd0c9e (patch)
treeffc170bb7f267247b60908ac9125fcc02175afd9 /.config/qtile/screens.py
parent86c0c3694c93025dfec23f27266905c12f446a4e (diff)
Initial commit
Diffstat (limited to '.config/qtile/screens.py')
-rw-r--r--.config/qtile/screens.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/.config/qtile/screens.py b/.config/qtile/screens.py
new file mode 100644
index 0000000..7921302
--- /dev/null
+++ b/.config/qtile/screens.py
@@ -0,0 +1,24 @@
+# Justine Smithies
+# https://github.com/justinesmithies/qtile-wayland-dotfiles
+
+# Multimonitor support
+
+from libqtile import qtile
+from libqtile.config import Screen
+from libqtile import bar
+from libqtile.log_utils import logger
+from widgets import primary_widgets, secondary_widgets
+
+
+def status_bar(widgets):
+ return bar.Bar(widgets, 20, background="#000000AA", margin=[10, 10, 0, 10]) # Margin = N E S W
+
+
+screens = [Screen(wallpaper='.cache/wallpaper', wallpaper_mode='fill', top=status_bar(primary_widgets))]
+
+connected_monitors = len(qtile.core.outputs)
+logger.warning(f"Found {connected_monitors} monitor(s)")
+
+if connected_monitors > 1:
+ for _ in range(1, connected_monitors):
+ screens.append(Screen(wallpaper='.cache/wallpaper', wallpaper_mode='fill', top=status_bar(secondary_widgets)))