## Copyright (C) 2020-2022 Aditya Shakya <adi1090x@gmail.com>

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

[module/cpu]
type = internal/cpu

; Seconds to sleep between updates
; Default: 1
interval = 0.5

; Available tags:
;   <label> (default)
;   <bar-load>
;   <ramp-load>
;   <ramp-coreload>
;;format = <label> <ramp-coreload>
format = <label>
format-prefix = 
format-prefix-font = 2
format-prefix-foreground = ${color.YELLOW}
format-background = ${color.BACKGROUND3}

; Available tokens:
;   %percentage% (default) - total cpu load averaged over all cores
;   %percentage-sum% - Cumulative load on all cores
;   %percentage-cores% - load percentage for each core
;   %percentage-core[1-9]% - load percentage for specific core
label = " %percentage%%"

; Spacing between individual per-core ramps
;;ramp-coreload-spacing = 1
;;ramp-coreload-0 = 
;;ramp-coreload-1 = 
;;ramp-coreload-2 = 
;;ramp-coreload-3 = 
;;ramp-coreload-4 = 

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

[module/memory]
type = internal/memory
 
; Seconds to sleep between updates
; Default: 1
interval = 3
 
; Available tags:
;   <label> (default)
;   <bar-used>
;   <bar-free>
;   <ramp-used>
;   <ramp-free>
;   <bar-swap-used>
;   <bar-swap-free>
;   <ramp-swap-used>
;   <ramp-swap-free>
format = <label>
format-background = ${color.BACKGROUND2}
 
format-prefix = 
format-prefix-font = 2
format-prefix-foreground = ${color.BLUE}

; Available tokens:
;   %percentage_used% (default)
;   %percentage_free%
;   %gb_used%
;   %gb_free%
;   %gb_total%
;   %mb_used%
;   %mb_free%
;   %mb_total%
;   %percentage_swap_used%
;   %percentage_swap_free%
;   %mb_swap_total%
;   %mb_swap_free%
;   %mb_swap_used%
;   %gb_swap_total%
;   %gb_swap_free%
;   %gb_swap_used%
label = " %percentage_used%%"
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/used-memory]
type = custom/script
exec = free -m | grep 'Mem:' | tr -s ' ' | cut -d ' ' -f3
tail = true
interval = 5
format = <label>
format-background = ${color.BACKGROUND2}
format-prefix = 
format-prefix-font = 2
format-prefix-foreground = ${color.BLUE}
label = " %output% MB"
click-left = alacritty --class 'alacritty-float,alacritty-float' --config-file ~/.config/bspwm/alacritty/alacritty.yml -e "top" &

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

[module/temperature]
type = internal/temperature

; Seconds to sleep between updates
; Default: 1
interval = 0.5

; 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/hwmon2/temp1_input
;;hwmon-path = /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/hwmon/hwmon0/temp1_input
hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input
; Threshold temperature to display warning label (in degrees celsius)
; Default: 80
warn-temperature = 65

; Whether or not to show units next to the temperature tokens (°C, °F)
; Default: true
units = true

; Available tags:
;   <label> (default)
;   <ramp>
format = <ramp> <label>

; Available tags:
;   <label-warn> (default)
;   <ramp>
format-warn = <ramp> <label-warn>

; Available tokens:
;   %temperature% (deprecated)
;   %temperature-c%   (default, temperature in °C)
;   %temperature-f%   (temperature in °F)
label = %temperature-c%

; Available tokens:
;   %temperature% (deprecated)
;   %temperature-c%   (default, temperature in °C)
;   %temperature-f%   (temperature in °F)
label-warn = "%temperature-c%"
label-warn-foreground = ${color.RED}
ramp-2-foreground = ${color.YELLOW}

; Requires the <ramp> tag
; The icon selection will range from 0 to `warn-temperature`
; with the current temperature as index.
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 

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

[module/filesystem]
type = internal/fs

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

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

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

; Spacing between entries
; Default: 2
;;spacing = 4

; Available tags:
;   <label-mounted> (default)
;   <bar-free>
;   <bar-used>
;   <ramp-capacity>
format-mounted = <label-mounted>
format-mounted-background = ${color.BACKGROUND1}

format-mounted-prefix = 
format-mounted-prefix-font = 2
format-mounted-prefix-foreground = ${color.MAGENTA}

; Available tags:
;   <label-unmounted> (default)
format-unmounted = <label-unmounted>
format-unmounted-background = ${color.BACKGROUND1}

format-unmounted-prefix = 
format-unmounted-prefix-font = 2
format-unmounted-prefix-foreground = ${color.MAGENTA}

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

; Available tokens:
;   %mountpoint%
; Default: %mountpoint% is not mounted
label-unmounted = " %mountpoint%: NM"

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

[module/volume]
type = internal/pulseaudio

; Sink to be used, if it exists (find using `pacmd list-sinks`, name field)
; If not, uses default sink
sink = 

; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false
; Default: true
use-ui-max = false

