dotfiles/polybar/config
foo-dogsquared 33f1588474 Revise the dotfiles
A big revision for sure. It's the result of tweaking during this outbreak.
2020-04-29 23:58:14 +08:00

190 lines
4.4 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 = ${xrdb:color0:#000}
foreground = ${xrdb:color7:#eee}
; Picked one of the popular palettes from colors.co
primary = ${xrdb:color1:#ef476f}
secondary = ${xrdb:color2:#ffd166}
tertiary = ${xrdb:color3:#06d6a0}
module_prefix_bg = ${xrdb:color1:#ccc}
module_prefix_fg = ${xrdb:color15:#000}
module_bg = ${xrdb:color15:#fff}
module_fg = ${xrdb:color0:#000}
; 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"
; Our fallback fonts are mostly used as icon fonts.
; For future references, the version of Font Awesome used here is at v5.13.0.
; I also installed the font myself that I downloaded from the official website (https://fontawesome.com/).
font-2 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid"
; 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
[module-button-style]
format-padding = 2
format-background = ${colors.primary}
format-foreground = ${colors.foreground}
; The main bar.
[bar/fds-bar]
background = ${colors.background}
foreground = ${colors.foreground}
inherit = bar-common-style
enable-ipc = true
modules-left = start-menu bspwm
modules-right = pulseaudio memory eth date
[module/start-menu]
inherit = module-button-style
type = custom/script
exec = echo ';'
click-left = rofi -show drun -sidebar-mode -theme fds-mini-sidebar
label = ""
[module/power-menu]
inherit = module-button-style
type = custom/script
exec = echo ';'
click-left = $HOME/bin/prompt "Proceed to shutdown?" "sudo -A shutdown 0"
label = ""
[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 = ""
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 = ""
label-connected = "OK"
label-connected-padding = 1
format-disconnected-prefix = ""
label-disconnected-padding = 1
label-disconnected = "N/A"
[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 = ""
label = %time%
[module/pulseaudio]
inherit = module-common-style
type = internal/pulseaudio
format-volume-prefix = ""
format-volume = <label-volume>
label-volume = %percentage%%
label-volume-padding = 1
format-muted-prefix = ""
label-muted = muted
label-muted-padding = 1
[settings]
screenchange-reload = true
[global/wm]
margin = 1
padding = 1
; vim:ft=dosini