From cf917a845bc3a1bd1f88dc5976434ae1a1b76160 Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Tue, 1 Oct 2024 19:29:57 -0700 Subject: [PATCH] Update .config/packages/arch-packages.fish Update .config/polybar/launch.sh Update tags --- ...run_onchange_after_arch-packages.fish.tmpl | 4 +- dot_config/polybar/executable_launch.sh | 87 ++++++++++--------- tags | 4 +- 3 files changed, 51 insertions(+), 44 deletions(-) diff --git a/dot_config/packages/run_onchange_after_arch-packages.fish.tmpl b/dot_config/packages/run_onchange_after_arch-packages.fish.tmpl index fc659b1..8847c4e 100644 --- a/dot_config/packages/run_onchange_after_arch-packages.fish.tmpl +++ b/dot_config/packages/run_onchange_after_arch-packages.fish.tmpl @@ -28,11 +28,11 @@ if ! test "{{ .chezmoi.hostname }}" = "$file" {{ if eq .chezmoi.hostname "archgirlie" -}} {{ range .packages.arch.archgirlie -}} - yay -S --needed - <{{ . }} + yay -S --needed {{ . }} {{ end -}} {{ else if eq .chezmoi.hostname "archbaby" -}} {{ range .packages.arch.archbaby -}} - yay -S --needed - <{{ . }} + yay -S --needed {{ . }} {{ end -}} {{ end -}} end diff --git a/dot_config/polybar/executable_launch.sh b/dot_config/polybar/executable_launch.sh index c2da5b7..4804e8d 100644 --- a/dot_config/polybar/executable_launch.sh +++ b/dot_config/polybar/executable_launch.sh @@ -1,76 +1,83 @@ #!/usr/bin/env bash dir="$HOME/.config/polybar" -themes=(`ls --hide="launch.sh" $dir`) +# themes=(`ls --hide="launch.sh" $dir`) -launch_bar() { - # Terminate already running bar instances - killall -q polybar +launch_bar() +{ + # Terminate already running bar instances + killall -q polybar - # Wait until the processes have been shut down - while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + # Wait until the processes have been shut down + while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done - # 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" & - fi + # 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 + if type "xrandr" &>/dev/null; then + for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + MONITOR=$m polybar -q main -c "$dir/$style/config.ini" & + done + else + polybar -q main -c "$dir/$style/config.ini" & + fi + fi } if [[ "$1" == "--material" ]]; then - style="material" - launch_bar + style="material" + launch_bar elif [[ "$1" == "--shades" ]]; then - style="shades" - launch_bar + style="shades" + launch_bar elif [[ "$1" == "--hack" ]]; then - style="hack" - launch_bar + style="hack" + launch_bar elif [[ "$1" == "--docky" ]]; then - style="docky" - launch_bar + style="docky" + launch_bar elif [[ "$1" == "--cuts" ]]; then - style="cuts" - launch_bar + style="cuts" + launch_bar elif [[ "$1" == "--shapes" ]]; then - style="shapes" - launch_bar + style="shapes" + launch_bar elif [[ "$1" == "--grayblocks" ]]; then - style="grayblocks" - launch_bar + style="grayblocks" + launch_bar elif [[ "$1" == "--blocks" ]]; then - style="blocks" - launch_bar + style="blocks" + launch_bar elif [[ "$1" == "--colorblocks" ]]; then - style="colorblocks" - launch_bar + style="colorblocks" + launch_bar elif [[ "$1" == "--forest" ]]; then - style="forest" - launch_bar + style="forest" + launch_bar elif [[ "$1" == "--pwidgets" ]]; then - style="pwidgets" - launch_bar + style="pwidgets" + launch_bar elif [[ "$1" == "--panels" ]]; then - style="panels" - launch_bar + style="panels" + launch_bar else - cat <<- EOF + cat <<-EOF Usage : launch.sh --theme Available Themes : diff --git a/tags b/tags index 20ab429..486c942 100644 --- a/tags +++ b/tags @@ -1469,7 +1469,7 @@ EOF dot_config/polybar/docky/scripts/executable_colors-dark.sh /^ cat > $RFILE < EOF dot_config/polybar/docky/scripts/executable_colors-light.sh /^ cat > $RFILE <<- EOF$/;" h EOF dot_config/polybar/docky/scripts/executable_pywal.sh /^ cat > $RFILE <<- EOF$/;" h EOF dot_config/polybar/docky/scripts/executable_random.sh /^ cat > $RFILE <<- EOF$/;" h -EOF dot_config/polybar/executable_launch.sh /^ cat <<- EOF$/;" h +EOF dot_config/polybar/executable_launch.sh /^ cat <<-EOF$/;" h EOF dot_config/polybar/forest/scripts/executable_styles.sh /^ cat > $RFILE <<- EOF$/;" h EOF dot_config/polybar/grayblocks/scripts/executable_colors-dark.sh /^ cat > $RFILE <<- EOF$/;" h EOF dot_config/polybar/grayblocks/scripts/executable_colors-light.sh /^ cat > $RFILE <<- EOF$/;" h @@ -6506,7 +6506,7 @@ label dot_config/polybar/shapes/modules.ini /^label = %time%$/;" k section:modul label dot_config/polybar/shapes/user_modules.ini /^label = "%output% "$/;" k section:module/updates language dot_config/copyq/copyq.conf /^language=en$/;" k section:Options laravel/installer dot_config/composer/composer.json /^ "laravel\/installer": "^5.6"$/;" s object:require -launch_bar dot_config/polybar/executable_launch.sh /^launch_bar() {$/;" f +launch_bar dot_config/polybar/executable_launch.sh /^launch_bar()$/;" f launcher dot_config/polybar/panels/scripts/executable_launcher.sh /^launcher() {$/;" f layer1 dot_config/awesome/themes/catppuccin/titlebar/close.svg /^