Skip to content

Commit

Permalink
fix sway bar on pinebookpro
Browse files Browse the repository at this point in the history
  • Loading branch information
ahub2 committed Apr 21, 2023
1 parent 0f307df commit 7a6dd91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sway-bar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ MAIL_DIR="$HOME/.local/share/mail"

SEP=" | "

BATTERY_DEV="$(ls /sys/class/power_supply | grep -v AC)"
BATTERY_DEV="$(ls /sys/class/power_supply | grep -v AC | head -n1 )"

ddate () {
printf " %s\n" "$(date "+%b %d, %Y ( %I:%M )")" #(%a)
Expand Down Expand Up @@ -103,6 +103,7 @@ cputemp() {
battery() {
#BATT_DIR="/sys/class/power_supply/BAT0"
BATT_DIR="/sys/class/power_supply/$BATTERY_DEV"

if [ -d "$BATT_DIR" ]; then
status="$(cat "$BATT_DIR"/status)"
charge="$(cat "$BATT_DIR"/capacity)"
Expand Down

0 comments on commit 7a6dd91

Please sign in to comment.