Rerice polybar with custom script and glyphs

This commit is contained in:
Ferit Yiğit BALABAN 2022-04-19 23:43:23 +03:00
parent 3bb0495477
commit 2dafd063e1

View File

@ -5,12 +5,12 @@ import sys
def main(): def main():
primary_color = '#FF93A0' primary_color = '#c38ccf'
prc_frmstring = f'F{primary_color}' prc_frmstring = f'F{primary_color}'
prc_fwrappers = f'{{{prc_frmstring}}}' prc_fwrappers = f'{{{prc_frmstring}}}'
backg_colour = '#282A2E' backg_colour = '#0f0f14'
backg_clralt = '#373B41' backg_clralt = '#0f0f14'
foreg_colour = '#C5C8C6' foreg_colour = '#FFEBFF'
interface_wlan = 'wlp3s0' interface_wlan = 'wlp3s0'
interface_ethr = 'enp2s0' interface_ethr = 'enp2s0'
@ -28,7 +28,8 @@ def main():
width = 100% width = 100%
height = 2.5% height = 2.5%
radius = 0 radius = 0
font-0 = "JetBrainsMono;2" font-0 = "JetBrainsMono Nerd Font;2"
font-1 = "IPAGothic"
background = ${{colors.background}} background = ${{colors.background}}
foreground = ${{colors.foreground}} foreground = ${{colors.foreground}}
@ -41,36 +42,34 @@ def main():
padding-right = 1 padding-right = 1
module-margin = 1 module-margin = 1
separator = separator = |
separator-foreground = ${{colors.disabled}} separator-foreground = ${{colors.disabled}}
modules-left = xworkspaces music
modules-left = xworkspaces xwindow modules-center = arch xwindow
modules-center = date modules-right = aud bat mem cpu temp wlan eth date
modules-right = aud bat mem cpu temp wlan eth
cursor-click = pointer cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true enable-ipc = true
; tray-position = right [module/music]
type = custom/script
exec = /home/ferit/scripts/nowplaying.py
tail = true
interval = 2
; wm-restack = generic [module/arch]
; wm-restack = bspwm type = custom/text
; wm-restack = i3 content = ""
content-foreground = {primary_color}
; override-redirect = true
[module/xworkspaces] [module/xworkspaces]
type = internal/xworkspaces type = internal/xworkspaces
label-active =
label-active =
label-active-foreground = ${{colors.primary}} label-active-foreground = ${{colors.primary}}
label-active-background = ${{colors.background-alt}} label-active-background = ${{colors.background-alt}}
label-active-underline= ${{colors.primary}} label-active-underline= ${{colors.primary}}
label-active-padding = 1 label-active-padding = 1
label-occupied = label-occupied =
label-occupied-padding = 1 label-occupied-padding = 1
label-urgent = label-urgent =
@ -83,15 +82,15 @@ def main():
[module/xwindow] [module/xwindow]
type = internal/xwindow type = internal/xwindow
label = %title:0:30:...% label = %title:0:31:...%
[module/aud] [module/aud]
type = internal/pulseaudio type = internal/pulseaudio
format-volume-prefix = "VOL " format-volume-prefix = " "
format-volume-prefix-foreground = ${{colors.primary}} format-volume-prefix-foreground = ${{colors.primary}}
format-volume = <label-volume> format-volume = <label-volume>
label-volume = %percentage%% label-volume = %percentage%%
label-muted = MUT label-muted =
label-muted-foreground = ${{colors.disabled}} label-muted-foreground = ${{colors.disabled}}
[module/bat] [module/bat]
@ -101,24 +100,43 @@ def main():
adapter = ADP0 adapter = ADP0
poll-interval = 5 poll-interval = 5
format-charging = %{prc_fwrappers}CHR%{{F-}} <label-charging> ramp-capacity-0 =
format-discharging = %{prc_fwrappers}DIS%{{F-}} <label-discharging> ramp-capacity-1 =
format-full = %{prc_fwrappers}FULL%{{F-}} ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
ramp-capacity-5 =
ramp-capacity-6 =
ramp-capacity-7 =
ramp-capacity-8 =
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-4 =
animation-charging-5 =
animation-charging-6 =
animation-charging-framerate = 750
format-charging = %{prc_fwrappers}<animation-charging>%{{F-}} <label-charging>
format-discharging = %{prc_fwrappers}<ramp-capacity>%{{F-}} <label-discharging>
format-full = %{prc_fwrappers}%{{F-}} <label-full>
label-full = %percentage%%
label-charging = %percentage%% label-charging = %percentage%%
label-discharging = %percentage%% label-discharging = %percentage%%
[module/mem] [module/mem]
type = internal/memory type = internal/memory
interval = 2 interval = 2
format-prefix = "RAM " format-prefix = " "
format-prefix-foreground = ${{colors.primary}} format-prefix-foreground = ${{colors.primary}}
label = %percentage_used%% label = %percentage_used%%
[module/cpu] [module/cpu]
type = internal/cpu type = internal/cpu
interval = 2 interval = 2
format-prefix = "CPU " format-prefix = " "
format-prefix-foreground = ${{colors.primary}} format-prefix-foreground = ${{colors.primary}}
label = %percentage%% label = %percentage%%
@ -127,7 +145,7 @@ def main():
interval = 10 interval = 10
thermal-zone = 0 thermal-zone = 0
hwmon-path = /sys/class/hwmon/hwmon1/temp1_input hwmon-path = /sys/class/hwmon/hwmon1/temp1_input
format-prefix = "TEMP " format-prefix = " "
format-prefix-foreground = ${{colors.primary}} format-prefix-foreground = ${{colors.primary}}
label = %temperature-c% label = %temperature-c%
@ -137,8 +155,8 @@ def main():
interface = {interface_wlan} interface = {interface_wlan}
label-connected = %essid% label-connected = %essid%
label-disconnected = label-disconnected =
format-connected = <label-connected> format-connected = %{prc_fwrappers}%{{F-}} <label-connected>
format-disconnected = <label-disconnected> format-disconnected = %{prc_fwrappers}%{{F-}} <label-disconnected>
[module/eth] [module/eth]
type = internal/network type = internal/network
@ -146,13 +164,14 @@ def main():
interface = {interface_ethr} interface = {interface_ethr}
label-connected = UP label-connected = UP
label-disconnected = label-disconnected =
format-connected = <label-connected> format-connected = %{prc_fwrappers}%{{F-}} <label-connected>
format-disconnected = <label-disconnected> format-disconnected = <label-disconnected>
[module/date] [module/date]
type = internal/date type = internal/date
interval = 60 interval = 60
date = %d-%m-%Y %H:%M date = %H.%M
date-alt = %d/%m/%y
label = %date% label = %date%
label-foreground = ${{colors.primary}} label-foreground = ${{colors.primary}}