Polybar improvements, font fixes, added actions

This commit is contained in:
2021-09-28 08:55:59 +02:00
parent 0e0a5b4fce
commit 06c174a363
2 changed files with 68 additions and 26 deletions

2
bin/runpolybaronce Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/zsh
(pgrep -f "polybar music" >/dev/null && pkill -f "polybar music") || polybar music &

View File

@@ -58,7 +58,7 @@ font-3 = "SauceCodePro Nerd Font Mono:size=16;4"
font-4 = "SauceCodePro Nerd Font Mono:size=13;2" font-4 = "SauceCodePro Nerd Font Mono:size=13;2"
modules-left = rofi bspwm modules-left = rofi bspwm
modules-center = mpd title modules-center = mpd_icon title
modules-right = xkeyboard xbacklight pulseaudio memory cpu wlan eth battery temperature date powermenu modules-right = xkeyboard xbacklight pulseaudio memory cpu wlan eth battery temperature date powermenu
tray-position = right tray-position = right
@@ -69,8 +69,43 @@ wm-restack = bspwm
;override-redirect = true ;override-redirect = true
scroll-up = bspwm-desknext cursor-click = pointer
scroll-down = bspwm-deskprev cursor-scroll = ns-resize
[bar/music]
monitor = ${env:MONITOR:}
width = 66.6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666%
height = 27
offset-x = 17.66%
offset-y = 35
radius = 10
fixed-center = true
foreground = ${colors.background}
background = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 2
padding-right = 2
module-margin-left = 1
module-margin-right = 1
font-0 = "SauceCodePro Nerd Font Mono:size=10"
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
font-3 = "SauceCodePro Nerd Font Mono:size=16;4"
font-4 = "SauceCodePro Nerd Font Mono:size=13;2"
modules-center = mpd
modules-right = pulseaudio
override-redirect = true
cursor-click = pointer cursor-click = pointer
cursor-scroll = ns-resize cursor-scroll = ns-resize
@@ -124,8 +159,11 @@ label-empty = %name%
label-empty-foreground = ${colors.foreground-alt} label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 1 label-empty-padding = 1
scroll-up = bspwm-desknext
scroll-down = bspwm-deskprev
; Separator in between workspaces ; Separator in between workspaces
; label-separator = | #label-separator = |
ws-icon-0 = Web;爵 ws-icon-0 = Web;爵
ws-icon-1 = Terminals; ws-icon-1 = Terminals;
ws-icon-2 = Info; ws-icon-2 = Info;
@@ -137,20 +175,21 @@ ws-icon-7 = Communication;
type = internal/mpd type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next> format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev =  click-right = ${polybar music}
icon-stop = icon-prev =
icon-play = icon-stop =
icon-pause = icon-play =
icon-next = icon-pause =
icon-next = 
label-song-maxlen = 25 ;label-song-maxlen = 25
label-song-ellipsis = true ;label-song-ellipsis = true
[module/xbacklight] [module/xbacklight]
type = internal/xbacklight type = internal/xbacklight
format = <label> <bar> format = <label> <bar>
label = label = %{T5}盛%{T-}
bar-width = 10 bar-width = 10
bar-indicator = | bar-indicator = |
@@ -197,7 +236,7 @@ label-empty =
[module/memory] [module/memory]
type = internal/memory type = internal/memory
interval = 2 interval = 2
format-prefix = " " format-prefix = %{T5} %{T-}
format-prefix-foreground = ${colors.foreground-alt} format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc format-underline = #4bffdc
label = %percentage_used%% label = %percentage_used%%
@@ -207,13 +246,13 @@ type = internal/network
interface = wlp3s0 interface = wlp3s0
interval = 3.0 interval = 3.0
format-connected = <ramp-signal> <label-connected> format-connected = %{A1:alacritty -e nmtui &:}<ramp-signal> <label-connected>%{A}
format-connected-underline = #9f78e1 format-connected-underline = #9f78e1
label-connected = %essid% label-connected = %essid%
;animation-connected-0 = %local_ip% ;animation-connected-0 = %local_ip%
;animation-connected-1 = %essid% ;animation-connected-1 = %essid%
;animation-connected-framerate=1000 ;animation-connected-framerate=1000
format-disconnected = format-disconnected =%{A1:alacritty -e nmtui &:}%{T4} 睊%{A}
;format-disconnected = <label-disconnected> ;format-disconnected = <label-disconnected>
format-disconnected-underline = ${self.format-connected-underline} format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected ;label-disconnected = %ifname% disconnected
@@ -228,7 +267,6 @@ ramp-signal-5 = ▆
ramp-signal-6 = ▇ ramp-signal-6 = ▇
ramp-signal-7 = █ ramp-signal-7 = █
ramp-signal-foreground = ${colors.foreground-alt} ramp-signal-foreground = ${colors.foreground-alt}
[module/eth] [module/eth]
type = internal/network type = internal/network
interface = enp0s25 interface = enp0s25
@@ -255,7 +293,7 @@ date-alt = " %Y-%m-%d"
time = %H:%M time = %H:%M
time-alt = %H:%M:%S time-alt = %H:%M:%S
format-prefix = format-prefix = %{T5}%{T-}
format-prefix-foreground = ${colors.foreground-alt} format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5 format-underline = #0a6cf5
@@ -265,10 +303,10 @@ label = %date% %time%
type = internal/pulseaudio type = internal/pulseaudio
format-volume = <label-volume> <bar-volume> format-volume = <label-volume> <bar-volume>
label-volume = %percentage%% label-volume = %{T5}墳%{T-} %percentage%%
label-volume-foreground = ${root.foreground} label-volume-foreground = ${root.foreground}
label-muted = 🔇 muted label-muted = muted
label-muted-foreground = #666 label-muted-foreground = #666
bar-volume-width = 10 bar-volume-width = 10
@@ -353,12 +391,6 @@ animation-charging-3 = 
animation-charging-foreground = ${colors.foreground-alt} animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750 animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature] [module/temperature]
type = internal/temperature type = internal/temperature
thermal-zone = 0 thermal-zone = 0
@@ -409,15 +441,23 @@ menu-2-0-exec = sudo poweroff
menu-2-1 = cancel menu-2-1 = cancel
menu-2-1-exec = menu-open-0 menu-2-1-exec = menu-open-0
[module/mpd_icon]
type = custom/text
click-left = runpolybaronce
content = 
content-font = 4
;content-underline = #0a6cf5
[module/rofi] [module/rofi]
type = custom/text type = custom/text
click-left = xlunch --input /etc/xlunch/entries.dsv --bc 2e3440aa >> /tmp/xlunchlog.log 2>&1 click-left = xlunch --input /etc/xlunch/entries.dsv --bc 2e3440aa >> /tmp/xlunchlog.log 2>&1
;click-left = rofi -modi drun,run,window,calc -show drun
content =  content = 
content-padding = 1 content-padding = 1
content-background = #BF616A content-background = #BF616A
content-foreground = #2E3440 content-foreground = #2E3440
content-font = 4 content-font = 4
[settings] [settings]
screenchange-reload = true screenchange-reload = true
;compositing-background = xor ;compositing-background = xor