Closed danielfmo closed 4 years ago
As i´ve told on discord. personaly i use the klipper macros a lot so its nice to have em upfront. additionaly the support jinja2, which the dwc2 ones dont.
I can agree with you but please take into consideration the following: 1 - Currently klipper macros are shown inside all folders, for example if I create a folder to put DWC2 macros inside the klipper macros are also shown inside. 2 - even with the klipper macros inside a dedicated folder, one can have them always upfront as DWC2 keeps the folder open.
In any case I think that it is not ideal to show klipper macron on all folder and it can be fixed. If you prefer, klipper macros can be allays shown only in the "root" of the macros folder and thus allowing the user to create folders for other things.
Note: I want to use DWC2 macros because I intent to allow it to run system commands like shutdown from the gui. Thus the need to "organize" the macros
I see. Please make the folder a virtual folder, as the macros are also virtual and never writen. Your code is generating an used dir on users disk.
@Stephan3 please take a second look and tell me what you do think about it.
I reviewed that one. It still lack the situation where a virgin disk User passing by. If dwc is requesting a directory, it has to be created.
If this isn’t there , dwc settings aren’t saved for those users.
Any hints on how achieve that then? If I keep the os.makedirs(path)_ at the beginning it will create also the folder for the klipper macros.
Make an and statement. If path not exists and path is not Klipper macro.. so this way or similar
I am going to close this
Klipper macros are always shown on all folders inside /macros
This fixes it by creating a dedicated folder "Klipper" and showing the macros only inside this folder, allowing to organize other custom macros.
Sorry but my IDE does a trim on save, this the white spaces removed also