foxed monitor for polybar
This commit is contained in:
parent
51b65a654a
commit
f822276f68
@ -22,9 +22,7 @@ alert = #bd2c40
|
|||||||
|
|
||||||
[bar/main]
|
[bar/main]
|
||||||
enable-ipc = true
|
enable-ipc = true
|
||||||
#monitor = ${env:MONITOR:LVDS-1}
|
monitor = ${env:MONITOR}
|
||||||
MONITOR=$(polybar -m|tail -1|sed -e 's/:.*$//g')
|
|
||||||
monitor-fallback = ${env:MONITOR:LVDS-1}
|
|
||||||
width = 100%
|
width = 100%
|
||||||
height = 25
|
height = 25
|
||||||
;offset-x = 1%
|
;offset-x = 1%
|
||||||
|
@ -7,7 +7,12 @@ killall -q polybar
|
|||||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||||
|
|
||||||
# Launch bar1 and bar2
|
# Launch bar1 and bar2
|
||||||
polybar main &
|
if type "xrandr"; then
|
||||||
|
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||||
|
MONITOR=$m polybar --reload main &
|
||||||
|
done
|
||||||
|
else
|
||||||
|
polybar --reload main &
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Bars launched..."
|
echo "Bars launched..."
|
||||||
|
Loading…
Reference in New Issue
Block a user