6 lines
168 B
Bash
Executable file
6 lines
168 B
Bash
Executable file
#! /usr/bin/sh
|
|
|
|
battery=$(cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0/capacity)
|
|
now=$(date +'%Y-%m-%d %H:%M:%S')
|
|
|
|
echo ${now} 🔋${battery}%
|