Files
dots/files/.config/polybar/config
Marco Thomas abba8b21cf Adjust polybar
2022-01-05 00:50:41 +01:00

168 lines
3.1 KiB
Plaintext

[colors]
white = #ffffff
black = #5c6773
green = #a6cc70
red = #ff3333
[bar/bar]
font-0 = "JuliaMono:pixelsize=10;4"
font-1 = "Noto Sans Mono CJK JP:pixelsize=10;3"
font-2 = "FontAwesome:pixelsize=10;4"
monitor = ${env:MON}
scroll-up = i3wm-wsprev
scroll-down = i3wm-wsnext
fixed-center = true
width = 100%
height = 50
dpi = ${xrdb:Xft.dpi:-1}
background = ${colors.white}
foreground = ${colors.black}
bottom = false
screenchange-reload = true
tray-position = right
tray-scale = 1.0
tray-maxsize = 25
line-size = 4
padding-left = 1
padding-right = 1
module-margin = 2
modules-left = logo i3 polywins spotify
modules-center =
modules-right = backlight pulseaudio battery conservation date time
[module/i3]
strip-wsnumbers = true
pin-workspaces = true
index-sort = true
wrapping-scroll = false
type = internal/i3
format = <label-state> <label-mode>
ws-icon-0 = 1;一
ws-icon-1 = 2;二
ws-icon-2 = 3;三
ws-icon-3 = 4;四
ws-icon-4 = 5;五
ws-icon-5 = 6;六
ws-icon-6 = 7;七
ws-icon-7 = 8;八
ws-icon-8 = 9;九
ws-icon-9 = 10;十
label-focused = %icon%
label-focused-background = ${colors.green}
label-focused-padding = 1
label-unfocused = %icon%
label-unfocused-padding = 1
label-visible = %icon%
label-visible-padding = 1
label-urgent = %icon%
label-urgent-overline = ${colors.red}
label-urgent-padding = 1
[module/date]
type = internal/date
interval = 1.0
date =  %a, %d %b
[module/time]
type = internal/date
interval = 1.0
date =  %H:%M
[module/pulseaudio]
type = internal/pulseaudio
sink = master
use-ui-max = true
interval = 5
format-volume =  <label-volume>
format-muted-foreground = ${colors.red}
label-muted =  Muted
click-right = pavucontrol
[module/title]
type = internal/xwindow
format-padding = 1
label-maxlen = 100
[module/logo]
type = custom/text
content = "花"
content-padding = 1
[module/battery]
type = internal/battery
battery = BAT1
adapter = ADP1
time-format = %H:%M
# charging
format-charging = <ramp-capacity> <label-charging>
label-charging = %percentage%% 
# discharging
format-discharging = <ramp-capacity> <label-discharging>
label-discharging = %percentage%% - %time%
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
# full
label-full =  100%
[module/conservation]
type = custom/script
exec = if [ /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode ]; then echo "On"; else echo "Off"; fi
click-left = alacritty --command ~/dots/scripts/conservation_mode.sh
format = <label>
label =  %output%
tail = true
[module/backlight]
type = internal/backlight
card = intel_backlight
format = <ramp> <label>
label = %percentage%
ramp-0 = 
ramp-1 = 
[module/polywins]
type = custom/script
exec = ~/dots/scripts/polywins.sh 2>/dev/null
format = <label>
label = %output%
tail = true
[module/spotify]
type = custom/script
interval = 1
format =  <label>
#exec = python3 ~/dots/scripts/spotify.py -f '{play_pause} {artist}: {song}' --font=2
exec = python3 ~/dots/scripts/spotify.py -f '{artist}: {song}'
click-left = playerctl play-pause
click-right = playerctl next
click-middle = playerctl previous