fix sway bar on pinebookpro

master
Alex 2023-04-20 22:26:43 -05:00
parent 0f307df208
commit 7a6dd9161c
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,7 @@ MAIL_DIR="$HOME/.local/share/mail"
SEP=" | " SEP=" | "
BATTERY_DEV="$(ls /sys/class/power_supply | grep -v AC)" BATTERY_DEV="$(ls /sys/class/power_supply | grep -v AC | head -n1 )"
ddate () { ddate () {
printf " %s\n" "$(date "+%b %d, %Y ( %I:%M )")" #(%a) printf " %s\n" "$(date "+%b %d, %Y ( %I:%M )")" #(%a)
@ -103,6 +103,7 @@ cputemp() {
battery() { battery() {
#BATT_DIR="/sys/class/power_supply/BAT0" #BATT_DIR="/sys/class/power_supply/BAT0"
BATT_DIR="/sys/class/power_supply/$BATTERY_DEV" BATT_DIR="/sys/class/power_supply/$BATTERY_DEV"
if [ -d "$BATT_DIR" ]; then if [ -d "$BATT_DIR" ]; then
status="$(cat "$BATT_DIR"/status)" status="$(cat "$BATT_DIR"/status)"
charge="$(cat "$BATT_DIR"/capacity)" charge="$(cat "$BATT_DIR"/capacity)"