Fix dotfiles structure

This commit is contained in:
2026-03-15 10:32:59 +05:30
parent ca014e9949
commit a2c3404cb2
2557 changed files with 148415 additions and 0 deletions

38
.config/polybar/launch.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
# killall -q polybar
# while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# polybar mybar &
# if type "xrandr"; then
# for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
# MONITOR=$m polybar --reload awesome &
# done
#else
# polybar --reload awesome &
#fi
#!/usr/bin/env sh
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -x polybar >/dev/null; do sleep 1; done
screens=$(xrandr --listactivemonitors | grep -v "Monitors" | cut -d" " -f6)
if [[ $(xrandr --listactivemonitors | grep -v "Monitors" | cut -d" " -f4 | cut -d"+" -f2- | uniq | wc -l) == 1 ]]; then
MONITOR=$(polybar --list-monitors | cut -d":" -f1) TRAY_POS=right polybar main &
else
primary=$(xrandr --query | grep primary | cut -d" " -f1)
for m in $screens; do
if [[ $primary == $m ]]; then
MONITOR=$m TRAY_POS=right polybar main &
else
MONITOR=$m TRAY_POS=none polybar secondary &
fi
done
fi