tmux-plugins / tmux-battery

Plug and play battery percentage and icon indicator for Tmux.
MIT License
497 stars 93 forks source link

Extended Support for Battery Detection and Display on WSL #108

Open thekpaul opened 1 year ago

thekpaul commented 1 year ago

(I'm back earlier than expected - check out #107 for an earlier version of this PR)

  1. Adds a percentage symbol at the end of battery percentage when used in a WSL environment with battery
  2. Resolves a problem on WSL desktop environments where there was no battery: a. Check existence of battery-related directories or files whenever needed (percentage, icon_status and icon_charge) b. Default behaviour to "Charging" for Status, "Tier 8 (Fully Charged)" for Charge and null for Percentage (Not printed)

I've only made changes for percentage and icon display, so we may need to make more commits before everything else work seamlessly as well. In the meantime, I'd say that this is a minimal working PR for WSL environments both with and without batteries.