please add battery icon in systray
Closed this issue · 10 comments
I don’t understand a little, the tray is already there and the battery icon will be there. You may need to open a tray window(press button with arrow in bar) and restart cbatticon or something like this
I mean I've got a laptop and there is no battery indicator in bar if possible can you add it I mean in
Add it somewhere in thier
I don't have laptop so i can't test it, You can add it yourself in modules/indicator.yuck
Can you guide how to I'll do it then I am a newbe in this kind of stuff if you explain keeping that in mind I'll be much more thankfull
I added the battery indicator for my laptop. I edited indicator.yuck
inside the modules folder.
At the bottom of the file I added:
(defwidget battery_icon []
(state_icon :condition true
:text {EWW_BATTERY.BAT1.capacity > 90 ? " " : EWW_BATTERY.BAT1.capacity > 75 ? " " : EWW_BATTERY.BAT1.capacity > 50 ? " " : EWW_BATTERY.BAT1.capacity > 25 ? " " : " "}
)
)
and then at the top of the file I added my battery_icon
to the indicator
like this:
(defwidget indicator []
(button :onclick "scripts/toggle_control_center.sh" :class "indicator"
(box :orientation "h" :space-evenly false
(recorder_icon)
(network_icon)
(do-not-disturb_icon)
(theme_icon)
(volume_icon)
(battery_icon)
(clock)
)
)
)
Thank you bro you are a life saver
if battery icon is still not showing, replace BAT0
in (battery_icon)
widget in indicator.yuck
by battery name from eww get EWW_BATTERY
It is visible thanks