;===============================================================================
;             _       _                                   __ _
; _ __   ___ | |_   _| |__   __ _ _ __    ___ ___  _ __  / _(_) __ _
;| '_ \ / _ \| | | | | '_ \ / _` | '__|  / __/ _ \| '_ \| |_| |/ _` |
;| |_) | (_) | | |_| | |_) | (_| | |    | (_| (_) | | | |  _| | (_| |
;| .__/ \___/|_|\__, |_.__/ \__,_|_|     \___\___/|_| |_|_| |_|\__, |
;|_|            |___/                                          |___/
;===============================================================================
;
;   To learn more about how to configure Polybar
;   go to https://github.com/jaagr/polybar
;
;   The README contains alot of information
;	  Themes : https://github.com/jaagr/dots/tree/master/.local/etc/themer/themes
;   https://github.com/jaagr/polybar/wiki/
;   https://github.com/jaagr/polybar/wiki/Configuration
;   https://github.com/jaagr/polybar/wiki/Formatting
;
;===============================================================================

[global/wm]
;https://github.com/jaagr/polybar/wiki/Configuration#global-wm-settings
margin-top = 0
margin-bottom = 0

[settings]
;https://github.com/jaagr/polybar/wiki/Configuration#application-settings
throttle-output = 5
throttle-output-for = 10
throttle-input-for = 30
screenchange-reload = true
compositing-background = over
compositing-foreground = over
compositing-overline = over
compositing-underline = over
compositing-border = over

; Define fallback values used by all module formats
format-foreground = #CCCCCC
format-background = #0d0d0d
format-underline =
format-overline =
format-spacing =
format-padding =
format-margin =
format-offset =
;format-transparent = #00000000 #182127 #CCCCCC
pseudo-transparency = false

[colors]
; Nord theme ============
background = #0d0d0d
foreground = #CCCCCC
alert = #EA142E
volume-min = #a3be8c
volume-med = #ebcb8b
volume-max = #bf616a
; =======================

; Gotham theme ==========
; background = #0a0f14
; foreground = #99d1ce
; alert = #d26937
; volume-min = #2aa889
; volume-med = #edb443
; volume-max = #c23127
; =======================

; INTRCPTR theme ============
;background = ${xrdb:color0:#222}
;background = #aa000000
;background-alt = #444
;foreground = ${xrdb:color7:#222}
;foreground = #fff
;foreground-alt = #555
;primary = #ffb52a
;secondary = #e60053
;alert = #bd2c40




################################################################################
################################################################################
############                    MAINBAR-eDP1                        ############
################################################################################
################################################################################

[bar/mainbar-eDP1]
; = ${env:MONITOR:fallback-value}
monitor = eDP1
monitor-strict = false
tray-position = ${env:TRAY_POSITION:right}
;dpi = 100
width = 100%
height = 14
;offset-x = 1%
;offset-y = 1%
radius-top = 0.0
radius-bottom = 0.0
fixed-center = true
bottom = false
separator = ❱

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

override-redirect = true

; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true

border-size = 1
;border-left-size = 0
;border-right-size = 25
;border-top-size = 0
;border-bottom-size = 25
border-color = ${colors.background}

padding-left = 0
padding-right = 0

module-margin-left = 1
module-margin-right = 1

;https://github.com/jaagr/polybar/wiki/Fonts
font-0 = "Hack Nerd Font:style=Bold:size=8:antialias=true:autohint=true:hinting=true;2"
font-1 = "NotoColorEmoji:scale=13:antialias=true:autohint=true;2"
font-2 = "JoyPixels:scale=13:antialias=true:autohint=true;2"

modules-left = arch checkupdates auracle cpu2 memory2 wired-network networkspeeddown networkspeedup weather
modules-center =
modules-right =

tray-detached = false
;tray-offset-x = 0
;tray-offset-y = -752
tray-padding = 6
tray-maxsize = 14;2
tray-scale = 1.0
tray-background = ${colors.background}

; Locale used to localize various module data (e.g. date)
; Expects a valid libc locale, for example: sv_SE.UTF-8
locale = pl_PL.UTF-8


################################################################################
################################################################################
############                      MAINBAR-DP1                       ############
################################################################################
################################################################################

[bar/mainbar-DP1]
; = ${env:MONITOR:fallback-value}
monitor = DP1
monitor-strict = false
;dpi = 100
width = 100%
height = 14
;offset-x = 1%
;offset-y = 1%
radius-top = 0.0
radius-bottom = 0.0
fixed-center = true
bottom = false
separator = ❱

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

override-redirect = true

; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true

border-size = 0
;border-left-size = 0
;border-right-size = 25
;border-top-size = 0
;border-bottom-size = 25
border-color = ${colors.background}

padding-left = 0
padding-right = 0

module-margin-left = 1
module-margin-right = 1

;https://github.com/jaagr/polybar/wiki/Fonts
font-0 = "Hack Nerd Font:style=Bold:size=8:antialias=true:autohint=true:hinting=true;2"
font-1 = "NotoColorEmoji:scale=13:antialias=true:autohint=true;2"
font-2 = "JoyPixels:scale=13:antialias=true:autohint=true;2"

modules-left = arch checkupdates auracle cpu2 memory2 wired-network networkspeeddown networkspeedup weather
modules-center =
modules-right =

; Locale used to localize various module data (e.g. date)
; Expects a valid libc locale, for example: sv_SE.UTF-8
locale = pl_PL.UTF-8


################################################################################
################################################################################
############                       MODULES A-Z                      ############
################################################################################
################################################################################

[module/arch]
type = custom/text
content = %{T2}  %{T-}
click-left = rofi -show run -location 2 -yoffset 34
click-right = rofi -show window -location 2 -yoffset 34
content-foreground  = ${colors.foreground}
content-background = ${colors.background}

################################################################################

[module/checkupdates]
type = custom/script
exec = cat /tmp/pak-checkupdates | wc -l
;exec-if = ls /tmp/checkupdates
interval = 5

format = PAK <label>
format-background = ${colors.background}
format-foreground = ${colors.foreground}
;format-padding = 4
;format-underline = #268bd2
;format-prefix = "⡇  "
;format-prefix = " "
format-prefix-foreground = ${colors.foreground}
format-prefix-font = 2

;label = %output:0:15:...%
label = %output:2%
label-maxlen = 6

;click-left = notify-send -t 5000 "Dostępne z repozytoriów:" "$(cat /tmp/checkupdates)"
click-left = dunstify -u normal -t 5000 -r 102938  "Dostępne z repo:" "$(cat /tmp/pak-checkupdates)"

################################################################################

[module/auracle]
type = custom/script
exec = cat /tmp/pak-aurupdates | wc -l
;exec-if = ls /tmp/aurupdates
interval = 5

format = AUR <label>
format-background = ${colors.background}
format-foreground = ${colors.foreground}
;format-padding = 4
;format-underline = #268bd2
;format-prefix = " "
;format-prefix = " "
format-prefix-foreground = ${colors.foreground}

;label = %output:0:15:...%
label = %output:2%
label-maxlen = 6

;click-left = notify-send -t 5000 "Dostępne z AUR:" "$(cat /tmp/aurupdates)"
click-left = dunstify -u normal -t 5000 -r 102939 "Dostępne z AUR:" "$(cat /tmp/pak-aurupdates)"

################################################################################

[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-prefix-foreground = #7D49B6
format-prefix-underline = ${colors.underline}
format-underline = ${colors.foreground}

################################################################################

[module/backlight]
;https://github.com/jaagr/polybar/wiki/Module:-backlight

type = internal/backlight

; Use the following command to list available cards:
; $ ls -1 /sys/class/backlight/
card = intel_backlight

; Available tags:
;   <label> (default)
;   <ramp>
;   <bar>
format = <label>
format-foreground = ${colors.foreground}
format-background = ${colors.background}

; Available tokens:
;   %percentage% (default)
label = %percentage%%

; Only applies if <ramp> is used
ramp-0 = 🌕
ramp-1 = 🌔
ramp-2 = 🌓
ramp-3 = 🌒
ramp-4 = 🌑

; Only applies if <bar> is used
bar-width = 10
bar-indicator = |
bar-fill = ─
bar-empty = ─

################################################################################

[module/battery]
;https://github.com/jaagr/polybar/wiki/Module:-battery
type = internal/battery
battery = BAT1
adapter = ACAD
full-at = 100

format-charging = <animation-charging> <label-charging>
label-charging =  %percentage%%
format-charging-foreground = ${colors.foreground}
format-charging-background = ${colors.background}
format-charging-underline = ${colors.underline}

format-discharging = <ramp-capacity> <label-discharging>
label-discharging =  %percentage%%
format-discharging-underline = ${colors.underline}
format-discharging-foreground = ${colors.foreground}
format-discharging-background = ${colors.background}

format-full-prefix = " "
format-full-prefix-foreground = #a3c725
format-full-underline = ${colors.underline}
format-foreground = ${colors.foreground}
format-background = ${colors.background}

ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-foreground = #c7ae25

animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-foreground = #a3c725
animation-charging-framerate = 750

################################################################################

[module/cpu1]
;https://github.com/jaagr/polybar/wiki/Module:-cpu
type = internal/cpu
; Seconds to sleep between updates
; Default: 1
interval = 1
format-foreground = ${colors.foreground}
format-background = ${colors.background}
;   
format-prefix = " "
format-prefix-foreground = #cd1f3f
format-underline = ${colors.underline}

; Available tags:
;   <label> (default)
;   <bar-load>
;   <ramp-load>
;   <ramp-coreload>
format = <label> <ramp-coreload>

format-padding = 2

; Available tokens:
;   %percentage% (default) - total cpu load
;   %percentage-cores% - load percentage for each core
;   %percentage-core[1-9]% - load percentage for specific core
label-font = 3
label = Cpu %percentage:3%%
ramp-coreload-0 = ▁
ramp-coreload-0-font = 2
ramp-coreload-0-foreground = #aaff77
ramp-coreload-1 = ▂
ramp-coreload-1-font = 2
ramp-coreload-1-foreground = #aaff77
ramp-coreload-2 = ▃
ramp-coreload-2-font = 2
ramp-coreload-2-foreground = #aaff77
ramp-coreload-3 = ▄
ramp-coreload-3-font = 2
ramp-coreload-3-foreground = #aaff77
ramp-coreload-4 = ▅
ramp-coreload-4-font = 2
ramp-coreload-4-foreground = #fba922
ramp-coreload-5 = ▆
ramp-coreload-5-font = 2
ramp-coreload-5-foreground = #fba922
ramp-coreload-6 = ▇
ramp-coreload-6-font = 2
ramp-coreload-6-foreground = #ff5555
ramp-coreload-7 = █
ramp-coreload-7-font = 2
ramp-coreload-7-foreground = #ff5555

################################################################################

[module/cpu2]
;https://github.com/jaagr/polybar/wiki/Module:-cpu
type = internal/cpu
; Seconds to sleep between updates
; Default: 1
interval = 1
format-foreground = ${colors.foreground}
format-background = ${colors.background}
;format-prefix = " "
format-prefix-foreground = ${colors.foreground}
;format-underline = ${colors.underline}

label-font = 1

; Available tags:
;   <label> (default)
;   <bar-load>
;   <ramp-load>
;   <ramp-coreload>
format = <label>

;format-padding = 1

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

################################################################################

[module/date]
;https://github.com/jaagr/polybar/wiki/Module:-date
type = internal/date
; Seconds to sleep between updates
interval = 1
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
; NOTE: if you want to use syntax tags here you need to use %%{...}
date = "%d.%m.%Y"
;date-alt = " %d-%m-%Y"
;time =⡇  %H%M ⡇
time =| %H%M
;time-alt = %k:%M:%S
;format-prefix = " "
format-prefix-foreground = ${colors.foreground}
;format-underline = ${colors.underline}
format-foreground = ${colors.foreground}
format-background = ${colors.background}
label = %date% %time%

#################################################################

[module/ewmh]
type = internal/xworkspaces

; Only show workspaces defined on the same output as the bar
;
; Useful if you want to show monitor specific workspaces
; on different bars
;
; Default: false
pin-workspaces = false

; Create click handler used to focus desktop
; Default: true
enable-click = true

; Create scroll handlers used to cycle desktops
; Default: true
enable-scroll = true

icon-0 = 1;
icon-1 = 2;
icon-2 = 3;
icon-3 = 4;
icon-4 = 5;
#icon-5 = 6;
format = <label-state>
label-monitor = %name%

label-active = %name%
label-active-foreground = ${colors.foreground}
label-active-background = #3B78C2
label-active-padding = 2

label-occupied = %name%
label-occupied-foreground = ${colors.foreground}
label-occupied-background = #3B78C2
label-occupied-underline = ${colors.underline}
label-occupied-padding = 2

label-urgent = %name%
label-urgent-foreground = ${colors.foreground}
label-urgent-background = ${colors.alert}
label-urgent-underline = ${colors.alert}
label-urgent-padding = 2


label-empty = %name%
label-empty-foreground = #55
label-empty-padding = 2
format-foreground = ${colors.foreground}
format-background = ${colors.background}


################################################################################

[module/filesystem]
;https://github.com/jaagr/polybar/wiki/Module:-filesystem
type = internal/fs

; Mountpoints to display
mount-0 = /
;mount-1 = /home
;mount-2 = /var

; Seconds to sleep between updates
; Default: 30
interval = 30

; Display fixed precision values
; Default: false
fixed-values = false

; Spacing between entries
; Default: 2
spacing = 4

; Available tags:
;   <label-mounted> (default)
;   <bar-free>
;   <bar-used>
;   <ramp-capacity>
format-mounted = <label-mounted>
format-mounted-foreground = ${colors.foreground}
format-mounted-background = ${colors.background}
format-mounted-underline = #fe0000


; Available tokens:
;   %mountpoint%
;   %type%
;   %fsname%
;   %percentage_free%
;   %percentage_used%
;   %total%
;   %free%
;   %used%
; Default: %mountpoint% %percentage_free%%
label-mounted = %mountpoint% : %used% used of %total%

; Available tokens:
;   %mountpoint%
; Default: %mountpoint% is not mounted
label-unmounted = %mountpoint% not mounted
format-unmounted-foreground = ${colors.foreground}
format-unmounted-background = ${colors.background}
;format-unmounted-underline = ${colors.alert}

################################################################################

[module/kernel]
type = custom/script
exec = uname -r
tail = false
interval = 1024

format-foreground = ${colors.foreground}
format-background = ${colors.background}
;format-prefix = " "
format-prefix-foreground = ${colors.foreground}
format-underline = ${colors.underline}

################################################################################

[module/jgmenu]
type = custom/script
interval = 120
exec = echo "ArchLinux"
click-left = "jgmenu_run >/dev/null 2>&1 &"
format-foreground = ${colors.foreground}
format-background = ${colors.background}

################################################################################

[module/load-average]
type = custom/script
exec = uptime | grep -ohe 'load average[s:][: ].*' | awk '{ print $3" "$4" "$5"," }' | sed 's/,//g'
interval = 100

;HOW TO SET IT MINIMAL 10 CHARACTERS - HIDDEN BEHIND SYSTEM ICONS
;label = %output%
label = %output:10%

format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-prefix = " "
format-prefix-foreground = #62FF00
format-underline = ${colors.underline}

################################################################################

[module/memory1]
;https://github.com/jaagr/polybar/wiki/Module:-memory
type = internal/memory
interval = 1
; Available tokens:
;   %percentage_used% (default)
;   %percentage_free%
;   %gb_used%
;   %gb_free%
;   %gb_total%
;   %mb_used%
;   %mb_free%
;   %mb_total%
label = %percentage_used%%
bar-used-indicator =
bar-used-width = 10
bar-used-foreground-0 = #3384d0
bar-used-fill = 
bar-used-empty = 
bar-used-empty-foreground = #ffffff

format = <label> <bar-used>
format-prefix = " "
format-prefix-foreground = #3384d0
format-underline = ${colors.underline}
format-foreground = ${colors.foreground}
format-background = ${colors.background}

################################################################################

[module/memory2]
;https://github.com/jaagr/polybar/wiki/Module:-memory
type = internal/memory
interval = 1
; Available tokens:
;   %percentage_used% (default)
;   %percentage_free%
;   %gb_used%
;   %gb_free%
;   %gb_total%
;   %mb_used%
;   %mb_free%
;   %mb_total%
label = %percentage_used:3%%

format = MEM <label>
;format-prefix = " "
format-prefix-foreground = ${colors.foreground}
;format-underline = ${colors.underline}
format-foreground = ${colors.foreground}
format-background = ${colors.background}

################################################################################

[module/memory3]
;https://github.com/jaagr/polybar/wiki/Module:-memory
type = internal/memory
interval = 1
; Available tokens:
;   %percentage_used% (default)
;   %percentage_free%
;   %gb_used%
;   %gb_free%
;   %gb_total%
;   %mb_used%
;   %mb_free%
;   %mb_total%
label = %gb_used%/%gb_free%

format = Mem <label>
format-prefix = " "
format-prefix-foreground = #3384d0
format-underline = ${colors.underline}
format-foreground = ${colors.foreground}
format-background = ${colors.background}


################################################################################

[module/mpd]
;https://github.com/jaagr/polybar/wiki/Module:-mpd
type = internal/mpd
;format-online =  "<label-song>   <icon-prev>  <icon-stop>  <toggle>  <icon-next>"
format-online =  "<label-song>  <bar-progress>"
;format-online =  "<label-song>  <bar-progress> <icon-prev>  <icon-stop>  <toggle>  <icon-next>"
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 40
label-song-ellipsis = true
bar-progress-width = 10
bar-progress-indicator = 
bar-progress-fill = 
bar-progress-empty = 
bar-progress-fill-foreground = #ff0
bar-progress-fill-background = ${colors.background}
bar-progress-indicator-foreground = ${colors.foreground}
format-online-foreground = ${colors.foreground}
format-online-background = ${colors.background}
################################################################################

[module/networkspeedup]
;https://github.com/jaagr/polybar/wiki/Module:-network
type = internal/network
;interface = wlp3s0
;interface = enp14s0
;interface = enp0s31f6
interface = enp1s0f1
label-connected = %upspeed:8%
;udspeed-minwidth = 5
format-connected = <label-connected>
;format-connected-prefix = ""
format-connected-prefix = "UP "
format-connected-prefix-foreground = ${colors.foreground}
format-connected-foreground = ${colors.foreground}
format-connected-background = ${colors.background}
;format-connected-underline = ${colors.underline}

################################################################################

[module/networkspeeddown]
;https://github.com/jaagr/polybar/wiki/Module:-network
type = internal/network
;interface = wlp3s0
;interface = enp14s0
;interface = enp0s31f6
interface = enp1s0f1
label-connected = %downspeed:9%
;udspeed-minwidth = 5
format-connected = <label-connected>
;format-connected-prefix = ""
format-connected-prefix = "DOWN "
format-connected-prefix-foreground = ${colors.foreground}
format-connected-foreground = ${colors.foreground}
format-connected-background = ${colors.background}
;format-connected-underline = ${colors.underline}

################################################################################

[module/pavolume]
type = custom/script
tail = true
label = %output%
exec = ~/.config/spectrwm/polybar/scripts/pavolume.sh --listen
click-right = exec pavucontrol-qt
click-left = ~/.config/spectrwm/polybar/scripts/pavolume.sh --togmute
scroll-up = ~/.config/spectrwm/polybar/scripts/pavolume.sh --up
scroll-down = ~/.config/spectrwm/polybar/scripts/pavolume.sh --down
format-underline = ${colors.underline}
format-foreground = ${colors.foreground}
format-background = ${colors.background}



################################################################################

[module/pub-ip]
;https://linuxconfig.org/polybar-a-better-wm-panel-for-your-linux-system
type = custom/script
exec = ~/.config/spectrwm/polybar/scripts/pub-ip.sh
interval = 3.0
format-foreground = ${colors.foreground}
format-background = ${colors.background}
;format-underline = ${colors.underline}
label = %output% ❱
;format-prefix = " "
format-prefix-foreground = ${colors.foreground}

################################################################################

[module/release]
type = custom/script
exec = (lsb_release -d | awk {'print $2'} ;echo " "; lsb_release -r | awk {'print $2'}) | tr -d '\n'
interval = 6000

format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-prefix = " "
format-prefix-foreground = #62FF00
format-underline = ${colors.underline}

################################################################################

[module/temperature1]
;https://github.com/jaagr/polybar/wiki/Module:-temperature
type = internal/temperature
; Thermal zone to use
; To list all the zone types, run
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
; Default: 0
thermal-zone = 0

; Full path of temperature sysfs path
; Use `sensors` to find preferred temperature source, then run
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
; to find path to desired file
; Default reverts to thermal zone setting
hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input

warn-temperature = 70 
format = <ramp> <label>
format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-underline = ${colors.underline}
format-warn = <ramp> <label-warn>
format-warn-underline = #c7254f
label = %temperature%
label-warn =  %temperature%
label-warn-foreground = #c7254f

ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 
ramp-foreground =${colors.foreground}

################################################################################

[module/temperature2]
type = custom/script
exec = ~/.config/spectrwm/polybar/scripts/tempcores.sh
interval = 2
format-padding = 1
format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-underline = ${colors.underline}
format-prefix-foreground = #C1B93E
label =  %output:0:150:%

################################################################################

[module/uptime]
;https://github.com/jaagr/polybar/wiki/User-contributed-modules#uptime
type = custom/script
exec = uptime | awk -F, '{sub(".*up ",x,$1);print $1}'
interval = 100
label = Uptime : %output%

format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-prefix = " "
format-prefix-foreground = #C15D3E
format-underline = ${colors.underline}

################################################################################

[module/volume]
;https://github.com/jaagr/polybar/wiki/Module:-volume
type = internal/volume
format-volume = "<label-volume>  <bar-volume>"

label-volume = " "
label-volume-foreground = #40ad4b
label-muted = muted

bar-volume-width = 10
bar-volume-foreground-0 = #40ad4b
bar-volume-foreground-1 = #40ad4b
bar-volume-foreground-2 = #40ad4b
bar-volume-foreground-3 = #40ad4b
bar-volume-foreground-4 = #40ad4b
bar-volume-foreground-5 = #40ad4b
bar-volume-foreground-6 = #40ad4b
bar-volume-gradient = false
bar-volume-indicator = 
bar-volume-indicator-font = 2
bar-volume-fill = 
bar-volume-fill-font = 2
bar-volume-empty = 
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground}
format-volume-foreground = ${colors.foreground}
format-volume-background = ${colors.background}
format-muted-prefix = " "
format-muted-prefix-foreground = "#ff0000"
format-muted-foreground = ${colors.foreground}
format-muted-background = ${colors.background}

################################################################################

[module/weather]
type = custom/script
format = <label>
label = %output%
interval = 600
exec = weather Łódź 4
click-left = xterm -title 'Pogoda' -geometry 125x42 +sb -hold -e weather Łódź 1 &
format-foreground = ${colors.foreground}

#################################################################################

[module/wired-network]
;https://github.com/jaagr/polybar/wiki/Module:-network
type = internal/network
interface = enp1s0f1
;interface = enp14s0
interval = 3.0

; Available tokens:
;   %ifname%    [wireless+wired]
;   %local_ip%  [wireless+wired]
;   %essid%     [wireless]
;   %signal%    [wireless]
;   %upspeed%   [wireless+wired]
;   %downspeed% [wireless+wired]
;   %linkspeed% [wired]
; Default: %ifname% %local_ip%
label-connected =  NET ON
label-disconnected = NET OFF

format-connected-foreground = ${colors.foreground}
format-connected-background = ${colors.background}
;format-connected-underline = ${colors.underline}
;format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground}
format-connected-prefix-background = ${colors.background}

format-disconnected = <label-disconnected>
;format-disconnected-underline = ${colors.underline}
label-disconnected-foreground = ${colors.foreground}

################################################################################

[module/wireless-network]
;https://github.com/jaagr/polybar/wiki/Module:-network
type = internal/network
interface = wlp3s0
interval = 3.0
label-connected = %essid%

format-connected = <label-connected>
;format-connected = <ramp-signal> <label-connected>
format-connected-foreground = ${colors.foreground}
format-connected-background = ${colors.background}
;format-connected-prefix = " "
format-connected-prefix-foreground = #7e52c6
format-connected-prefix-background = ${colors.background}
;format-connected-underline = ${colors.underline}

label-disconnected = %ifname% disconnected
label-disconnected-foreground = ${colors.alert}
label-disconnected-background = ${colors.background}

format-disconnected = <label-disconnected>
format-disconnected-foreground = ${colors.alert}
format-disconnected-background = ${colors.background}
format-disconnected-prefix = " "
format-disconnected-prefix-foreground = ${colors.alert}
format-disconnected-prefix-background = ${colors.background}
;format-disconnected-underline = ${colors.underline}

ramp-signal-0 = ▁
ramp-signal-1 = ▂
ramp-signal-2 = ▃
ramp-signal-3 = ▄
ramp-signal-4 = ▅
ramp-signal-5 = ▆
ramp-signal-6 = ▇
ramp-signal-7 = █
ramp-signal-foreground = #7e52c6
################################################################################

[module/vpn-wireguard-wg]
type = custom/script
exec = ~/.config/spectrwm/polybar/scripts/vpn-wireguard-wg.sh wg0
interval = 3.0
click-left = ~/.config/spectrwm/polybar/scripts/vpn-wireguard-wg.sh wg0 --toggle &
format-foreground = ${colors.foreground}

################################################################################

[module/vpn-openvpn-isrunning]
type = custom/script
exec = ~/.config/spectrwm/polybar/scripts/vpn-openvpn-isrunning.sh
interval = 5


################################################################################

[module/xbacklight]
;https://github.com/jaagr/polybar/wiki/Module:-xbacklight
type = internal/xbacklight
format = <label> <bar>
format-prefix = " "
format-prefix-foreground = ${colors.foreground}
format-prefix-background = ${colors.background}
format-prefix-underline = #9f78e1
format-underline = ${colors.underline}
label = %percentage%%
bar-width = 10
bar-indicator = 
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = 
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = 
bar-empty-font = 2
bar-empty-foreground = #fff
format-foreground = ${colors.foreground}
format-background = ${colors.background}

################################################################################

[module/xkeyboard]
;https://github.com/jaagr/polybar/wiki/Module:-xkeyboard
type = internal/xkeyboard
blacklist-0 = num lock

format-prefix = " "
format-prefix-foreground = ${colors.foreground}
format-prefix-background = ${colors.background}
format-prefix-underline = #3ecfb2
format-foreground = ${colors.foreground}
format-background = ${colors.background}

label-layout = %layout%
label-layout-underline = ${colors.underline}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.background}
label-indicator-underline = ${colors.foreground}

################################################################################

[module/xwindow]
;https://github.com/jaagr/polybar/wiki/Module:-xwindow
type = internal/xwindow

; Available tokens:
;   %title%
; Default: %title%
label = %title%
label-maxlen = 45

;format-prefix = " "
format-foreground = ${colors.foreground}
format-background = ${colors.background}

###############################################################################
