Alfredo MonclusandMrTylerjet 5ae4e475b6 feat: battery status (#1457)
* Initial commit, added psutil for getting tablet/laptop battery percentage, initial code for getting the values and displaying the icon

* add battery svgs for light theme

* added light styled battery svgs for dark themes

* update icon based on battery percentage and if device is charging

* indentation fix, and forgot to add battery plugged checks for 33% and 66% battery levels

* move battery polling to its own timer now that i understand how to add an additional timer, checks every 30 seconds. check for if show battery is on or off

* add toggle to config for settings

* show battery callback as screen.restart_ks instead of just reloading panels

* move self.battery_percentage() to end of reload_icons this ensures that when a theme is changed the icon is updated instead of waiting for the timeout to update the icon again

* remove left over commented out code

* only call self.battery_percentage when config is true

* adjust tooltip message

* split creatation of elements from updating elements

* change print to logging.debug, handle rouding for percentage in the f-string

* remove code that was moved to `attery_init()`, only destroy icon element when updating icons/percentage text, remove redundant calls to `.pack_start` (just call it once after setting the icon).

* only create battery_update timer if config setting is true

* new material icons remove old icons

* `self.battery_init() in `__init__` def

* fix: lint

* refactors

* style: update icons to follow themes

* refactor: remove config, make the show/hide automatic

* style: bigger battery icons for z-bolt and colorized

---------

Co-authored-by: MrTylerjet <MrTylerjet@gmail.com>
2024-10-09 17:34:33 -03:00
2024-04-05 23:08:12 -03:00
2024-10-09 17:34:33 -03:00
2024-10-09 17:34:33 -03:00
2024-10-09 17:34:33 -03:00
2024-06-02 06:48:11 -03:00
2024-09-21 06:40:57 -03:00
2024-06-02 06:48:11 -03:00
2024-06-12 11:22:18 -03:00
2024-09-20 19:16:21 -03:00

KlipperScreen

KlipperScreen is a touchscreen GUI that interfaces with Klipper via Moonraker. It allows you to switch between multiple printers and access them from a single location. Notably, it doesn't need to run on the same host as your printer; you can install it on another device and configure the IP address to connect to the printer.

Documentation

For detailed information, click here to access the documentation.

Inspiration

KlipperScreen draws inspiration from OctoScreen and was developed to provide a native touchscreen GUI compatible with Klipper and Moonraker.

Main Menu

Explore more screenshots here.

Translations

Translations for KlipperScreen are hosted on Weblate. Thanks to the Weblate team for supporting the open-source community.

Translation status

Click the widget below to access the translation platform:

Weblate widget

About the Project

KlipperScreen was created by Jordan Ruthe in 2020.

Donate to Jordan
Patreon
Ko-fi

Since 2021, the project has been maintained by Alfredo Monclus (alfrix).

Donate to Alfrix
Ko-fi

We extend our gratitude to all contributors who have helped along the way. Meet the contributors.

Sponsors

LDO YUMI

Special thanks to LDO and YUMI for sponsoring KlipperScreen and the open-source community.

Languages
Python 91.7%
CSS 5.1%
Shell 3.2%