Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

color-switch.sh only changing one polybar instead of two on multiple display #160

Open
narindraditantyo opened this issue Feb 10, 2022 · 0 comments

Comments

@narindraditantyo
Copy link

I already customized my launch.sh both on ~/.config/polybar and ~/.config/polybar/shades but still can't change polybar color simultaneously on each monitor (HDMI-1-0 and eDP1), it only change color on one polybar instead (on eDP1).

Here's my ~/.config/polybar/launch.sh

# Get connected HDMI-1-0 status
external_monitor_status=$(xrandr --query | grep 'HDMI-1-0')

# Launch the bar
if [[ "$style" == "hack" || "$style" == "cuts" ]]; then
        polybar -q top -c "$dir/$style/config.ini" &
        polybar -q bottom -c "$dir/$style/config.ini" &
elif [[ "$style" == "pwidgets" ]]; then
        bash "$dir"/pwidgets/launch.sh --main
else
        polybar -q main -c "$dir/$style/config.ini" &
        if [[ $external_monitor_status = *connected* ]]; then
                polybar -q main_external -c "$dir/$style/config.ini" &
        fi
fi

And here's my ~/.config/polybar/shades/launch.sh

# Get connected HDMI-1-0 status
external_monitor_status=$(xrandr --query | grep 'HDMI-1-0')

# Launch the bar
polybar -q main -c "$DIR"/config.ini &
if [[ $external_monitor_status = *connected* ]]; then
        polybar -q main_external -c "$DIR"/config.ini &
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant