[module/layout]
type = custom/script
exec = cat $HOME/.config/bspwm/scripts/current_layout
click-left = $HOME/.config/bspwm/scripts/switch_layouts
interval = 0
format = <label>
label = "%output%"
format-foreground = ${colors.blue}
format-background = ${colors.black}
format-padding = 0

[module/spotify-track]
type = custom/script
interval = 1
exec = $HOME/.config/bspwm/polybar/scripts/spotify.py -f '{song}' | awk '{print toupper($0)}'

format = <label>
format-padding = 0
format-foreground = ${colors.cyan}
format-background = ${colors.black}

label = %output%
label-maxlen = 45

click-left = playerctl -p spotify play-pause
scroll-up = playerctl -p spotify next
scroll-down = playerctl -p spotify previous


[module/spotify-artist]
type = custom/script
interval = 1
exec = $HOME/.config/bspwm/polybar/scripts/spotify.py -f '{artist} ' | awk '{print toupper($0)}'

format = <label>
format-padding = 0
format-foreground = ${colors.pink}
format-background = ${colors.black}

label = %output%
label-maxlen = 45

click-left = playerctl -p spotify play-pause
scroll-up = playerctl -p spotify next
scroll-down = playerctl -p spotify previous

[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/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_input

label-background = ${colors.black}

label-foreground = ${colors.blue}


[module/sep]
type = custom/text
content-foreground = ${colors.background}
content-background = ${colors.background}
content = " "
content-font = 2

[module/sep1]
type = custom/text
content-foreground = ${colors.black}
content-background = ${colors.black}
content = " "
content-font = 2


[module/left1]
type = custom/text
content-foreground = ${colors.black}
content = ""
offset-y = -5
content-font = 2

[module/left2]
type = custom/text
content-foreground = ${colors.black}
content = ""
content-font = 2

[module/medium1]
type = custom/text
content-foreground = ${colors.black}
content = " "
content-font = 2

[module/medium2]
type = custom/text
content-foreground = ${colors.black}
content = ""
content-font = 2

[module/right1]
type = custom/text
content-foreground = ${colors.black}
content = ""
content-font = 2

[module/right2]
type = custom/text
content-foreground = ${colors.black}
content = ""
content-font = 2

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/appmenu]
type = custom/text
content-foreground = ${colors.blue}
content-background = ${colors.black}
content = "異"
content-font = 2
click-left = exec $HOME/.config/bspwm/rofi/launch.sh

[module/term]
type = custom/text
content-foreground = ${colors.red}
content-background = ${colors.black}
content = " "
click-left = exec kitty
content-font = 6
[module/thunar]
type = custom/text
content-foreground = ${colors.pink}
content-background = ${colors.black}
content = " "
click-left = exec pcmanfm
content-font = 6
[module/firefox]
type = custom/text
content-foreground = ${colors.orange}
content-background = ${colors.black}
content = " "
click-left = exec firefox
content-font = 6
[module/discord]
type = custom/text
content-foreground = ${colors.blue}
content-background = ${colors.black}
content = "ﭮ "
click-left = exec discord
content-font = 6
[module/launch-spotify]
type = custom/text
content-foreground = ${colors.green}
content-background = ${colors.black}
content = " "
click-left = exec spotify
content-font = 6

[module/dot]
type = custom/text
content = 
content-foreground = ${colors.black}
content-background = ${colors.background}
content-font = 6

[module/dot-alt]
inherit = module/dot
content-foreground = ${colors.foreground}

[module/dot-alt2]
inherit = module/dot-alt
content-background = ${colors.black}

