dotfiles/polybar/config
2020-04-19 00:43:32 +08:00

202 lines
5.3 KiB
INI

; Main color format is in ARGB.
; However, formats in RGB is fine.
; This is where all of the colors should be placed for those who are lazy to scroll down (like me).
[colors]
background = #000
foreground = #eee
module_prefix_bg = ${xrdb:color1:#ccc}
module_prefix_fg = ${xrdb:color15:#000}
module_bg = ${xrdb:color15:#fff}
module_fg = ${xrdb:color0:#000}
vol_module_bg = #ff9f1c
network_module_bg = #2ec4b6
date_module_bg = #99d122
memory_module_bg = #1a1b41
; The common style between bars.
[bar-common-style]
width = 100%
height = 32
wm-restack = bspwm
fixed-center = false
line-size = 3
line-color = #f00
padding = 1
module-margin = 1
module-padding = 1
font-0 = "Iosevka"
font-1 = "Fira Code"
font-2 = "Noto Color Emoji:style=Regular:scale=10;1"
; This creates the illusion as if the modules are in the center.
__border-size = 5
border-top-size = ${self.__border-size}
border-top-color = ${colors.background}
border-bottom-size = ${self.__border-size}
border-bottom-color = ${colors.background}
tray-position = right
tray-padding = 1
cursor-click = pointer
; Common style between modules.
[module-common-style]
label-padding = 1
format-foreground = ${colors.background}
format-background = ${colors.foreground}
format-prefix-padding = 1
format-prefix-foreground = ${colors.module_prefix_fg}
format-prefix-background = ${colors.module_prefix_bg}
; The main bar.
[bar/fds-bar]
background = ${colors.background}
foreground = ${colors.foreground}
inherit = bar-common-style
enable-ipc = true
modules-left = bspwm
modules-center = xwindow
modules-right = pulseaudio memory eth date menu-apps counter
[module/xwindow]
y-offset = 10
type = internal/xwindow
format = <label>
label = %title:0:50:%
[module/bspwm]
type = internal/bspwm
wrapping-scroll = false
pin-workspaces = true
label-focused = %index%
label-focused-background = ${colors.module_prefix_bg}
label-focused-padding = 1
label-occupied = %index%
label-occupied-padding = 1
label-urgent = %index%!
label-urgent-background = ${colors.foreground}
label-urgent-padding = 1
label-empty = %index%
label-empty-foreground = ${colors.module_prefix_fg}
label-empty-padding = 1
[module/memory]
inherit = module-common-style
type = internal/memory
interval = 2
format-prefix = "MEM"
format-prefix-background = ${colors.memory_module_bg}
format-prefix-foreground = ${colors.foreground}
label = %gb_used%
[module/wlan]
inherit = module-common-style
type = internal/network
interface = wlp0s18f2u4
interval = 3.0
format-connected = <label-connected>
format-connected-underline = #9f78e1
format-prefix = "NET "
label-connected = %essid%
format-disconnected = <label-disconnected>
label-disconnected = disconnected
[module/eth]
inherit = module-common-style
type = internal/network
interface = enp4s0
interval = 3
format-connected-prefix = "ETH"
format-connected-prefix-padding = 1
format-connected-prefix-foreground = ${colors.foreground}
format-connected-prefix-background = ${colors.network_module_bg}
format-connected-background = ${colors.foreground}
format-connected-foreground = ${colors.background}
label-connected = "OK"
label-connected-padding = 1
format-disconnected-prefix = "ETH"
format-disconnected-prefix-padding = 1
format-disconnected-prefix-foreground = ${colors.background}
format-disconnected-prefix-background = ${colors.network_module_bg}
format-disconnected-background = ${colors.foreground}
format-disconnected-foreground = ${colors.background}
label-disconnected-padding = 1
label-disconnected = "N/A"
label-disconnected-foreground = ${colors.foreground}
[module/date]
inherit = module-common-style
type = internal/date
interval = 5
; We've formatted the time string to alter between the time and the date instead.
; Although, I feel it's a hacky workaround, it still is functional as a date module.
date = "%F"
date-alt = "%B %d, %Y"
time = %T
time-alt = %F
format-prefix = "DATE"
format-prefix-background = ${colors.date_module_bg}
format-prefix-foreground = ${colors.background}
label = %time%
[module/pulseaudio]
inherit = module-common-style
type = internal/pulseaudio
format-volume-prefix = "VOL"
format-volume-prefix-padding = 1
format-volume-prefix-foreground = ${colors.foreground}
format-volume-prefix-background = ${colors.vol_module_bg}
format-volume-foreground = ${colors.background}
format-volume-background = ${colors.foreground}
format-volume = <label-volume>
label-volume = %percentage%%
label-volume-padding = 1
format-muted-prefix = "VOL"
format-muted-prefix-padding = 1
format-muted-prefix-foreground = ${colors.foreground}
format-muted-prefix-background = ${colors.vol_module_bg}
format-muted-foreground = ${colors.background}
format-muted-background = ${colors.foreground}
label-muted = muted
label-muted-padding = 1
[settings]
screenchange-reload = true
[global/wm]
margin = 1
padding = 1
; vim:ft=dosini