home/.config/polybar/config

363 lines
8.7 KiB
Plaintext
Raw Normal View History

2017-09-05 18:41:31 -05:00
#==================================================
#
# INFO: https://github.com/jaagr/polybar
#
#===================================================
#========================================
# RESOURCES
#========================================
[res/colors]
primary = ${xrdb:color12}
secondary = ${xrdb:color4}
alert = ${xrdb:color3}
2018-05-09 00:36:42 -05:00
warning = ${xrdb:color1}
2018-09-15 12:36:05 -05:00
mod-battery = ${xrdb:color10}
mod-cpu = ${xrdb:color12}
mod-date = ${self.primary}
2018-09-15 12:36:05 -05:00
mod-fs = ${xrdb:color11}
mod-memory = ${xrdb:color13}
mod-tor = ${xrdb:color13}
mod-volume = ${self.primary}
2018-09-15 12:36:05 -05:00
mod-network = ${xrdb:color14}
mod-wm = ${xrdb:color12}
mod-xbacklight = ${self.primary}
2018-05-06 01:45:35 -05:00
2018-09-15 12:35:04 -05:00
notif-package = ${self.foreground-dark}
background = ${xrdb:background}
background-alt = ${xrdb:bg2}
foreground = ${xrdb:color15}
foreground-dark = ${xrdb:color8}
2018-05-18 19:22:00 -05:00
border = #3c3836
bar-empty = ${self.border}
2017-07-30 00:04:04 -05:00
2018-01-18 14:57:31 -06:00
[res/config]
padding = 2
padding-bar = 3
2018-01-18 14:57:31 -06:00
[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"
2017-07-30 17:24:27 -05:00
2017-09-05 18:41:31 -05:00
#========================================
# BARS
#========================================
2017-07-30 17:24:27 -05:00
2017-09-05 18:41:31 -05:00
# TEMPLATE
#====================
2017-07-30 17:24:27 -05:00
[template/bar]
# General ordering
2018-05-18 00:23:19 -05:00
bottom = true
2018-01-31 12:47:48 -06:00
wm-restack = ${env:PB_WM_RESTACK:bspwm}
offset-y = 2
2017-07-30 17:24:27 -05:00
# Tray settings
tray-maxsize = 16
# Colors
background = ${res/colors.background}
foreground = ${res/colors.foreground}
border-color = ${res/colors.background-alt}
# Whitespace
height = 36
padding = ${res/config.padding-bar}
border-top-size = ${env:PB_BAR_BORDER_SIZE:2}
overline-size = 6
underline-size = 6
# Module whitespace
module-margin = 2
2017-09-05 18:41:31 -05:00
# Module fonts
font-0 = ${res/fonts.font-0}
font-1 = ${res/fonts.font-1}
2018-05-06 01:45:35 -05:00
font-2 = ${res/fonts.font-2}
font-3 = ${res/fonts.font-3}
font-4 = ${res/fonts.font-4}
2017-07-30 17:24:27 -05:00
2017-09-05 18:41:31 -05:00
# BARS
#====================
2018-05-18 00:20:20 -05:00
[bar/primary]
2018-05-06 02:15:38 -05:00
monitor = ${env:PB_MONITOR:eDP-1}
inherit = template/bar
modules-left = ${env:PB_BAR_PRIMARY_MODULES_LEFT:battery cpu memory}
modules-center = ${env:PB_BAR_PRIMARY_MODULES_CENTER:i3 bspwm}
modules-right = ${env:PB_BAR_PRIMARY_MODULES_RIGHT:tor xbacklight volume wlan eth date}
[bar/primary-2]
monitor = ${env:PB_MONITOR:eDP-1}
inherit = template/bar
bottom = false
border-top-size = 0
border-bottom-size = ${env:PB_BAR_BORDER_SIZE:2}
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: }
2018-05-18 00:20:20 -05:00
[bar/secondary]
2018-01-20 13:56:55 -06:00
monitor = ${env:PB_MONITOR}
inherit = template/bar
modules-left = ${env:PB_BAR_SECONDARY_MODULES_LEFT:uname hostname}
modules-center = ${env:PB_BAR_SECONDARY_MODULES_CENTER:i3 bspwm}
modules-right = ${env:PB_BAR_SECONDARY_MODULES_RIGHT:date}
[bar/secondary-2]
monitor = ${env:PB_MONITOR}
inherit = template/bar
bottom = false
border-top-size = 0
border-bottom-size = ${env:PB_BAR_BORDER_SIZE:2}
modules-left = ${env:PB_BAR_SECONDARY_2_MODULES_LEFT: }
modules-center = ${env:PB_BAR_SECONDARY_2_MODULES_CENTER: }
modules-right = ${env:PB_BAR_SECONDARY_2_MODULES_RIGHT: }
2017-09-05 18:41:31 -05:00
#========================================
# MODULES
#========================================
2017-07-30 00:04:04 -05:00
# BORDERS and WHITESPACE
2017-09-05 18:41:31 -05:00
#====================
[module/|]
2017-07-30 00:04:04 -05:00
type = custom/text
2018-06-19 21:02:54 -05:00
content = "|"
content-foreground = ${res/colors.background-alt}
2018-05-18 19:22:00 -05:00
[module/||]
type = custom/text
content = " "
2018-05-18 19:22:00 -05:00
content-background = ${res/colors.border}
[module/nothing]
type = custom/text
content = " "
2018-09-15 12:35:04 -05:00
# NOTIFICATION
#====================
[module/dpkg]
type = custom/script
format = <label>
format-foreground = ${res/colors.notif-package}
interval = 1
exec = printf "DPKG\n"
exec-if = [ -f /var/lib/dpkg/lock ]
# OTHER
2017-09-05 18:41:31 -05:00
#====================
2018-09-15 12:35:04 -05:00
[module/battery]
type = internal/battery
format-charging = <label-charging>
format-charging-prefix = "CHR: "
2018-09-15 12:36:05 -05:00
format-charging-prefix-foreground = ${res/colors.mod-battery}
format-discharging = <label-discharging>
format-discharging-prefix = "BAT: "
2018-09-15 12:36:05 -05:00
format-discharging-prefix-foreground = ${res/colors.mod-battery}
format-full = <label-full>
format-full-prefix = "BAT: "
2018-09-15 12:36:05 -05:00
format-full-prefix-foreground = ${res/colors.mod-battery}
time-format = %H:%M
full-at = 100
interval = 15
label-charging = %percentage:3%%
label-discharging = %percentage:3%%
label-full = %percentage:3%%
2018-05-06 01:45:35 -05:00
[module/bspwm]
type = internal/bspwm
format = <label-state>
enable-scroll = false
pin-workspaces = true
label-focused = %name%
2018-05-06 01:45:35 -05:00
label-focused-padding = ${res/config.padding}
2018-09-15 12:36:05 -05:00
label-focused-foreground = ${res/colors.mod-wm}
label-focused-font = 2
label-dimmed-overline = ${res/colors.background}
label-dimmed-underline = ${self.label-dimmed-overline}
2018-05-06 01:45:35 -05:00
label-occupied = ${self.label-focused}
label-occupied-padding = ${res/config.padding}
label-occupied-font = 2
2018-05-06 01:45:35 -05:00
label-urgent = ${self.label-focused}
label-urgent-padding = ${res/config.padding}
label-urgent-foreground = ${res/colors.alert}
label-urgent-font = 2
2018-05-06 01:45:35 -05:00
label-empty = ${self.label-focused}
label-empty-padding = ${res/config.padding}
label-empty-foreground = ${res/colors.foreground-dark}
label-empty-font = 3
2018-05-06 01:45:35 -05:00
[module/cpu]
type = internal/cpu
format = <label>
format-prefix = "CPU: "
2018-09-15 12:36:05 -05:00
format-prefix-foreground = ${res/colors.mod-cpu}
interval = 1
label = %percentage:3%%
2017-08-23 01:11:13 -05:00
2017-07-30 00:04:04 -05:00
[module/date]
type = internal/date
format = <label>
format-prefix =
2018-09-15 12:36:05 -05:00
format-prefix-foreground = ${res/colors.mod-date}
2017-07-30 19:49:39 -05:00
date = %a
time = %I:%M %p
2017-09-01 22:54:22 -05:00
interval = 30
label = %date% %time%
2017-07-30 00:04:04 -05:00
[module/eth]
type = internal/network
format-connected = <label-connected>
format-connected-prefix = "ETH: "
2018-09-15 12:36:05 -05:00
format-connected-prefix-foreground = ${res/colors.mod-network}
format-disconnected = ETH
format-disconnected-foreground = ${res/colors.foreground-dark}
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: "
2018-09-15 12:36:05 -05:00
format-mounted-prefix-foreground = ${res/colors.mod-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/i3]
type = internal/i3
format = <label-state> <label-mode>
enable-scroll = false
pin-workspaces = true
label-focused = %name%
label-focused-padding = ${res/config.padding}
label-focused-foreground = ${res/colors.mod-wm}
label-focused-font = 2
label-unfocused = ${self.label-focused}
label-unfocused-padding = ${res/config.padding}
label-unfocused-font = 2
label-visible = ${self.label-focused}
label-visible-foreground = ${res/colors.foreground-dark}
label-visible-padding = ${res/config.padding}
label-visible-font = 2
label-urgent = ${self.label-focused}
label-urgent-padding = ${res/config.padding}
label-urgent-foreground = ${res/colors.alert}
label-urgent-font = 2
label-mode = %mode%
[module/memory]
type = internal/memory
format = <label>
format-prefix = "MEM: "
2018-09-15 12:36:05 -05:00
format-prefix-foreground = ${res/colors.mod-memory}
interval = 1
2017-07-30 00:04:04 -05:00
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: "
2018-09-15 12:36:05 -05:00
format-prefix-foreground = ${res/colors.mod-memory}
interval = 1
label = %percentage_swap_used:3%%
2018-07-30 13:28:38 -05:00
[module/tor]
type = custom/script
format-prefix = "TOR: "
2018-09-15 12:36:05 -05:00
format-prefix-foreground = ${res/colors.mod-tor}
2018-07-30 13:28:38 -05:00
interval = 10
exec = if systemctl is-failed --quiet tor; then echo FAIL; elif ! systemctl is-enabled --quiet tor; then echo DISB; else echo INAC; fi
2018-07-30 13:28:38 -05:00
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: "
2018-09-15 12:36:05 -05:00
format-volume-prefix-foreground = ${res/colors.mod-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%%
2018-05-17 16:25:03 -05:00
label-muted-foreground = ${res/colors.foreground-dark}
[module/wlan]
type = internal/network
format-connected = <label-connected>
format-connected-prefix = "WLAN: "
2018-09-15 12:36:05 -05:00
format-connected-prefix-foreground = ${res/colors.mod-network}
format-disconnected = WLAN
format-disconnected-foreground = ${res/colors.foreground-dark}
interface = ${env:PB_MODULE_WLAN_INTERFACE:wlp1s0}
label-connected = %local_ip%
label-disconnected = None
2018-05-17 16:25:03 -05:00
label-disconnected-foreground = ${res/colors.foreground-dark}
2018-05-06 01:45:35 -05:00
[module/xbacklight]
type = internal/xbacklight
format = <label>
format-prefix = "BRI: "
2018-09-15 12:36:05 -05:00
format-prefix-foreground = ${res/colors.mod-xbacklight}
label = %percentage:3%%
[module/xwindow]
type = internal/xwindow
2018-05-08 23:31:12 -05:00
format = <label>
label = %title:0:75:...%
2017-09-05 18:41:31 -05:00
# vim:ft=dosini