How to get remaining battery percentage in sddm environment?
-
I am using kubuntu 19.04 and have installed this custom login screen:
https://github.com/RadRussianRus/sddm-slice
right now I am trying to figure out some way to add battery indicator at the bottom but I have no experience with Qt or QML. By now I have written the following code in Main.qml file :SlicedButton { id: batteryStatus x: buttonKeyboardLayout.x + buttonKeyboardLayout.widthPartial + 3 y: areaBottom.height - height - 5 function updateBatteryStatus() { text = /* Code to get battery status */ } font: fonts.slicesBottomLeft }
please guide me.
-
I am using kubuntu 19.04 and have installed this custom login screen:
https://github.com/RadRussianRus/sddm-slice
right now I am trying to figure out some way to add battery indicator at the bottom but I have no experience with Qt or QML. By now I have written the following code in Main.qml file :SlicedButton { id: batteryStatus x: buttonKeyboardLayout.x + buttonKeyboardLayout.widthPartial + 3 y: areaBottom.height - height - 5 function updateBatteryStatus() { text = /* Code to get battery status */ } font: fonts.slicesBottomLeft }
please guide me.
-
@closx thanks for the quick response. I've looked into the article and I think that this article is about creating a dynamic battery icon but It doesn't tell us how to get actual system battery percentage. I am looking for that. It would be great if you could help me with that.
Thanks
-
@closx thanks for the quick response. I've looked into the article and I think that this article is about creating a dynamic battery icon but It doesn't tell us how to get actual system battery percentage. I am looking for that. It would be great if you could help me with that.
Thanks