;=====================================================
;
;   To learn more about how to configure Polybar
;   go to https://github.com/jaagr/polybar
;
;   The README contains alot of information
;
;=====================================================

[colors]
background = #222
foreground = #AAAAAA
primary = #4c94af
ok = #4E9A06
warning = #E07C00
alert = #DD1111

[bar/internal]
monitor = eDP-1
monitor-strict = true
font-0 = notosans:size=10;0
font-1 = FontAwesome;0

width = 100%
height = 27
offset-x = 0%
offset-y = 0%
radius = 0
fixed-center = false

background = ${colors.background}
foreground = ${colors.foreground}

line-size = 3
line-color = #f00

border-size = 0
border-color = #00000000

padding-left = 0
padding-right = 0

module-margin-left = 3
module-margin-right = 3

modules-left = i3
modules-center =
modules-right = cpu memory temperature vpnaboutyou radio wlan eth battery0 battery1 pavolume xbacklight date

tray-position = right
tray-padding = 3
tray-maxsize = 0

override-redirect = false
wm-restack = i3

[bar/external]
inherit = bar/internal
monitor = DP-1-2
modules-right = cpu memory temperature vpnaboutyou radio wlan eth eth-c pavolume date

[bar/hdmi]
inherit = bar/external
monitor = HDMI-2
monitor-strict = true
modules-right = cpu memory temperature vpnaboutyou radio wlan eth eth-c pavolume date

[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%

[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false

; Only show workspaces on the same output as the bar
pin-workspaces = true

label-mode-padding = 3
label-mode-foreground = #000
label-mode-background = ${colors.foreground}

; focused = Active workspace on focused monitor9f78e1
label-focused = %icon%
label-focused-foreground = ${colors.ok}
label-focused-background = ${colors.background}
label-focused-underline = ${colors.primary}
label-focused-padding = 3

; unfocused = Inactive workspace on any monitor
label-unfocused = %icon%
label-unfocused-padding = 3

; visible = Active workspace on unfocused monitor
label-visible = %icon%
label-visible-background = ${colors.background}
label-visible-underline = ${colors.foreground}
label-visible-padding = ${colors.background}

; urgent = Workspace with urgency hint set
label-urgent = %icon%
label-urgent-background = ${colors.background}
label-urgent-underline = ${colors.alert}
label-urgent-padding = 3

ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-8 = 9;


[module/xbacklight]
type = internal/xbacklight

format = <label>  <bar>
label = 

bar-width = 10
bar-indicator = |
bar-indicator-foreground = #ff
bar-indicator-font = 1
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = ${colors.primary}
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground}

[module/wlan]
type = internal/network
interface = wlp58s0
interval = 5.0

;format-connected = <ramp-signal> <label-connected>

format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.ok}
format-connected = <label-connected>
label-connected = %essid%

format-disconnected-prefix = " "
format-disconnected-prefix-foreground = ${colors.warning}
format-disconnected = 

ramp-signal-0 = 0
ramp-signal-1 = 1
ramp-signal-2 = 2
ramp-signal-3 = 3
ramp-signal-4 = 4
ramp-signal-foreground = ${colors.hidden}

[module/eth]
type = internal/network
interface = enp0s31f6
interval = 5.0

format-connected-underline = ${colors.background}
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.ok}
format-connected = <label-connected>
label-connected = %local_ip%

#format-disconnected-prefix = " "
#format-disconnected-prefix-foreground = ${colors.warning}
#format-disconnected = 

[module/eth-c]
type = internal/network
interface = enp57s0u1u2
interval = 5.0

format-connected-underline = ${colors.background}
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.ok}
format-connected = <label-connected>
label-connected = %local_ip%

#format-disconnected-prefix = " "
#format-disconnected-prefix-foreground = ${colors.warning}
#format-disconnected = 

[module/date]
type = custom/script
interval = 1

exec = ~/.config/polybar/date.sh

label = "%output%"
label-foreground = ${colors.foreground}

format = "  <label>  "
format-foreground = ${colors.primary}

[module/battery0]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 99

format-charging-prefix = " "
format-charging-prefix-foreground = ${colors.primary}
format-charging = <label-charging>

format-discharging = <ramp-capacity> <label-discharging>

format-full-prefix = " "
format-full-prefix-foreground = ${colors.ok}
format-full = <label-full>

ramp-capacity-0 = 
ramp-capacity-0-foreground = ${colors.alert}
ramp-capacity-1 = 
ramp-capacity-1-foreground = ${colors.warning}
ramp-capacity-2 = 
ramp-capacity-2-foreground = ${colors.primary}
ramp-capacity-3 = 
ramp-capacity-3-foreground = ${colors.primary}
ramp-capacity-4 = 
ramp-capacity-4-foreground = ${colors.ok}

time-format = %H:%M
label-discharging = %percentage%% %time%

[module/battery1]
type = internal/battery
battery = BAT1
adapter = AC
full-at = 99

format-charging-prefix = " "
format-charging-prefix-foreground = ${colors.primary}
format-charging = <label-charging>

format-discharging = <ramp-capacity> <label-discharging>

format-full-prefix = " "
format-full-prefix-foreground = ${colors.ok}
format-full = <label-full>

ramp-capacity-0 = 
ramp-capacity-0-foreground = ${colors.alert}
ramp-capacity-1 = 
ramp-capacity-1-foreground = ${colors.warning}
ramp-capacity-2 = 
ramp-capacity-2-foreground = ${colors.primary}
ramp-capacity-3 = 
ramp-capacity-3-foreground = ${colors.primary}
ramp-capacity-4 = 
ramp-capacity-4-foreground = ${colors.ok}

time-format = %H:%M
label-discharging = %percentage%% %time%

[module/temperature]
type = internal/temperature
interval = 2
thermal-zone = 0
warn-temperature = 60

format-prefix = " "
format-prefix-foreground = ${colors.ok}
format = <label>

format-warn-prefix = " "
format-warn-prefix-foreground = ${colors.warning}
format-warn = <label-warn>

label = %temperature-c%
label-warn = %temperature-c%

[module/cpu]
type = internal/cpu
interval = 2

format-prefix = "  "
format-prefix-foreground = ${colors.primary}
format = <label>

; Available tokens:
;   %percentage% (default) - total cpu load
;   %percentage-cores% - load percentage for each core
;   %percentage-core[1-9]% - load percentage for specific core
label = %percentage%%

[module/memory]
type = internal/memory

; Available tags:
;   <label> (default)
;   <bar-used>
;   <bar-free>
format-prefix = " "
format-prefix-foreground = ${colors.primary}
format = <label>

; Available tokens:
;   %percentage_used% (default)
;   %percentage_free%
;   %gb_used%
;   %gb_free%
;   %gb_total%
;   %mb_used%
;   %mb_free%
;   %mb_total%
label = %gb_used%/%gb_total%

[module/pavolume]
type = custom/script
interval = 1
label = %output%
exec = ~/.config/polybar/pavolume.sh
click-right = exec pavucontrol
click-left = ~/.config/polybar/pavolume.sh --togmute
scroll-up = ~/.config/polybar/pavolume.sh --up
scroll-down = ~/.config/polybar/pavolume.sh --down

[module/vpnaboutyou]
type = custom/script
exec = ~/.config/polybar/vpncheck.sh
interval = 5
label = %output%
format = <label>

[module/radio]
type = custom/script
exec = ~/.config/polybar/modem.sh
interval = 5
label = %output%
format = <label>

[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over

[global/wm]
margin-top = 5
margin-bottom = 5

; vim:ft=dosini
