I want to perform a script when the system goes in suspend mode. In LibreELEC there is a sleep.d directory for such scripts. Is it in OSMC also possible to perfor a script when switching in suspend mode?
It is possible to perform a shell command (or script) additional when i select a certain main menu button (select “PVR & Live TV” button -> perform default ActivateWindow(TVGuide) + shell command or script)?
Keymap editor does not support calling any scripts. If you open that add-on it will actually destroy any that were manually created. Furthermore the use case being asked about, invoking an additional action when a main menu item is selected, is not something that can be affected with a keymap anyway. AFAIK this is something that would have to be done by customising a skin.
If someone wanted to make a custom button on their remote to perform the function they could do this manually by putting everything in an external script (you can only map a single action to a key) and keymapping to that. In the script they could use a kodi-send --action="ActivateWindow(TVGuide)" to bring up that menu along with whatever else their doing with the script.
The additional command or skript should only kill the process that holds the network connection to the tvheadend server. Now i have seen that this process is unfortunately the kodi process itself:
What would you recommend to stop this network connection, maybe stop and start the tvheadend client addon via a command on suspend and wakeup?
I need to stop this network connection in suspend, otherwise my tvheadend server (other machine) is running all the time and can’t switch to suspend itself.
I have now already created my wake/standby and menu scripts.
My (hopefully) last problem is that i dont know how to set these scripts as menu action. I dont find them when i adjust the menu actions in the customize menu section.