Update monitor setup and switching

This commit is contained in:
LordMathis
2019-02-05 20:31:53 +01:00
parent d097818be3
commit 4fc2bcab0a
5 changed files with 51 additions and 15 deletions

View File

@@ -28,6 +28,8 @@ height = 27
radius = 3.0
fixed-center = true
monitor = ${env:MONITOR:}
background = ${colors.background}
foreground = ${colors.foreground}
@@ -37,10 +39,10 @@ line-color = #f00
border-size = 0
border-color = #00000000
padding-left = 0
padding-left = 2
padding-right = 2
module-margin-left = 1
module-margin-left = 2
module-margin-right = 2
font-0 = Icons:size=10;1
@@ -49,10 +51,10 @@ font-2 = Weather Icons:size=10;1
modules-left = i3
modules-center = datetime openweathermap
modules-right = system-usb-udev updates pulseaudio-tail wlan eth xkeyboard battery powermenu
modules-right = system-usb-udev updates pulseaudio-tail wlan eth xkeyboard battery
tray-detached = false
tray-position = left
tray-position = right
scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev

View File

@@ -7,4 +7,14 @@ killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch polybar
polybar default &
intern=eDP-1
extern=HDMI-1
if xrandr | grep "$extern disconnected"; then
m=$intern
else
m=$extern
fi
MONITOR=$m polybar default &