131 Commits
Author SHA1 Message Date
Alfredo Monclus 6f38e7db08 refactor: simplify the spoolman title checks and timer 2026-04-21 19:32:16 -03:00
locki-czandAlfredo Monclus 2c693ddf16 feat: Add an option to add the remaining spool weight to the title-bar (fixed) (#1662)
---------

Co-authored-by: Alfredo Monclus <alfredomonclus@gmail.com>
2026-04-19 15:01:41 -03:00
Alfredo Monclus 0568319100 Revert "feat: Add an option to add the remaining spool weight to the title-bar (#1662)"
This reverts commit 0293a63ed3.

it will be on a special branch for now, until some more testing
2026-04-05 09:38:39 -03:00
locki-czandAlfredo Monclus 0293a63ed3 feat: Add an option to add the remaining spool weight to the title-bar (#1662)
* Add configurable Spoolman titlebar status

* Render Spoolman titlebar item with heaters

* Prioritize explicit titlebar items including Spoolman

* Tighten Spoolman titlebar icon spacing

* Color Spoolman titlebar icon from active filament

* Make low spool alert icon fully red

* Color all spool icon fills for low alert

* Show placeholder weight when spool data is unavailable

* Rename spool titlebar config aliases

* Make spool titlebar config names explicit

* Fix pycodestyle line length issue

* Use black fallback for missing spool color

* Refetch active spool on missing spool id event

* Differentiate null and missing spool ids

* Respect titlebar limits, simplify spool alert, and document Spoolman dependency

* fix issues with implementation

* rework spoolman label spacing and style

* Fix spool icon pixbuf sizing

* Improve spool titlebar icon rendering

* Revert "Improve spool titlebar icon rendering"

This reverts commit 3039df0c7cd8a60c1b3e5e3df59bbe06cacd6829.

* Align spool titlebar rendering with tested layout

* set a low limit equal to the one in the docs

* spoolman_low use warning instead of error due to high usage warning causing low visibility, it also improves contrast overall

* remove usage or regular expressions

reason is performance overhead and maintanability concerns

---------

Co-authored-by: Alfredo Monclus <alfredomonclus@gmail.com>
2026-04-03 20:06:24 -03:00
Alfredo Monclus 3a3fea96d8 refactor: change default value for side shortcut to false
new users can find it overwhelming, and even some very experienced users i've talked to never touch this

for those reasons disabled by default make sense
2026-02-17 08:15:09 -03:00
Alfredo Monclus b3115f9b9b refactor: less logging when on battery 2025-09-11 20:28:56 -06:00
Alfredo Monclus a92be75c48 refactor: optimize imports 2024-11-26 11:57:43 -03:00
Alfredo Monclus ecc32647ed refactor: make psutil optional 2024-10-23 21:55:29 -03:00
Alfredo Monclus 1872b40d9f fix(base_panel): remove printer name from printer_select and fix initial not connected error 2024-10-09 17:45:28 -03:00
Alfredo Monclus 0c9884bc85 fix: misplaced logging error in 71eef9e 2024-10-09 17:45:28 -03:00
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
Alfredo Monclus 71eef9ee1f fix(base_panel): handle pixbuf is None, this would happen if the theme was incomplete and didn't load 2024-10-01 19:55:06 -03:00
Alfredo Monclus 1b13f61709 fix(base_panel): do not show printer select if only 1 is configured
close #1429
2024-07-10 10:16:16 -03:00
Alfredo Monclus 2036512064 fix(base_panel): printer select button shouldn't be sensitive when showing as current 2024-07-06 11:08:17 -03:00
Alfredo Monclus cd0b519833 style: hide the printer name is it's just the default Printer 2024-06-24 21:30:08 -03:00
Alfredo Monclus 2d2e80c3fd panels: allow to call them without name 2024-06-04 11:16:50 -03:00
Alfredo Monclus 5abfb6f226 screen: theme doesn't need a restart anymore 2024-06-03 08:22:48 -03:00
林玮 (Jade Lin) 7e94c68993 printer: tempstore fixup (#1353)
temp from get_stat could be {} if the device is not available
2024-05-04 15:11:59 -03:00
alfrix 52754a61a8 rework websocket disconnect fixes #1352
used a solution closer to the webscocket-client docs
2024-05-03 22:03:25 -03:00
alfrix 616574ed3b drop set_dev_stat and get_dev_stat
this creates a parallel set of data that could become desynced
2024-05-02 19:01:39 -03:00
alfrix 80668faa3e Optimize: update temp avoid extra casting 2024-05-02 16:34:53 -03:00
alfrix b93fd08b6f base_panel: resource warning changes
make the notification contain the name of the printer

use avg cpu instead of individual core to be less intrusive, also because moonraker seems to report higher core usage than htop, which is strange
2024-04-01 11:46:32 -03:00
alfrix 703e136d45 base_panel: always show title when switching panels
the high usage report will come back if necessary
2024-03-20 22:01:30 -03:00
alfrix 1ac7465e82 base_panel: usage report count at least 3 cycles of high usage 2024-03-20 08:43:48 -03:00
alfrix 441cde585c base_panel: cpu report less intrusive, needs two cycles to enter high usage report 2024-03-20 08:16:47 -03:00
alfrix 8f75259e0f base_panel: add early return for update response 2024-03-16 15:49:16 -03:00
alfrix 489bd495ea base_panel: titlebar: turn red if high cpu or memory is in use, show usage
base_panel: rate limit usage notification
2024-03-16 15:47:31 -03:00
alfrix b7d9517008 base: disable shutdown shortcut when in panel 2024-03-09 14:31:38 -03:00
alfrix 68c4025902 create the shutdown panel, add it to the action bar, remove items from system panel
shutdown maintain estop during printing
add option to shudown both host and printer close #1207
simplify host and printer dialog if ks is local, do both
2024-03-09 12:19:01 -03:00
alfrix 6ee52f13e8 base_panel: fix issue with panel not loading during shutdown status 2024-02-01 12:15:29 -03:00
alfrix 6f6f0d3f13 job_status and base_panel: supress is twice as slow than directly checking if the key exist 2024-01-26 09:14:06 -03:00
alfrix eecb41df93 base_panel and printer optimizations 2024-01-13 00:46:02 -03:00
alfrix 8143636adb base_panel: minor fixup for the new titlebar func 2024-01-11 22:26:10 -03:00
alfrix 98da293cee refactor job_status and titlebar_items to allow multiple extruders 2024-01-10 23:30:39 -03:00
alfrix 6cf639c083 refactor widget creation
improves performance and makes the code cleaner

* add parameters instead of calling methods afterwards
* remove a a lot of size requests
* remove parameters that are being set to the default value
* simplify dialogs containers
2024-01-02 08:14:51 -03:00
Alfredo Monclus 1794d8aa24 feat: macro prompts close #1216 (#1219)
* feat: macro prompts close #1216

now the user can have confirmation on macros using this feature close #835

* prompt: remove separator and remove the header and close button if windowed

* prompt: wakeup screen

* prompt: slightly larger close icon
2024-01-02 08:04:02 -03:00
alfrix 6f32cdacbe layout: fix issues 2023-10-13 23:24:03 -03:00
alfrix e2068cf2c9 dialogs: remove steppers since they cause issues 2023-09-03 22:39:29 -03:00
alfrix e01b6e5f26 macros: hide the panel if there are no elegible macros 2023-08-31 22:27:12 -03:00
alfrix e80ef7eff5 dialogs: simplify dialog calls, fix layout issue 2023-08-30 01:21:17 -03:00
alfrix f3c2736f9f refactor temp updates for devices fix extruder_stepper icon error 2023-08-26 13:05:44 -03:00
alfrix 353bdc730f base_panel: fix printer select fixes #1093 2023-08-21 14:09:07 -03:00
alfrix bd98e758ec base_panel improvements
* generalize macro shortcut to allow changing it in the future
* action_bar functionality is now handled in one place for better maintainability
2023-08-18 11:48:37 -03:00
alfrix 5fa1e44f16 main_menu: allow closing the keypad with the back button 2023-08-18 11:48:37 -03:00
alfrix 34f9b958a7 remove unnecessary params from labels 2023-07-30 12:22:58 -03:00
alfrix 8d9236a2df screen: simplify panel loading
this removes create_panel function from panels and mandates a class name Panel

remove panel_type param and only use a panel_name that is it's filename

remove load_panel dict

always reinit panel, (simpler and safer but slower)
2023-07-30 12:22:58 -03:00
alfrix 3c69bcb4c4 add parameter to labels to silence IDE warnings 2023-07-30 12:22:58 -03:00
alfrix a149796b19 reduce the use of contextlib 2023-07-30 12:22:58 -03:00
Chad Condon e8a2d3443e Improve name presentation (#1055)
* Preserve manual capitalization

Avoid re-capitalizing names that already include uppercase letters.
This improves the presentation of names like "TMC2209", etc. when the
user has manually capitalized the name.

* Use title case

Use title case instead of only capitalizing the first character.
Ex. `heater_bed` now becomes "Heater Bed" instead of "Heater bed".
2023-07-24 17:00:12 -03:00
alfrix 4920720c99 return False on Glib functions 2023-06-16 10:05:43 -03:00