##########################################################################################################
#																										 
#    Copyright © 2022 To Cyb3rTh1eveZ																	 
#																										 
#     ██████╗██╗   ██╗██████╗ ██████╗ ██████╗ ████████╗██╗  ██╗ ██╗███████╗██╗   ██╗███████╗███████╗	 
#    ██╔════╝╚██╗ ██╔╝██╔══██╗╚════██╗██╔══██╗╚══██╔══╝██║  ██║███║██╔════╝██║   ██║██╔════╝╚══███╔╝     
#    ██║      ╚████╔╝ ██████╔╝ █████╔╝██████╔╝   ██║   ███████║╚██║█████╗  ██║   ██║█████╗    ███╔╝      
#    ██║       ╚██╔╝  ██╔══██╗ ╚═══██╗██╔══██╗   ██║   ██╔══██║ ██║██╔══╝  ╚██╗ ██╔╝██╔══╝   ███╔╝       
#    ╚██████╗   ██║   ██████╔╝██████╔╝██║  ██║   ██║   ██║  ██║ ██║███████╗ ╚████╔╝ ███████╗███████╗     
#     ╚═════╝   ╚═╝   ╚═════╝ ╚═════╝ ╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═╝ ╚═╝╚══════╝  ╚═══╝  ╚══════╝╚══════╝     
#																										 
#																										 
#																										 
#    Copyright (C) Mahmoud Mohamed (Ozil)  <https://github.com/mmsaeed509>								 
#    LICENSE © GNU-GPL3																					 
#																										 
##########################################################################################################

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/battery]
type = internal/battery

full-at = 99

battery = ${system.battery}
adapter = ${system.adapter}

format-charging = <animation-charging><label-charging>
label-charging = %percentage%%
format-charging-foreground = ${colors.color4}
format-charging-background = ${colors.background}
format-charging-font = 4

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

format-full-prefix = " "
format-full-prefix-foreground = #A0E8A2
format-foreground = ${colors.color4}
format-background = ${colors.background}
format-full-prefix-font = 4
label-full = "%percentage%% "
label-full-font = 4

label-discharging-foreground = ${colors.foreground}
label-discharging-font = 4

ramp-capacity-foreground =  #A0E8A2  
label-charging-foreground = ${colors.foreground}
label-charging-font = 4

label-padding = 1

ramp-capacity-0 = " " 
ramp-capacity-1 = " " 
ramp-capacity-2 = " " 
ramp-capacity-3 = " " 
ramp-capacity-4 = " "


animation-charging-0 = " " 
animation-charging-1 = " " 
animation-charging-2 = " " 
animation-charging-3 = " " 
animation-charging-4 = " "


animation-charging-foreground = #DF8890
animation-charging-framerate = 750
animation-charging-font = 4

format-charging-padding = 1
format-discharging-padding = 1

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/cpu]
type = internal/cpu

interval = 1

format = <label>

; format-prefix = " "
format-prefix-font = 4
format-prefix-foreground = #5EDEA3
format-prefix-background = ${color.BGL}
label = "%{A1:stacer &:} %percentage%%%{A} "
label-font = 4
label-background = ${color.BGL}
label-foreground = #5EDEA3
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/filesystem]
type = internal/fs

mount-0 = /
interval = 30
fixed-values = true

format-mounted = <label-mounted>
format-mounted-prefix = " "
format-mounted-prefix-foreground = ${color.background}
format-mounted-prefix-background = ${color.cyan}

format-unmounted = <label-unmounted>
format-unmounted-prefix = " "
format-unmounted-prefix-foreground = ${color.background}
format-unmounted-prefix-background = ${color.cyan}

label-mounted = "%{A1:alacritty --config-file ~/.config/bspwm/alacritty/alacritty.yml -e duf &:} %free%%{A}"
label-unmounted = " %mountpoint%: NA"
label-mounted-foreground = ${color.background}

label-mounted-background = ${color.cyan}
label-unmounted-background = ${color.cyan}

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/cpuTemp]
type = custom/script
exec = ~/.config/bspwm/polybar/tokyo/modules/heatSensors
interval = 0.5
click-left = xsensors
format-foreground = ${color.BLUE}
format-background = ${color.BGL}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/memory]
type = custom/script
exec = free -g | sed -n 's/^Mem:\s\+[0-9]\+\s\+\([0-9]\+\)\s.\+/\1/p'
format = <label>
format-prefix = "" 
format-prefix-font = 3

label = "%{A1:alacritty --config-file ~/.config/bspwm/alacritty/alacritty.yml -e htop &:}%output%GB%{A}"
label-padding = 1
label-font = 4
format-prefix-foreground = #d19a66
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/updates-pacman]
type = custom/script
exec = ~/.config/bspwm/polybar/scripts/updates-pacman.sh
interval = 180
format = <label>

;label = %output% Updates
label = "%{A1:alacritty --config-file ~/.config/bspwm/alacritty/alacritty.yml -e sudo pacman -Syyu &:} %output% %{A}"

format-font = 4
label-foreground = #56B6C2

; label-foreground = #e92ef0
; label-foreground = #BF616A
label-background = ${color.BGL}

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
