dotfiles/.config/polybar/config
Marty Oehme a06890122c Change polybar font order
Will try to use Comic Neue for display, if that is not found will switch
to Noto Sans. For icon display, it then switches to Iosevka Nerd Font
enlarged, to better display icons.
2019-12-03 10:33:30 +01:00

256 lines
8 KiB
INI

;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[settings]
; The throttle settings lets the eventloop swallow up til X events
; if they happen within Y millisecond after first event was received.
; This is done to prevent flood of update event.
;
; For example if 5 modules emit an update event at the same time, we really
; just care about the last one. But if we wait too long for events to swallow
; the bar would appear sluggish so we continue if timeout
; expires or limit is reached.
throttle-output = 5
throttle-output-for = 10
; Time in milliseconds that the input handler will wait between processing events
throttle-input-for = 30
[global/wm]
margin-top = 0
margin-bottom = 0
[bar/simple-top]
; Put the bar at the bottom of the screen
bottom=false
width = 100%
height = 25
padding-left = 0
padding-right = 0
module-margin-left = 2
modules-left = workspaces
modules-center = mprisdisplay
modules-right = networkspeed archupdates cpu temp date backlight volume
; do not use offsets for the bar, would only work with override-redirect
; and will mess up tray https://github.com/polybar/polybar/issues/1355
tray-position = right
; Basic Colors, defined further up
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 2
line-color = ${colors.primary}
; Prefer fixed center position for the `modules-center` block.
; The center block will stay in the middle of the bar whenever
; possible. It can still be pushed around if other blocks need
; more space.
; When false, the center block is centered in the space between
; the left and right block.
fixed-center = true
; Fonts are defined using <font-name>;<vertical-offset>
; Font names are specified using a fontconfig pattern.
; font-0 = NotoSans-Regular:size=8;2
; font-1 = MaterialIcons:size=10
; font-2 = Termsynu:size=8;-1
; font-3 = FontAwesome:size=10
; See the Fonts wiki page for more details
font-0 = Comic Neue
font-1 = NotoSans
font-2 = Iosevka:size=18
cursor-click = pointer
[module/workspaces]
; module type
type = internal/i3
; default formatting
format = <label-mode><label-state>
; removes numbers for workspaces which have distinct names / icons
strip-wsnumbers = true
ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;4
ws-icon-4 = 5;5
ws-icon-5 = 6;6
ws-icon-6 = 7;7
ws-icon-7 = 8;8
ws-icon-8 = 9;
ws-icon-9 = 10;
ws-icon-default =
; Available tokens:
; %name%
; %icon%
; %index%
; %output%
; Default: %icon% %name%
; unfocused = Inactive workspace on any monitor
label-unfocused = %icon%
label-unfocused-padding = 4
label-unfocused-underline = ${colors.background-alt}
; focused = Active workspace on focused monitor
label-focused = %icon%
label-focused-foreground = ${colors.foreground}
label-focused-background = ${colors.background-alt}
label-focused-underline = ${colors.primary}
label-focused-padding = ${self.label-unfocused-padding}
; visible = Active workspace on unfocused monitor
label-visible = %icon%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-unfocused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %icon%
label-urgent-background = ${colors.alert}
label-urgent-padding = ${self.label-unfocused-padding}
; formatting of the mode display
label-mode = %mode%
label-mode-padding = ${self.label-unfocused-padding}
label-mode-foreground = ${colors.background}
label-mode-background = ${colors.primary}
[module/cpu]
; module type
type = internal/cpu
; Seconds to sleep between updates
interval = 1.0
; Available tags:
; <label> (default)
; <bar-load>
; <ramp-load>
; <ramp-coreload>
format = <ramp-load>
; Available tokens:
; %percentage% (default) - total cpu load averaged over all cores
; %percentage-sum% - Cumulative load on all cores
; %percentage-cores% - load percentage for each core
; %percentage-core[1-9]% - load percentage for specific core
label =
; enable large icon font
label-font = 2
; Spacing between individual per-core ramps
ramp-load-0 =
ramp-load-1 = %{F#ffe5e5}▂%{F-}
ramp-load-2 = %{F#ffcccc}▃%{F-}
ramp-load-3 = %{F#ffb2b2}▄%{F-}
ramp-load-4 = %{F#ff9999}▅%{F-}
ramp-load-5 = %{F#ff6666}▆%{F-}
ramp-load-6 = %{F#ff3232}▇%{F-}
ramp-load-7 = %{F#ff0000}█%{F-}
[module/temp]
type = internal/temperature
; Seconds to sleep between updates
interval = 1.0
; Thermal zone to use
; To list all the zone types, run
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
; Default: 0
thermal-zone = 0
; Use `sensors` to find preferred temperature source, then run
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
; hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_input
; Base temperature for where to start the ramp (in degrees celsius)
base-temperature = 40
; Threshold temperature to display warning label (in degrees celsius)
warn-temperature = 70
units = true
format = <ramp>
format-warn = <ramp> <label-warn>
label-warn = %temperature-c%
label-warn-foreground = ${colors.alert}
ramp-0 =
ramp-1 = %{F#ff9999}ﲲﲲ%{F-}
ramp-2 = %{F#ff0000}ﲲﲲﲲ%{F-}
[module/date]
type = internal/date
; Seconds to sleep between updates
interval = 1.0
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
; NOTE: if you want to use syntax tags here you need to use %%{...}
date = %d/%m
; Optional time format
time = %H:%M
; if `date-alt` or `time-alt` is defined, clicking
; the module will toggle between formats
date-alt = %A, %d %B %Y
time-alt = %H:%M
label = %date% %{T2}%{T-}%time%
[module/archupdates]
type = custom/script
exec = $XDG_CONFIG_HOME/polybar/scripts/poly-archupdates
interval = 600
format = <label>
format-foreground = ${colors.primary}
label = %output%
[module/networkspeed]
type = custom/script
exec = $XDG_CONFIG_HOME/polybar/scripts/poly-networkspeed
tail = true
[module/mprisdisplay]
type = custom/script
exec = $XDG_CONFIG_HOME/polybar/scripts/poly-mprisdisplay
interval = 3
click-left = playerctl play-pause &
; TODO: add album art display (on click?) - retrieved by playerctl metadata mpris:artUrl
[module/volume]
type = internal/pulseaudio
; Available tags:
; <label-volume> (default)
; <ramp-volume>
; <bar-volume>
format-volume = <ramp-volume>
; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false
use-ui-max = false
label-muted =
label-muted-foreground = ${colors.foreground-alt}
; Only applies if <ramp-volume> is used
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-3 =
[module/backlight]
type = internal/xbacklight
format = <label>
; vim:ft=dosini