From 06c174a3633a50a14e157a612582b204d9fea46e Mon Sep 17 00:00:00 2001 From: VectorKappa Date: Tue, 28 Sep 2021 08:55:59 +0200 Subject: [PATCH] Polybar improvements, font fixes, added actions --- bin/runpolybaronce | 2 + polybar/.config/polybar/config | 92 ++++++++++++++++++++++++---------- 2 files changed, 68 insertions(+), 26 deletions(-) create mode 100755 bin/runpolybaronce diff --git a/bin/runpolybaronce b/bin/runpolybaronce new file mode 100755 index 0000000..0380da5 --- /dev/null +++ b/bin/runpolybaronce @@ -0,0 +1,2 @@ +#!/bin/zsh +(pgrep -f "polybar music" >/dev/null && pkill -f "polybar music") || polybar music & diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index 8e9003f..de2dd40 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -58,7 +58,7 @@ font-3 = "SauceCodePro Nerd Font Mono:size=16;4" font-4 = "SauceCodePro Nerd Font Mono:size=13;2" 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 tray-position = right @@ -69,8 +69,43 @@ wm-restack = bspwm ;override-redirect = true -scroll-up = bspwm-desknext -scroll-down = bspwm-deskprev +cursor-click = pointer +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-scroll = ns-resize @@ -124,8 +159,11 @@ label-empty = %name% label-empty-foreground = ${colors.foreground-alt} label-empty-padding = 1 +scroll-up = bspwm-desknext +scroll-down = bspwm-deskprev + ; Separator in between workspaces -; label-separator = | +#label-separator = | ws-icon-0 = Web;爵 ws-icon-1 = Terminals; ws-icon-2 = Info; @@ -137,20 +175,21 @@ ws-icon-7 = Communication; type = internal/mpd format-online = -icon-prev =  -icon-stop =  -icon-play =  -icon-pause =  -icon-next =  +click-right = ${polybar music} +icon-prev =  +icon-stop =  +icon-play =  +icon-pause =  +icon-next =  -label-song-maxlen = 25 -label-song-ellipsis = true +;label-song-maxlen = 25 +;label-song-ellipsis = true [module/xbacklight] type = internal/xbacklight format =