polybar: Use new builtin tray module

New in 3.7.
This commit is contained in:
2024-09-21 00:15:06 +02:00
parent a6aa86f2e4
commit 274549dddc
2 changed files with 3 additions and 7 deletions

View File

@@ -22,11 +22,7 @@ module-margin-right = 2
modules-left = i3 pulseaudio xbacklight battery-custom modules-left = i3 pulseaudio xbacklight battery-custom
modules-center = datetime modules-center = datetime
modules-right = media vpn wlan powermenu modules-right = media vpn wlan powermenu tray
tray-position = ${env:TRAY_POS:right}
tray-detached = false
tray-scale = 1.0
font-0 = MesloLGS NF:style=Regular:size=18;4 font-0 = MesloLGS NF:style=Regular:size=18;4
; used for the dots in module/powermenu ; used for the dots in module/powermenu
@@ -170,3 +166,5 @@ click-left = ${env:POLYBAR_BLUETOOTH_CLICK_LEFT}
type = custom/text type = custom/text
content = ${env:POLYBAR_POWERMENU} content = ${env:POLYBAR_POWERMENU}
[module/tray]
type = internal/tray

View File

@@ -23,8 +23,6 @@ if ! pgrep -ax polybar >/dev/null 2>&1; then
# launch Polybar on every monitor # launch Polybar on every monitor
# https://github.com/polybar/polybar/issues/763 # https://github.com/polybar/polybar/issues/763
while read m; do while read m; do
export TRAY_POS=none
[[ "${m%(primary)}" == "$m" ]] || export TRAY_POS=right
export MONITOR="${m%%:*}" export MONITOR="${m%%:*}"
polybar --reload -c "$BASE_DIR/config" main & polybar --reload -c "$BASE_DIR/config" main &
done <<<$(polybar --list-monitors) done <<<$(polybar --list-monitors)