.xsession.d/5polybar.sh
dddb3767
 [ "$(command -v polybar)" ] || return 0
 
 (
   # export BATTERY_ADAPTER="$(
   #   grep -E -l 'Mains' '/sys/class/power_supply/'*'/type' \
   #   | head -n 1 \
   #   | sed 's|.*/\(.\+\)/type$|\1|'
   # )"
   # export BATTERY_BATTERY="$(
   #   grep -E -l 'Battery' '/sys/class/power_supply/'*'/type' \
   #   | head -n 1 \
   #   | sed 's|.*/\(.\+\)/type$|\1|'
   # )"
   export TEMPERATURE_THERMAL_ZONE="$(
     grep -E -l 'cpu|x86' '/sys/class/thermal/thermal_zone'*'/type' 2> /dev/null \
     | head -n 1 \
     | sed 's|.*\([0-9]\+\)/type$|\1|'
   )"
   export BACKLIGHT_CARD="$(
     grep -E -l 'raw' '/sys/class/backlight/'*'/type' 2> /dev/null \
     | head -n 1 \
     | sed 's|.*/\(.\+\)/type$|\1|'
   )"
   killall --wait polybar 2> '/dev/null' || true
c5a5781a
   polybar --quiet --reload fake-top &
   polybar --quiet --reload fake-bottom &
   polybar --quiet --reload border-top &
   polybar --quiet --reload border-bottom &
dddb3767
 ) &