;==========================================================
;
;
;   ██████╗  ██████╗ ██╗  ██╗   ██╗██████╗  █████╗ ██████╗
;   ██╔══██╗██╔═══██╗██║  ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
;   ██████╔╝██║   ██║██║   ╚████╔╝ ██████╔╝███████║██████╔╝
;   ██╔═══╝ ██║   ██║██║    ╚██╔╝  ██╔══██╗██╔══██║██╔══██╗
;   ██║     ╚██████╔╝███████╗██║   ██████╔╝██║  ██║██║  ██║
;   ╚═╝      ╚═════╝ ╚══════╝╚═╝   ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝
;
;
;   To learn more about how to configure Polybar
;   go to https://github.com/polybar/polybar
;
;   The README contains a lot of information
;
;==========================================================

include-file = /etc/polybar/colors.ini
include-file = /etc/polybar/home.ini

[module/separator]
type = custom/text

format = <label>
format-padding = 6px

label = |

[module/arch]
type = custom/text

format = <label>

label = ""
label-font = 2
label-padding-right = 5px
label-foreground = ${colors.primary}

click-left = /usr/local/share/dotfiles/scripts/disconnect.sh

[module/systray]
type = internal/tray

format-margin = 0px
tray-spacing = 5px
tray-padding = 0px
tray-size = 90%

[module/i3]
type = internal/i3

pin-workspaces = true
show-urgent = true
enable-scroll = false

format = <label-state>

label-focused = %name%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 15px

label-unfocused = %name%
label-unfocused-background = ${colors.background-alt}
label-unfocused-padding = 15px

label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 15px

label-separator = " "
label-separator-padding = 0px
label-separator-foreground = #ffb52a

[module/filesystemprefix]
type = custom/text

format = <label>
fotmat-font = 1
format-foreground=${colors.primary}

label = " "
label-font = 2
label-padding-right = 10px

[module/filesystem]
type = internal/fs
interval = 25

mount-0 = /
label-mounted = %{F8caaee}%{F-}%percentage_used%%
label-mounted-font = 1

label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}

[module/pulseaudio]
type = internal/pulseaudio

format-volume = <label-volume>
format-volume-prefix = " "
format-volume-prefix-font = 3
format-volume-prefix-padding-right = 5px
format-volume-prefix-foreground = ${colors.primary}

label-volume = "%percentage%%"
label-volume-font = 1

label-muted = %{F#8caaee}󰝟%{F-} mute

[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock

label-layout = %layout%
label-layout-foreground = ${colors.primary}

label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.primary}

[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-font = 3
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%

[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-font = 2
format-prefix-padding-right = 8px
format-prefix-foreground = ${colors.primary}
label = %percentage%%

[module/eth]
type = internal/network
interface-type = wired
interval = 5
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-font = 2
format-connected-prefix-padding-right = 8px
format-connected-prefix-foreground = ${colors.primary}

label-connected = %ifname% %local_ip%

[module/ethspeed]
type = internal/network
interface-type = wired
interval = 5
format-connected = <label-connected>
format-connected-prefix = "󰾆 "
format-connected-prefix-font = 3
format-connected-prefix-padding-right = 5px
format-connected-prefix-foreground = ${colors.primary}
label-connected = %upspeed% %downspeed%

[module/pacman]
type = custom/script
exec = pacman -Syup | head -n -4 | wc -l
interval = 600

format = <label>
format-prefix = " "
format-prefix-font = 2
format-prefix-padding-right = 5px
format-prefix-foreground=${colors.primary}


[module/dateprefix]
type = custom/text

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

label = " "
label-font = 3
label-padding-right = 5px

click-left = /usr/local/share/dotfiles/scripts/calendar.sh

[module/date]
type = internal/date
interval = 1.0

date = %a %Y-%m-%d %H:%M
date-alt = %H:%M:%S

format = <label>

label = %date%
label-padding-right = 10px

[settings]
screenchange-reload = true
pseudo-transparency = false
