tmux-battery
tmux-battery copied to clipboard
feat: add battery_enabled script
Currently, there is no reliable way to determine whether or not a battery is available in the system, making this plugin less portable.
There was an older issue regarding this: https://github.com/tmux-plugins/tmux-battery/issues/63
The aim of this PR is to make it easier to determine whether a battery is available on the system by setting up a variable, @battery_enabled that will be true when a battery is detected, and false otherwise.
It needs to be included in a separate file, because if added via interpolation, it won't be possible to use along side other variables, such as {E:@catppuccin_status_battery} that have to be rendered via set -F.