; Interval for volume increase/decrease (in percent points)
; Default: 5
interval = 5

format-volume = <ramp-volume> <label-volume>

format-muted = <label-muted>
format-muted-prefix = 婢
format-muted-prefix-font = 2
format-muted-prefix-foreground = ${color.RED}

label-volume = %percentage%%
label-muted = " Mute"
label-muted-foreground = ${color.ALTFOREGROUND}

ramp-volume-0 = 奄
ramp-volume-1 = 奄
ramp-volume-2 = 奄
ramp-volume-3 = 奔
ramp-volume-4 = 奔
ramp-volume-5 = 墳
ramp-volume-6 = 墳
ramp-volume-7 = 墳
ramp-volume-8 = 墳
ramp-volume-9 = 墳
ramp-volume-font = 2
ramp-volume-foreground = ${color.BLUE}

ramp-headphones-0 = 
ramp-headphones-1 = 

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

[module/bna]
type = custom/text

content = " NA"
content-prefix = 
content-prefix-font = 2
content-prefix-foreground = ${color.RED}
content-padding = 0

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

[module/backlight]
type = internal/xbacklight

card = intel_backlight

format = <ramp> <label>

label = %percentage%%

ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 
ramp-5 = 
ramp-6 = 
ramp-7 = 
ramp-8 = 
ramp-9 = 
ramp-font = 2
ramp-foreground = ${color.MAGENTA}

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

[module/brightness]
type = internal/backlight

card = ${system.sys_graphics_card}

enable-scroll = true

format = <ramp> <label>

label = %percentage%%

ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 
ramp-5 = 
ramp-6 = 
ramp-7 = 
ramp-8 = 
ramp-9 = 
ramp-font = 2
ramp-foreground = ${color.MAGENTA}

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

[module/battery]
type = internal/battery

full-at = 99

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

poll-interval = 2
time-format = %H:%M

format-charging = <animation-charging> <label-charging>
format-charging-prefix = 

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

format-full = <label-full>
format-full-prefix = " "
format-full-prefix-font = 2
format-full-prefix-foreground = ${color.GREEN}

label-charging = %percentage%%
label-discharging = %percentage%%
label-full = %percentage%%

ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-font = 2
ramp-capacity-foreground = ${color.YELLOW}

animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-font = 2
animation-charging-foreground = ${color.GREEN}
animation-charging-framerate = 750

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

[module/bspwm]
type = internal/bspwm

pin-workspaces = true
inline-mode = false

enable-click = true
enable-scroll = true
reverse-scroll = true

fuzzy-match = true

; ws-icon-[0-9]+ = label;icon
; Note that the label needs to correspond with the bspwm workspace name
#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;
#ws-icon-default = 
ws-icon-0 = 1;1
ws-icon-1 = 2;2
ws-icon-2 = 3;3
ws-icon-3 = 4;4
ws-icon-4 = 5;5
ws-icon-5 = 6;6
ws-icon-6 = 7;7
ws-icon-7 = 8;8
ws-icon-8 = 9;9
ws-icon-default = 


format = <label-state>
format-font = 1

label-monitor = %name%

; If any values for label-dimmed-N are defined, the workspace/mode
; colors will get overridden with those values if the monitor is out of focus
; To only override workspaces in a specific state, use:
;   label-dimmed-focused
;   label-dimmed-occupied
;   label-dimmed-urgent
;   label-dimmed-empty
;label-dimmed-foreground = ${color.FOREGROUND}
;label-dimmed-underline = ${color.YELLOW}
;label-dimmed-focused-background = ${color.BACKGROUND}

label-focused = %name%
label-focused-foreground = ${color.BACKGROUND}
label-focused-background = ${color.BLUE}
label-focused-underline = ${color.BLUE}
label-focused-padding = 1

label-occupied = %name%
label-occupied-foreground = ${color.FOREGROUND}
label-occupied-background = ${color.BACKGROUND}
label-occupied-underline = ${color.BACKGROUND}
label-occupied-padding = 1

label-urgent = %name%
label-urgent-foreground = ${color.RED}
label-urgent-background = ${color.BACKGROUND}
label-urgent-underline = ${color.RED}
label-urgent-padding = 1

label-empty = %name%
label-empty-foreground = ${color.ACCENT}
label-empty-padding = 1

; Separator in between workspaces
label-separator = ""
label-separator-padding = 0
label-separator-foreground = ${color.ALTBACKGROUND}

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

[module/updates]
type = custom/script

; Available tokens:
;   %counter%
; Command to be executed (using "/usr/bin/env sh -c [command]")
exec = ~/.config/bspwm/themes/hack/polybar/scripts/updates.sh

; Conditional command that, if defined, needs to exit successfully
; before the main exec command is invoked.
; Default: ""
;;exec-if = ""

; Will the script output continous content?
; Default: false
tail = true

; Seconds to sleep between updates
; Default: 2 (0 if `tail = true`)
interval = 5

