Include after AFC, link scripts/ into the config folder

- bd_pa_spoolman.cfg renames AFC's SET_SPOOL_ID, so klipper-macros.cfg
  must be included after [include AFC/*.cfg]; the README said otherwise.
- install.sh links scripts/ as ~/printer_data/config/klipper-macros-scripts
  so the scripts can be edited in Mainsail/Fluidd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-10-10 15:28:52 +02:00
1 parent 9dc733b5bb
commit 179bd0991b
5 files changed
+40 -17

No files matched your search

+10 -5
View File
@@ -80,8 +80,9 @@ cd ~ && git clone https://mangavalk.com/mangavalk/klipper-macros.git
- links `extras/*.py` into `~/klipper/klippy/extras/` (and hides them from
Klipper's update manager),
- links `macros/` to `~/printer_data/config/klipper-macros`, so the files show
up in Mainsail/Fluidd under `klipper-macros/`,
- links `macros/` to `~/printer_data/config/klipper-macros` and `scripts/` to
`~/printer_data/config/klipper-macros-scripts`, so the files show up in
Mainsail/Fluidd and can be edited there,
- makes the shell scripts executable,
- adds this section to `moonraker.conf` (once, with a backup):
@@ -97,10 +98,14 @@ install_script: install.sh
Then:
1. In `printer.cfg`, after `[include mainsail.cfg]`:
1. In `printer.cfg`, after `[include mainsail.cfg]` **and after the AFC
includes** (`[include AFC/*.cfg]`):
```ini
[include klipper-macros/klipper-macros.cfg]
```
`bd_pa_spoolman.cfg` wraps AFC's `SET_SPOOL_ID` with `rename_existing`,
which only works when AFC is loaded first; otherwise Klipper stops with
`Existing command 'SET_SPOOL_ID' not found in gcode_macro rename`.
2. Restart the **Klipper service** (`sudo systemctl restart klipper`, or
Mainsail → services → klipper → restart). A `RESTART` or
`FIRMWARE_RESTART` does not load new or changed Python modules.
@@ -118,8 +123,8 @@ twice and the old copy may win:
- remove `[include bd_pa_afc_spoolman.cfg]` and
`[include ./blobifier/blobifier.cfg]` from `printer.cfg`,
- replace `[include ./Macros/macros.cfg]` with
`[include klipper-macros/klipper-macros.cfg]`,
- remove `[include ./Macros/macros.cfg]` and add
`[include klipper-macros/klipper-macros.cfg]` after `[include AFC/*.cfg]`,
- keep including what is not in this repo yourself, for example
`[include Macros/timelapse.cfg]` and `[include Macros/TEST_SPEED.cfg]`.