[module/ewmh]
type = internal/xworkspaces
pin-workspaces = false
enable-click = true
enable-scroll = false
icon-0 = 1;一
icon-1 = 2;二
icon-2 = 3;三
icon-3 = 4;四
icon-4 = 5;五
icon-5 = 6;六
icon-6 = 7;七
icon-7 = 8;八
icon-8 = 9;九
format = <label-state>
label-active = %icon%
label-active-foreground = ${colors.yellow}
label-active-background =  #bd93f9
label-active-padding = 1
label-occupied = %icon%
label-occupied-foreground = ${colors.blue}
label-occupied-background = ${colors.black}
label-occupied-padding = 1
label-urgent = %icon%
label-urgent-foreground = ${colors.red}
label-urgent-padding = 1
label-empty = %icon%
label-empty-foreground = ${colors.fg}
label-empty-padding = 1


;[module/bspwm]
;type = internal/bspwm
;ws-icon-0 = 1;%{F#FAE3B0}
;ascii_distro="arcolinux_small"
;ws-icon-1 = 2;%{F#96CDFB}
;ws-icon-2 = 3;%{F#F28FAD}
;ws-icon-3 = 4;%{F#ABE9B3}
;ws-icon-4 = 5;%{F#96CDFB}
;ws-icon-5 = 6;%{F#FAE3B0}
;ws-icon-6 = 7;%{F#ABE9B3}磊
;
;label-focused = 
;label-focused-background = ${colors.black}
;#label-focused-underline= ${colors.cyan}
;label-focused-foreground = ${colors.yellow}
;#label-focused-underline = ${colors.primary}
;label-focused-padding = 1
;
;label-occupied = 
;label-occupied-background = ${colors.black}
;label-occupied-foreground = ${colors.blue}
;#label-occupied-underline = ${colors.secondary}
;label-occupied-padding = 1
;
;label-urgent = %icon%
;label-urgent-background = ${colors.black}
;label-urgent-foreground = ${colors.orange}
;label-urgent-underline = ${colors.red}
;label-urgent-padding = 1
;
;label-empty = 
;label-empty-background = ${colors.black}
;label-empty-foreground = ${colors.white}
;label-empty-padding = 1
;
;
;; Separator in between workspaces
;label-separator =
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[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 = 2
label-mode-foreground =
label-mode-background = ${colors.primary}

; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}

; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}

; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}

; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}

; Separator in between workspaces
; label-separator = |

;;;;;;;;;;;;;;;;;;;;;;;;
;; Openbox Workspaces ;;
;;;;;;;;;;;;;;;;;;;;;;;;
[module/workspaces]
type = internal/xworkspaces
pin-workspaces = false
enable-click = true
enable-scroll = true

format-padding = 0
format = <label-state>

label-active = %name%
label-active-padding = 2
label-active-foreground = ${colors.background}
label-active-background = ${colors.pink}
label-active-underline = ${colors.background}

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

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

label-empty = %name%
label-empty-padding = 2
label-empty-foreground = ${colors.foreground}
label-empty-background = ${colors.background}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/notification-center]
type = custom/script
exec = echo 
interval = 100
label = "  %output%  "

;format-background = ${colors.white}
format-foreground = ${colors.white}

click-left = $HOME/.scripts/rofi_notif_center.sh

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
[module/kernel-name]
type = custom/script
exec = uname -r
interval = 10000
label = "    %output% "
format-foreground = ${colors.white}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/filesystem]
type = internal/fs


; Mountpoints to display
mount-0 = /

; 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>

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

; 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%: not mounted
label-unmounted-foreground = #55
label-unmounted-background = ${colors.black}
label-mounted-background = ${colors.black}

label-mounted-foreground = ${colors.magenta}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/pacman-updates]
type = custom/script
exec = checkupdates 2>/dev/null | wc -l || echo "0"
interval = 1000
label = "  %output%"
format-foreground = ${colors.green}
format-foreground-error = ${colors.red}
format-background = ${colors.black}
click-left = alacritty -e $SHELL -c 'paru'

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/windowtitle]
type = internal/xwindow
format = <label>
format-background = ${colors.black}
format-foreground = ${colors.blue}
format-padding = 1
label = "  %title%"
label-maxlen = 34
label-empty = "   Desktop"
label-separator = " "
label-empty-foreground = ${colors.blue}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/volume]
type = internal/pulseaudio
format-volume = " <ramp-volume><label-volume>"
ramp-volume-0 =" "
ramp-volume-0-foreground = ${colors.green}
ramp-volume-1 ="墳 "
ramp-volume-foreground = ${colors.yellow}
ramp-volume-2 ="墳 "
ramp-volume-2-foreground = ${colors.red}
format-volume-background = ${colors.black}
format-volume-padding = 0

