home/.config/polybar/config

384 lines
12 KiB
Plaintext

;==================================================
;
; INFO: https://github.com/jaagr/polybar
;
;===================================================
;========================================
; RESOURCES
;========================================
[res/colors]
background = ${xrdb:background:#1d2021}
background-alt = ${xrdb:bg2:#504945}
foreground = ${xrdb:color15:#ebdbb2}
foreground-alt = ${xrdb:color8:#928374}
alert-dark = ${xrdb:color3:#d79921}
alert = ${xrdb:color11:#fabd2f}
accent-urgent-dark = ${xrdb:color1:#cc241d}
accent-urgent = ${xrdb:color9:#fb4934}
accent-nice-dark = ${xrdb:color2:#98971a}
accent-nice = ${xrdb:color10:#b8bb26}
accent-control-dark = ${xrdb:color5:#b16286}
accent-control = ${xrdb:color13:#d3869b}
[res/fonts]
font-0 = "DejaVu Sans:size=10;1"
font-1 = "Overpass:size=10;1"
font-2 = "Symbola:size=10;1"
font-3 =
font-4 =
;========================================
; BARS
;========================================
; TEMPLATE
;====================
[template/bar]
; Rendering of the bar
width = 100%
height = 24
; Module padding and spacing
padding = 2
module-margin = 1
; Module colors
background = ${res/colors.background}
foreground = ${res/colors.foreground}
; Module fonts
font-0 = ${res/fonts.font-0}
font-1 = ${res/fonts.font-1}
font-2 = ${res/fonts.font-2}
font-3 = ${res/fonts.font-3}
font-4 = ${res/fonts.font-4}
; UPPER
;====================
[bar/top]
inherit = template/bar
tray-position = right
tray-padding = 2
border-bottom-size = 2
border-bottom-color = ${res/colors.accent-control}
modules-left = i3 | xwindow
modules-center = date
modules-right = wlan-up wlan-down | xkeyboard
; LOWER
;====================
[bar/bottom]
inherit = template/bar
bottom=true
border-top-size = 2
border-top-color = ${res/colors.accent-control}
modules-left = battery cpu memory
modules-center = mpd
modules-right = xbacklight volume temperature
;========================================
; MODULES
;========================================
; COSMETIC
;====================
[module/|]
type = custom/text
content = " "
content-foreground = ${res/colors.foreground}
; CUSTOM
;====================
; TEMPLATE
;====================
[template/module/bar]
format = <label> <bar>
label = "<TEMPLATE>"
label-padding = 2
label-foreground = ${res/colors.background}
label-background = ${res/colors.accent-control}
bar-width = 30
bar-fill = |
bar-fill-foreground = ${res/colors.accent-control}
bar-fill-foreground-progress = ${res/colors.accent-nice}
bar-fill-foreground-resource-low = ${res/colors.accent-urgent}
bar-fill-foreground-resource-high = ${res/colors.accent-nice}
bar-fill-foreground-setting = ${res/colors.accent-control}
bar-fill-background = ${res/colors.background}
bar-indicator = |
bar-indicator-foreground = ${res/colors.foreground}
bar-indicator-background = ${res/colors.background}
bar-empty = |
bar-empty-foreground = ${res/colors.background-alt}
bar-empty-background = ${res/colors.background}
[template/module/network]
type = internal/network
interface = wlp1s0
format-connected = <label-connected>
format-connected-foreground = ${res/colors.background}
format-connected-background = ${res/colors.accent-control}
format-disconnected = <label-disconnected>
format-disconnected-foreground = ${res/colors.accent-urgent}
format-disconnected-background = ${res/colors.background}
label-connected = %upspeed% %downspeed% - %signal%%
label-connected-padding = 2
label-disconnected =
label-disconnected-padding = 2
interval = 1
; STOCK
;====================
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
label-mode-padding = 2
label-mode-foreground = ${res/colors.background}
label-mode-background = ${res/colors.accent-control}
; Active workspace on focused monitor
label-focused = %name%
label-focused-padding = 2
label-focused-foreground = ${res/colors.background}
label-focused-background = ${res/colors.accent-control}
; Active workspace on unfocused monitor
label-visible = ${self.label-focused}
label-visible-padding = ${self.label-focused-padding}
label-visible-foreground = ${self.label-focused-foreground}
label-visible-background = ${res/colors.accent-control-dark}
; Inactive workspace
label-unfocused = ${self.label-focused}
label-unfocused-padding = ${self.label-focused-padding}
label-unfocused-foreground = ${res/colors.foreground}
label-unfocused-background = ${res/colors.background}
; Urgent workspace
label-urgent = ${self.label-focused}
label-urgent-padding = ${self.label-focused-padding}
label-urgent-foreground = ${res/colors.background}
label-urgent-background = ${res/colors.alert}
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 95
format-charging = <label-charging> <bar-capacity>
format-discharging = <label-discharging> <bar-capacity>
format-full = <label-full> <bar-capacity>
label-charging = "+"
label-charging-padding = ${template/module/bar.label-padding}
label-charging-foreground = ${template/module/bar.label-foreground}
label-charging-background = ${template/module/bar.label-background}
label-discharging = "-"
label-discharging-padding = ${self.label-charging-padding}
label-discharging-foreground = ${template/module/bar.label-foreground}
label-discharging-background = ${template/module/bar.label-background}
label-full = "$"
label-full-padding = ${self.label-charging-padding}
label-full-foreground = ${template/module/bar.label-foreground}
label-full-background = ${res/colors.accent-nice}
bar-capacity-width = ${template/module/bar.bar-width}
bar-capacity-fill = ${template/module/bar.bar-fill}
bar-capacity-fill-foreground = ${template/module/bar.bar-fill-foreground-resource-high}
bar-capacity-fill-background = ${template/module/bar.bar-fill-background}
bar-capacity-indicator = ${template/module/bar.bar-indicator}
bar-capacity-indicator-foreground = ${template/module/bar.bar-indicator-foreground}
bar-capacity-indicator-background = ${template/module/bar.bar-indicator-background}
bar-capacity-empty = ${template/module/bar.bar-empty}
bar-capacity-empty-foreground = ${template/module/bar.bar-empty-foreground}
bar-capacity-empty-background = ${template/module/bar.bar-empty-background}
interval = 60
[module/cpu]
type = internal/cpu
format = <label> <bar-load>
label = "C"
label-padding = ${template/module/bar.label-padding}
label-foreground = ${template/module/bar.label-foreground}
label-background = ${res/colors.accent-urgent-dark}
bar-load-width = ${template/module/bar.bar-width}
bar-load-fill = ${template/module/bar.bar-fill}
bar-load-fill-foreground = ${template/module/bar.bar-fill-foreground-resource-low}
bar-load-fill-background = ${template/module/bar.bar-fill-background}
bar-load-indicator = ${template/module/bar.bar-indicator}
bar-load-indicator-foreground = ${template/module/bar.bar-indicator-foreground}
bar-load-indicator-background = ${template/module/bar.bar-indicator-background}
bar-load-empty = ${template/module/bar.bar-empty}
bar-load-empty-foreground = ${template/module/bar.bar-empty-foreground}
bar-load-empty-background = ${template/module/bar.bar-empty-background}
interval = 1
[module/date]
type = internal/date
date = %a
time = %I:%M %p
date-alt = %A, %B %d
time-alt = %I:%M %p
label = %date% %time%
label-foreground = ${res/colors.foreground}
label-background = ${res/colors.background}
interval = 30
[module/memory]
type = internal/memory
format = <label> <bar-used>
label = "M"
label-padding = ${template/module/bar.label-padding}
label-foreground = ${template/module/bar.label-foreground}
label-background = ${res/colors.accent-urgent-dark}
bar-used-width = ${template/module/bar.bar-width}
bar-used-fill = ${template/module/bar.bar-fill}
bar-used-fill-foreground = ${template/module/bar.bar-fill-foreground-resource-low}
bar-used-fill-background = ${template/module/bar.bar-fill-background}
bar-used-indicator = ${template/module/bar.bar-indicator}
bar-used-indicator-foreground = ${template/module/bar.bar-indicator-foreground}
bar-used-indicator-background = ${template/module/bar.bar-indicator-background}
bar-used-empty = ${template/module/bar.bar-empty}
bar-used-empty-foreground = ${template/module/bar.bar-empty-foreground}
bar-used-empty-background = ${template/module/bar.bar-empty-background}
interval = 1
[module/mpd]
type = internal/mpd
format-online = <label-song> <bar-progress> <label-time>
format-offline = <label-offline>
label-song = %title%
label-song-foreground = ${res/colors.foreground}
label-song-background = ${res/colors.background}
label-song-maxlen = 25
label-song-ellipsis = true
label-offline = "SALT"
label-offline-foreground = ${res/colors.foreground}
label-offline-background = ${res/colors.background}
label-time = %elapsed%/%total%
label-time-foreground = ${res/colors.foreground}
label-time-background = ${res/colors.background}
bar-progress-width = 100
bar-progress-fill = ${template/module/bar.bar-fill}
bar-progress-fill-foreground = ${template/module/bar.bar-fill-foreground-progress}
bar-progress-fill-background = ${template/module/bar.bar-fill-background}
bar-progress-indicator = ${template/module/bar.bar-indicator}
bar-progress-indicator-foreground = ${template/module/bar.bar-indicator-foreground}
bar-progress-indicator-background = ${template/module/bar.bar-indicator-background}
bar-progress-empty = ${template/module/bar.bar-empty}
bar-progress-empty-foreground = ${template/module/bar.bar-empty-foreground}
bar-progress-empty-background = ${template/module/bar.bar-empty-background}
interval = 1
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <label>
format-warn = <label-warn>
label = %temperature%
label-padding = 2
label-foreground = ${res/colors.background}
label-background = ${res/colors.accent-control-dark}
label-warn = %temperature%
label-warn-padding = ${self.label-padding}
label-warn-foreground = ${res/colors.background}
label-warn-background = ${res/colors.alert}
[module/volume]
type = internal/volume
format-volume = <label-volume> <bar-volume>
format-muted = <label-muted> <bar-volume>
label-volume = "V"
label-volume-padding = ${template/module/bar.label-padding}
label-volume-foreground = ${template/module/bar.label-foreground}
label-volume-background = ${template/module/bar.label-background}
label-muted = "V"
label-muted-padding = ${self.label-volume-padding}
label-muted-foreground = ${res/colors.background}
label-muted-background = ${res/colors.background-alt}
bar-volume-width = ${template/module/bar.bar-width}
bar-volume-fill = ${template/module/bar.bar-fill}
bar-volume-fill-foreground = ${template/module/bar.bar-fill-foreground-setting}
bar-volume-fill-background = ${template/module/bar.bar-fill-background}
bar-volume-indicator = ${template/module/bar.bar-indicator}
bar-volume-indicator-foreground = ${template/module/bar.bar-indicator-foreground}
bar-volume-indicator-background = ${template/module/bar.bar-indicator-background}
bar-volume-empty = ${template/module/bar.bar-empty}
bar-volume-empty-foreground = ${template/module/bar.bar-empty-foreground}
bar-volume-empty-background = ${template/module/bar.bar-empty-background}
interval = 1
[module/wlan-up]
inherit = template/module/network
label-connected = %upspeed%
label-connected-background = ${res/colors.accent-control}
label-disconnected = %ifname% Disconnected
[module/wlan-down]
inherit = template/module/network
label-connected = %downspeed%
label-connected-background = ${res/colors.accent-control-dark}
[module/xbacklight]
type = internal/xbacklight
inherit = template/module/bar
label = BRI
bar-fill-foreground = ${template/module/bar.bar-fill-foreground-setting}
[module/xkeyboard]
type = internal/xkeyboard
format = <label-indicator> <label-layout>
label-layout = %name%
label-layout-padding = 2
label-layout-background = ${res/colors.accent-control-dark}
label-layout-foreground = ${res/colors.background}
label-indicator = %name%
label-indicator-padding = 2
label-indicator-background = ${res/colors.accent-control}
label-indicator-foreground = ${self.label-layout-foreground}
[module/xwindow]
type = internal/xwindow
label = %title%
label-maxlen = 75
label-ellipsis = true