Updated polybar to run on all monitors

This commit is contained in:
Random936 2025-04-28 15:59:20 -07:00
parent 6bf4a7deff
commit 3e3e8034d4
5 changed files with 12 additions and 1 deletions

View File

@ -159,6 +159,5 @@ client.unfocused #333333 #222222 #888888 #292d2e #eeeeee
#exec "xautolock -detectsleep -time 30 -locker i3lock-fancy"
# Startup Applications
exec_always --no-startup-id "killall polybar; polybar" # status bar
exec --no-startup-id "$HOME/.screenlayout/launch.sh &" # setup screen layout and wallpapers
exec --no-startup-id "$HOME/.scripts/autostart_desktop.sh &" # run autostart desktop apps

View File

@ -11,6 +11,7 @@ disabled = #707880
width = 100%
height = 24pt
radius = 6
monitor = ${env:MONITOR:}
; dpi = 96

View File

@ -10,3 +10,4 @@ function load_script() {
load_script "$HOME/.screenlayout/wallpapers.sh"
load_script "$HOME/.screenlayout/layout.sh"
load_script "$HOME/.screenlayout/wallpapers.sh"
load_script "$HOME/.screenlayout/polybar.sh"

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
if which xrandr; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload example &
done
else
polybar --reload example &
fi

View File

@ -30,6 +30,7 @@
".scripts/autostart_desktop.sh".source = ../dotfiles/.scripts/autostart_desktop.sh;
".screenlayout/launch.sh".source = ../dotfiles/.screenlayout/launch.sh;
".screenlayout/wallpapers.sh".source = ../dotfiles/.screenlayout/wallpapers.sh;
".screenlayout/polybar.sh".source = ../dotfiles/.screenlayout/polybar.sh;
".config/i3/config".source = ../dotfiles/.config/i3/config;
".config/rofi/config.rasi".source = ../dotfiles/.config/rofi/config.rasi;
".config/polybar/config.ini".source = ../dotfiles/.config/polybar/config.ini;