format-muted = <label-muted>
format-muted-background = ${colors.black} 	
format-muted-foreground = ${colors.white}
label-muted =" Muted"
label-volume-foreground = ${colors.white}
click-right = pavucontrol

label-volume = %percentage%%


bar-volume-width = 10
bar-volume-gradient = false

bar-volume-indicator = 雷
bar-volume-indicator-font = 8
bar-volume-indicator-foreground = ${colors.blue}

bar-volume-fill = 絛
bar-volume-fill-font = 8
bar-volume-foreground-0 = ${colors.blue}
bar-volume-foreground-1 = ${colors.blue}
bar-volume-foreground-2 = ${colors.blue}
bar-volume-foreground-3 = ${colors.blue}
bar-volume-foreground-4 = ${colors.blue}

bar-volume-empty = 絛
bar-volume-empty-font = 8
bar-volume-empty-foreground = ${colors.black}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 100

format-charging = <label-charging>
format-charging-prefix = ""
format-charging-prefix-font = 2
label-charging = "%percentage%%"

format-discharging = <label-discharging>
label-discharging = "%percentage%%"
format-discharging-prefix = ""
format-discharging-prefix-font = 2

format-discharging-background = ${colors.black}
format-discharging-foreground = ${colors.yellow}

format-charging-background = ${colors.black}
format-charging-foreground = ${colors.yellow}

label-full = " %percentage%%"
format-full-background = ${colors.black}
format-full-foreground = ${colors.green}
format-full-prefix-font = 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/network]
type = internal/network
interface = wlp1s0
format-connected = <label-connected>
format-connected-prefix = ""
format-connected-prefix-font = 1
label-connected = " %essid%"
label-connected-font = 1

format-disconnected = <label-disconnected>
format-disconnected-prefix = 
format-disconnected-prefix-font = 1
label-disconnected = " Disconnected"
label-disconnected-font = 1

format-connected-background = ${colors.background}
format-connected-foreground = ${colors.cyan}
format-disconnected-background = ${colors.background}
format-disconnected-foreground = ${colors.red}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/memory]
type = internal/memory
; Seconds to sleep between updates
interval = 3

label = " %percentage_used:2%%"

format-prefix-padding = 2
format-prefix-font = 2
format-prefix-foreground = #ffffff
format-background = ${colors.black}
format-foreground = ${colors.red}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/wired-network]
type = internal/network
interface = eno1
interval = 3.0

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

format-connected = <label-connected>
format-disconnected = <label-disconnected>

label-connected = " %downspeed%"
label-connected-foreground = ${colors.cyan}
label-connected-background = ${colors.black}

label-disconnected = ""
label-disconnected-foreground = ${colors.cyan}
label-disconnected-background = ${colors.black}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/cpu]
type = internal/cpu

interval = 1
format = <label>
label = " %percentage%%"

format-background = ${colors.black}
format-foreground = ${colors.orange}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/date]
type = internal/date
interval = 1

date =
date-alt = "﨟 %A, %b %d -"

time-alt = " %H:%M "
time = " %I:%M %p "

;format-prefix = ""
format-prefix-padding = 1
format-prefix-font = 1
format-prefix-foreground = #ffffff
format-background = ${colors.black}
format-foreground = ${colors.blue}

label = %date% %time%
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/powermenu]
type = custom/text
content = ""
content-font = 2
content-background = ${colors.black}
content-foreground = ${colors.red}
click-left = $HOME/.config/bspwm/rofi/theme.sh
