[global/wm]
margin-top = 0
margin-bottom = 0

[colors]
include-file = ~/.config/polybar/config_colors

[bar/i3]
width = 100%
height = 18
bottom = true
radius = 0
fixed-center = false

background = ${colors.bg-main}
foreground = ${colors.fg-main}

padding-left = 0
padding-right = 1

module-margin-left = 0
module-margin-right = 2

font-0 = Monospace:size=8:hintstyle=hintslight;2
font-1 = Monospace:weight=bold:size=8:hintstyle=hintslight;2

tray-position = right
tray-padding = 5

format-margin = 0

modules-left = i3 title
modules-center =
modules-right = xkeyboard alsa date
override-redirect = false

[bar/bspwm]
width = 100%
height = 18
bottom = true
radius = 0
fixed-center = false

background = ${colors.bg-main}
foreground = ${colors.fg-main}

padding-left = 0
padding-right = 1

module-margin-left = 0
module-margin-right = 2

font-0 = Monospace:size=8:hintstyle=hintslight;2
font-1 = Monospace:weight=bold:size=8:hintstyle=hintslight;2

tray-position = right
tray-padding = 5

format-margin = 0

modules-left = bspwm bspwm_panel_monocle title
modules-center =
modules-right = xkeyboard alsa date
wm-restack = bspwm
override-redirect = false

[bar/herbstluftwm]
width = 100%
height = 18
bottom = true
radius = 0
fixed-center = false

background = ${colors.bg-main}
foreground = ${colors.fg-main}

padding-left = 0
padding-right = 1

module-margin-left = 0
module-margin-right = 2

font-0 = Monospace:size=8:hintstyle=hintslight;2
font-1 = Monospace:weight=bold:size=8:hintstyle=hintslight;2

modules-left = ewmh title
modules-center =
modules-right = xkeyboard alsa date

tray-position = right
tray-padding = 5

format-margin = 0

[module/i3]
type = internal/i3

label-focused = "[%name%]"
label-focused-font = 2

label-unfocused = " %name%^ "
label-unfocused-foreground = ${colors.fg-dim}

label-visible = " %name%^ "
label-visible-foreground = ${colors.fg-dim}

label-urgent = " %name%! "
label-urgent-font = 2
label-urgent-foreground = ${colors.red}

label-empty = ""
label-empty-foreground = ${colors.fg-dim}

format = <label-state> <label-mode>

[module/ewmh]
type = internal/xworkspaces

label-active = "[%name%]"
label-active-font = 2

label-occupied = " %name%^ "
label-occupied-foreground = ${colors.fg-dim}

label-urgent = " %name%! "
label-urgent-font = 2
label-urgent-foreground = ${colors.red}

label-empty = ""
label-empty-foreground = ${colors.fg-dim}

[module/bspwm]
type = internal/bspwm

inline-mode = false

; FIXME 2021-09-25: hide when bspc config single_monocle true.
;
; UPDATE 2021-10-06: check module/bspwm_panel_monocle and my shell
; script bspwm_panel_monocle.
label-monocle =
label-monocle-foreground = ${colors.fg-dim}
label-locked = L
label-locked-foreground = ${colors.yellow}
label-sticky = S
label-sticky-foreground = ${colors.magenta}
label-private = P
label-private-foreground = ${colors.blue}
label-marked = *
label-marked-foreground = ${colors.red}

label-focused = "[%name%]"
label-focused-font = 2

label-occupied = " %name%^ "
label-occupied-foreground = ${colors.fg-dim}

label-urgent = " %name%! "
label-urgent-font = 2
label-urgent-foreground = ${colors.red}

label-empty = " %name% "
label-empty-foreground = ${colors.fg-dim}

format = <label-state> <label-mode>

[module/bspwm_panel_monocle]
type = custom/script
exec = bspwm_panel_monocle
tail = true

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

label-layout = %layout%

[module/alsa]
type = internal/alsa

[module/cpu]
type = internal/cpu
interval = 5
label = %percentage:2%%
label-foreground = ${colors.magenta}

[module/memory]
type = internal/memory
interval = 5
label = %percentage_used%%
label-foreground = ${colors.cyan}

; [module/notmuch]
; type = custom/script
;
; exec = ~/bin/polybar_notmuch_count
;
; ; Conditional command that, if defined, needs to exit successfully
; ; before the main exec command is invoked.
; ; Default: ""
; exec-if = command -v notmuch
;
; ; Seconds to sleep between updates
; ; Default: 5 (0 if `tail = true`)
; interval = 120
;
; format = @<label>

[module/title]
type = internal/xwindow

label = %title%
label-maxlen = 80

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

date = %a %e %b, %R
label = %date%

; vim:ft=dosini
