New way of handling screens

Still not handled in workspace affectation though.
This commit is contained in:
Geoffrey Frogeye 2017-07-06 21:53:33 +02:00
parent b3ae2e9a96
commit 694e8bffe3
8 changed files with 93 additions and 91 deletions

View file

@ -31,14 +31,10 @@ whiteF = #cfd0c2
background = ${theme.blackB}
foreground = ${theme.foreground}
[bar/example]
;separator = |
monitor = ${env:MONITOR:LVDS1}
[bar/base]
monitor = ${env:display:LVDS1}
width = 100%
height = 20
;offset-x = 1%
;offset-y = 1%
;radius = 6.0
fixed-center = false
background = ${colors.background}
@ -60,12 +56,6 @@ font-1 = "DejaVu Sans:size=10;0"
font-2 = "DejaVu Sans Mono for Powerline:pixelsize=10;0"
modules-left = i3
modules-center = mpd
modules-right = cpu memory temperature eth wlan filesystem xbacklight volume battery date
tray-position = right
tray-padding = 2
tray-transparent = false
;wm-restack = bspwm
wm-restack = i3
@ -82,6 +72,21 @@ bottom = true
enable-ipc = true
[bar/primary]
inherit = bar/base
modules-right = cpu memory temperature eth wlan xbacklight volume battery date
tray-position = right
tray-padding = 2
tray-transparent = false
[bar/secondary]
inherit = bar/base
modules-center = mpd
modules-right = ethMore wlanMore filesystem xbacklight volume date
[module/filesystem]
type = internal/fs
interval = 25
@ -148,7 +153,7 @@ format-paused = ${self.format-online}
format-stopped = <toggle>
label-song =  %title% - %artist%
label-song-maxlen = 25
label-song-maxlen = 35
label-song-ellipsis = true
label-time = %elapsed%/%total%
@ -172,7 +177,7 @@ toggle-off-foreground = #55
[module/xbacklight]
type = internal/xbacklight
output = LVDS1
output = ${env:display:LVDS1}
enable-scroll = true
format = <ramp>
ramp-0 = 🌕
@ -213,19 +218,21 @@ interface = eth0
interval = 1
format-connected =  <label-connected>
;label-connected = %local_ip% (↑%upspeed% ↓%downspeed%)
label-connected = %local_ip%
format-connected-foreground = ${theme.blueF}
format-disconnected =
[module/ethMore]
inherit = module/eth
label-connected = ↑%upspeed% ↓%downspeed%
[module/wlan]
type = internal/network
interface = wlan0
interval = 1
format-connected = <ramp-signal> <label-connected>
;label-connected = %local_ip% %essid% (↑%upspeed% ↓%downspeed%)
label-connected = %local_ip% %essid%
format-connected-foreground = ${theme.cyanF}
@ -244,15 +251,16 @@ animation-packetloss-0 = 
animation-packetloss-1 = 
animation-packetloss-framerate = 500
[module/wlanMore]
inherit = module/wlan
label-connected = ↑%upspeed% ↓%downspeed%
[module/date]
type = internal/date
interval = 1
date =
date-alt = " %d/%m/%Y"
time =  %H:%M
time-alt =  %H:%M:%S
date = " %d/%m/%Y"
time =  %H:%M:%S
format = <label>
format-foreground = ${theme.cyanF}
@ -304,7 +312,7 @@ ramp-capacity-4 = 
[module/temperature]
type = internal/temperature
thermal-zone = 2
warn-temperature = 60
warn-temperature = 70
format = <ramp> <label>
format-foreground = ${theme.yellowB}

View file

@ -7,9 +7,17 @@ killall -q polybar
while pgrep -x polybar >/dev/null; do sleep 1; done
# Launch bar for each display
primary=$(xrandr | grep primary | head -1 | cut -d' ' -f1)
polybar -m | cut -d':' -f1 | while read display
do
MONITOR=$display polybar example &
export display=$display
if [ "$display" == "$primary" ]
then
bar="primary"
else
bar="secondary"
fi
polybar $bar &
done
echo "Bars launched..."