home/.config/polybar/config
2018-08-21 19:16:45 -05:00

324 lines
7.8 KiB
INI

#==================================================
#
# INFO: https://github.com/jaagr/polybar
#
#===================================================
#========================================
# RESOURCES
#========================================
[res/colors]
primary = ${xrdb:color12}
secondary = ${xrdb:color4}
alert = ${xrdb:color3}
warning = ${xrdb:color1}
icon-battery = ${xrdb:color10}
icon-cpu = ${xrdb:color12}
icon-date = ${res/colors.primary}
icon-dropbox = ${res/colors.primary}
icon-fs = ${xrdb:color11}
icon-memory = ${xrdb:color13}
icon-tor = ${xrdb:color13}
icon-volume = ${res/colors.primary}
icon-network = ${xrdb:color14}
icon-wm = ${xrdb:color12}
icon-xbacklight = ${res/colors.primary}
background = ${xrdb:background}
background-alt = ${xrdb:color8}
foreground = ${xrdb:color15}
foreground-dark = ${xrdb:color8}
border = #3c3836
bar-empty = ${self.border}
[res/config]
padding = 2
[res/fonts]
font-0 = "Inconsolata:style=Regular:size=10;2"
font-1 = "Inconsolata:style=Bold:size=10;2"
font-2 = "Inconsolata:style=Light:size=10;2"
font-3 = "Inconsolata:size=10;2"
font-4 = "Material Design Icons:size=11;3"
#========================================
# BARS
#========================================
# TEMPLATE
#====================
[template/bar]
# Rendering of the bar
height = 28
bottom = true
wm-restack = ${env:PB_WM_RESTACK:bspwm}
# Module padding and spacing
module-margin = 2
padding = ${res/config.padding}
# Tray settings
tray-maxsize = 16
# Mild cosmetics
background = ${res/colors.background}
foreground = ${res/colors.foreground}
border-color = ${res/colors.background}
border-size = 6
overline-size = 6
underline-size = 6
# 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}
# BARS
#====================
[bar/primary]
monitor = ${env:PB_MONITOR:eDP-1}
inherit = template/bar
border-top-size = 0
modules-left = ${env:PB_BAR_PRIMARY_MODULES_LEFT:battery cpu memory}
modules-center = ${env:PB_BAR_PRIMARY_MODULES_CENTER: bspwm}
modules-right = ${env:PB_BAR_PRIMARY_MODULES_RIGHT:xbacklight volume date}
[bar/primary-2]
monitor = ${env:PB_MONITOR:eDP-1}
inherit = template/bar
bottom = false
border-bottom-size = 0
modules-left = ${env:PB_BAR_PRIMARY_2_MODULES_LEFT: }
modules-center = ${env:PB_BAR_PRIMARY_2_MODULES_CENTER: }
modules-right = ${env:PB_BAR_PRIMARY_2_MODULES_RIGHT: }
[bar/secondary]
monitor = ${env:PB_MONITOR}
inherit = template/bar
border-top-size = 0
modules-left = ${env:PB_BAR_SECONDARY_MODULES_LEFT: }
modules-center = ${env:PB_BAR_SECONDARY_MODULES_CENTER: }
modules-right = ${env:PB_BAR_SECONDARY_MODULES_RIGHT:date}
[bar/secondary-2]
monitor = ${env:PB_MONITOR}
inherit = template/bar
bottom = false
border-bottom-size = 0
modules-left = ${env:PB_BAR_SECONDARY_2_MODULES_LEFT:bspwm}
modules-center = ${env:PB_BAR_SECONDARY_2_MODULES_CENTER:xwindow}
modules-right = ${env:PB_BAR_SECONDARY_2_MODULES_RIGHT:uname | hostname}
#========================================
# MODULES
#========================================
# BORDERS and WHITESPACE
#====================
[module/|]
type = custom/text
content = "|"
content-foreground = ${res/colors.background-alt}
[module/||]
type = custom/text
content = " "
content-background = ${res/colors.border}
[module/nothing]
type = custom/text
content = " "
# OTHER
#====================
[module/battery]
type = internal/battery
format-charging = <label-charging>
format-charging-prefix = "CHR: "
format-charging-prefix-foreground = ${res/colors.icon-battery}
format-discharging = <label-discharging>
format-discharging-prefix = "BAT: "
format-discharging-prefix-foreground = ${res/colors.icon-battery}
format-full = <label-full>
format-full-prefix = "BAT: "
format-full-prefix-foreground = ${res/colors.icon-battery}
time-format = %H:%M
full-at = 98
interval = 15
label-charging = %percentage:3%%
label-discharging = %percentage:3%%
label-full = %percentage:3%%
[module/bspwm]
type = internal/bspwm
format = <label-state>
enable-scroll = false
pin-workspaces = true
label-focused = %name%
label-focused-padding = ${res/config.padding}
label-focused-foreground = ${res/colors.icon-wm}
label-focused-font = 2
label-dimmed-overline = ${res/colors.background}
label-dimmed-underline = ${self.label-dimmed-overline}
label-occupied = ${self.label-focused}
label-occupied-padding = ${res/config.padding}
label-occupied-font = 2
label-urgent = ${self.label-focused}
label-urgent-padding = ${res/config.padding}
label-urgent-foreground = ${res/colors.alert}
label-urgent-font = 2
label-empty = ${self.label-focused}
label-empty-padding = ${res/config.padding}
label-empty-foreground = ${res/colors.foreground-dark}
label-empty-font = 3
[module/cpu]
type = internal/cpu
format = <label>
format-prefix = "CPU: "
format-prefix-foreground = ${res/colors.icon-cpu}
interval = 1
label = %percentage:3%%
[module/date]
type = internal/date
format = <label>
format-prefix =
format-prefix-foreground = ${res/colors.icon-date}
date = %a
time = %I:%M %p
interval = 30
label = %date% %time%
[module/eth]
type = internal/network
format-connected = <label-connected>
format-connected-prefix = "ETH: "
format-connected-prefix-foreground = ${res/colors.icon-network}
format-disconnected = <label-disconnected>
format-disconnected-prefix = "ETH: "
format-disconnected-prefix-foreground = ${res/colors.icon-network}
interface = ${env:PB_MODULE_ETH_INTERFACE:enp0s31f6}
label-connected = %local_ip%
label-disconnected = None
label-disconnected-foreground = ${res/colors.foreground-dark}
[module/fs-home]
type = internal/fs
format-mounted = <bar-used> <label-mounted>
format-mounted-prefix = "HOME: "
format-mounted-prefix-foreground = ${res/colors.icon-fs}
mount-0 = /home
label-mounted = %free:5% free
[module/hostname]
type = custom/script
format-foreground = ${res/colors.background-alt}
interval = 3600
exec = hostname
[module/memory]
type = internal/memory
format = <label>
format-prefix = "MEM: "
format-prefix-foreground = ${res/colors.icon-memory}
interval = 1
label = %percentage_used:3%%
[module/monitor]
type = custom/text
content = ${env:PB_MONITOR:eDP-1}
content-foreground = ${res/colors.background-alt}
[module/swap]
type = internal/memory
format = <label>
format-prefix = "SWP: "
format-prefix-foreground = ${res/colors.icon-memory}
interval = 1
label = %percentage_swap_used:3%%
[module/tor]
type = custom/script
format-prefix = "TOR: "
format-prefix-foreground = ${res/colors.icon-tor}
interval = 10
exec = if systemctl is-failed --quiet tor; then echo Failed, see logs for details; elif ! systemctl is-enabled --quiet tor; then echo Disabled; else echo Inactive; fi
exec-if = ! systemctl is-active tor
[module/uname]
type = custom/script
format-foreground = ${res/colors.background-alt}
interval = 3600
exec = uname -sr
[module/volume]
type = internal/volume
format-volume = <label-volume>
format-volume-prefix = "VOL: "
format-volume-prefix-foreground = ${res/colors.icon-volume}
format-muted = <label-muted>
format-muted-prefix = "VOL: "
format-muted-prefix-foreground = ${res/colors.foreground-dark}
label-volume = %percentage:3%%
label-muted = %percentage:3%%
label-muted-foreground = ${res/colors.foreground-dark}
[module/wlan]
type = internal/network
format-connected = <label-connected>
format-connected-prefix = "WLAN: "
format-connected-prefix-foreground = ${res/colors.icon-network}
format-disconnected = <label-disconnected>
format-disconnected-prefix = "WLAN: "
format-disconnected-prefix-foreground = ${res/colors.icon-network}
interface = ${env:PB_MODULE_WLAN_INTERFACE:wlp1s0}
label-connected = %local_ip%
label-disconnected = None
label-disconnected-foreground = ${res/colors.foreground-dark}
[module/xbacklight]
type = internal/xbacklight
format = <label>
format-prefix = "BRI: "
format-prefix-foreground = ${res/colors.icon-xbacklight}
label = %percentage:3%%
[module/xwindow]
type = internal/xwindow
format = <label>
label = %title:0:75:...%
# vim:ft=dosini