From 9e140fdb4485975636c61473db1f2af576253738 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Fri, 15 Jul 2022 22:12:39 +0200 Subject: [PATCH] polybar: bars aufgeteilt --- polybar/config | 22 +++++++++++++++------- polybar/launch.sh | 18 +++++++++++------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/polybar/config b/polybar/config index 249fe79..414a43e 100644 --- a/polybar/config +++ b/polybar/config @@ -1,8 +1,7 @@ include-directory = /home/mg/dotfiles/polybar/conf.d -[bar/bar] -monitor = ${env:MONITOR:} -; launch.sh setzt die Variable damit die Bar auf jedem Monitor erscheint + +[bar/defaults] background = ${colors.background} foreground = ${colors.foreground} padding-left = 0 @@ -12,16 +11,25 @@ module-margin-right = 2 font-0 = fixed:pixelsize=10;1 font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 font-2 = siji:pixelsize=10;1 -modules-left = i3 -modules-center = -modules-right = alsa backlight cpu system-cpu-loadavg memory df battery time powermenu tray-position = right tray-padding = 2 - [settings] screenchange-reload = true [global/wm] margin-top = 5 margin-bottom = 5 + +[bar/oben] +inherit = bar/defaults +modules-left = i3 +modules-center = +modules-right = alsa backlight cpu system-cpu-loadavg memory df battery time powermenu + +[bar/unten] +inherit = bar/defaults +bottom = true +modules-left = +modules-center = +modules-right = alsa backlight cpu system-cpu-loadavg memory df battery time powermenu diff --git a/polybar/launch.sh b/polybar/launch.sh index 70a82ec..06b6260 100755 --- a/polybar/launch.sh +++ b/polybar/launch.sh @@ -1,9 +1,13 @@ -#!/bin/bash +#!/usr/bin/env bash + # Terminate already running bar instances killall -q polybar -# Launch bar -for m in $(polybar --list-monitors | cut -d":" -f1); do - MONITOR=$m polybar --reload --config=/home/mg/dotfiles/polybar/config bar & - # damit wird polybar für jeden monitor gestartet - # https://github.com/polybar/polybar/issues/763 - done + +export DISPLAY=:0 + +# Launch bar1 and bar2 +echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log +polybar --config=~/dotfiles/polybar/config oben 2>&1 | tee -a /tmp/polybar1.log & disown +polybar --config=~/dotfiles/polybar/config unten 2>&1 | tee -a /tmp/polybar2.log & disown + +echo "Bars launched..."