dracula / tmux

🧛🏻‍♂️ Dark theme for tmux
https://draculatheme.com/tmux
MIT License
656 stars 308 forks source link

Enhancement: Use battery icon instead of label and status #225

Open Erimus-Koo opened 1 year ago

Erimus-Koo commented 1 year ago

Describe the feature you'd like

image

There are several battery icons available in the Nerd Font, which display both the percentage and charging status. Mine is "JetBrainsMono Nerd Font".

image

Using them instead of the heart label and "AC" will save space and increase clarity.

Of course not everyone installed the nerd font, so there might be an alternative option such as "use-battery-icon".

ethancedwards8 commented 1 year ago

Good idea.

sydrawat01 commented 1 year ago

I'm wondering is there a possibility to update the icon based on the battery percentage, charging/not charging, etc?

sydrawat01 commented 1 year ago

I'm wondering is there a possibility to update the icon based on the battery percentage, charging/not charging, etc?

image

This config works well for me! Of course, the only caveat is the user needs to have a Nerd Font installed.

Erimus-Koo commented 1 year ago

@sydrawat01 I am not familiar with shell code, but this seems like a good attempt. Additionally, it would be nice to add color to indicate battery status - green for full charge, red for low battery - and establish some rules for when the device is charging.

ethancedwards8 commented 1 year ago

Yeah this is something to think about but hard to implement without certain fonts. I like the idea of setting a custom battery prompt.

Erimus-Koo commented 1 year ago

I believe these glyphs should be included in all nerd fonts, but I'm not certain. Nerd fonts look like some monospace fonts, append the icon glyphs(some standard subset), but maybe the subset has some different versions.