Closed thekpaul closed 1 year ago
Something got messed up in the previous commit, so I refreshed the file locally and did a force push. The commits now appear as expected.
There's a problem when working with wired WSL environments (i.e. a Windows desktop - gasp) where battery-related files are nonexistent to begin with. I'll be building on this commit to provide better return formats for these types of environments, and in the meantime, will be closing this pull request...but I'll be back ;)
Check out #108 for an extended patch targeting WSL containing commits covered above.
Instead of straightforwardly calling
cat
, I've encased the command inecho
to enable appending strings. This allows me to add a percentage symbol after callingcat "$battery"
, like with other battery-related tools.This also suppresses any
echo
s for machines without battery (i.e. a desktop environment)