; Available tags:
;   <output> - deprecated
;   <label> (default)
format = <label>
format-prefix =   
format-font = 3
format-background = ${color.BACKGROUND2}
format-prefix-foreground = ${color.RED}
; Available tokens:
;   %output%
; Default: %output%
label = %output%

; Available tokens:
;   %counter%
;   %pid%
;
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c [command]"
click-left = exo-open --launch alacritty --config-file ~/.config/bspwm/alacritty/alacritty.yml && sleep 0.6 && xdotool type 'sudo pacman -Syu'
click-right = exo-open --launch alacritty --config-file ~/.config/bspwm/alacritty/alacritty.yml && sleep 0.6 && xdotool type 'sudo pacman -Syu'
;;double-click-left = echo double left %counter%
;;double-click-middle = echo double middle %counter%
;;double-click-right = echo double right %counter%

; Available tokens:
;   %counter%
;   %pid%
;
;; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c [command]"
;;scroll-up = echo scroll up %counter%
;;scroll-down = echo scroll down %counter%

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

[module/mod]
type = internal/bspwm

format = <label-mode>
format-background = ${color.BACKGROUND}
format-foreground = ${color.YELLOW}
format-padding = 0
format-font = 5

label-monocle = ""
label-tiled = "" 

label-floating = ""
label-pseudotiled = ""
label-fullscreen = ""

label-locked = " | Locked"
label-sticky = " | Sticky"
label-private = " | Private"
font-format = 2
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/cava]
type = custom/script
tail = true
exec = $HOME/.config/cava/cava.sh
format = <label>
format-font = 5
label = %output%
label-foreground = #bf616a
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/weather]
type = custom/script
exec = ~/bin/weather-polybar-plugin.sh
tail = false
interval = 960
format-prefix-font = 2
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

[module/date]
type = internal/date

interval = 1.0

time = %I:%M %p
time-alt = %a, %d %b %Y

format = <label>
format-prefix = " "
format-prefix-font = 3
format-prefix-foreground = ${color.RED}

label = %time%
label-font = 4

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

[module/mpd]
type = internal/mpd

;;host = 127.0.0.1
;;port = 6600
;;password = mysecretpassword

interval = 2

format-online = <label-song> <icon-prev> <toggle> <icon-next>
format-online-prefix = " "
format-online-prefix-foreground = ${color.GREEN}

format-playing = ${self.format-online}
format-paused = <label-song> <toggle>

format-offline = <label-offline>
format-offline-prefix = " "
format-offline-prefix-foreground = ${color.RED}
label-offline = "Offline"

label-song =  "%title% | %artist%"
label-song-maxlen = 40
label-song-ellipsis = true

icon-play = 
icon-play-font = 2
icon-play-foreground = ${color.GREEN}
icon-pause = 
icon-pause-font = 2
icon-pause-foreground = ${color.YELLOW}
icon-stop = 
icon-stop-foreground = ${color.RED}
icon-prev = 玲
icon-prev-font = 2
icon-prev-foreground = ${color.CYAN}
icon-next = 怜
icon-next-font = 2
icon-next-foreground = ${color.CYAN}

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

; If you use both a wired and a wireless network, add both modules in config.
[module/ethernet]
type = internal/network
interface = ${system.sys_network_interface}

interval = 1.0
accumulate-stats = true
unknown-as-up = true
format-font = 2
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-font = 2
format-connected-prefix-foreground = ${color.CYAN}

format-disconnected = <label-disconnected>
format-disconnected-prefix = " "
format-disconnected-prefix-font = 2
format-disconnected-prefix-foreground = ${color.RED}
format-disconnected-foreground = ${color.ALTFOREGROUND}

label-connected = "%{A1:nmd &:}%downspeed% | %upspeed%%{A}"
label-disconnected = "%{A1:nmd &:}Offline%{A}"

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

[module/network]
type = internal/network
interface = ${system.sys_network_interface}

interval = 1.0

;;ping-interval = 3
;;udspeed-minwidth = 5

accumulate-stats = true
unknown-as-up = true

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

format-disconnected = <label-disconnected>
format-disconnected-prefix = "睊 "
format-disconnected-prefix-font = 3
format-disconnected-prefix-foreground = ${color.RED}
format-disconnected-foreground = ${color.ALTFOREGROUND}

label-connected = "%{A1:nmd &:}%essid%%{A}"
label-disconnected = "%{A1:nmd &:}Disconnected%{A}"

ramp-signal-0 = 直
ramp-signal-1 = 直
ramp-signal-2 = 直
ramp-signal-3 = 直
ramp-signal-4 = 直
ramp-signal-font = 3
ramp-signal-foreground = ${color.CYAN}

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

[module/sep]
type = custom/text
content = ◆

content-background = ${color.BACKGROUND}
content-foreground = ${color.ALTBACKGROUND}
content-padding = 2

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;;	    __________  ______
;;	   / ____/ __ \/ ____/
;;	  / __/ / / / / /_    
;;	 / /___/ /_/ / __/    
;;	/_____/\____/_/       
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
