From 37895d397650c5a1a9b4b3dfb8801ff31f9bda72 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 26 Aug 2021 09:21:56 +0200 Subject: [PATCH] polybar: provides an example on how to split monitors --- bin/polybar | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/polybar b/bin/polybar index 54826f0..e86416b 100755 --- a/bin/polybar +++ b/bin/polybar @@ -3,6 +3,10 @@ export DPI=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p') export HEIGHT=$((18 * DPI / 96)) +# Example of setup: +# xrandr --setmonitor '*'DisplayPort-3-left 1920/444x1440/334+0+0 DisplayPort-3 +# xrandr --setmonitor DisplayPort-3-right 1520/352x1440/334+1920+0 none + MONITORS=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+*]*([^ ]*).*/\2/p' | tr '\n' ' ') PRIMARY=$(xrandr --current --listactivemonitors | sed -nE 's/ *([0-9]+): [+]?[*]([^ ]*).*/\2/p') NMONITORS=$(echo $MONITORS | wc -w)