2024-07-11, 09:28
Hello everyone.
I want to add a keybind that will run a script and pop a notification about the cpu's temperature inside kodi. For that purpose, I will use libreelec's built in "cputemp" command, but because I can not add/run it directly to a notification action, I made this tiny bash script that grabs it as a text and adds it there.
This is how it looks inside kodi
After that, I have to add it to a keybind which will be avaiable everywhere, so I made this xml file
I have already tested if it works by making it grab a screeshot when longpressing "t" (it runs "TakeScreenshot" instead of all that) and it works just fine. However, not only it does not work with the above command but it freezes the entire kodi and I have to ssh to it and reboot the system (single purpose laptop running libreelec). What am I doing wrong?
p.s. Due to high temperatures here, I may be afk the following days, so please excuse any delays in answering. I will do my best to reply in timely manner.
I want to add a keybind that will run a script and pop a notification about the cpu's temperature inside kodi. For that purpose, I will use libreelec's built in "cputemp" command, but because I can not add/run it directly to a notification action, I made this tiny bash script that grabs it as a text and adds it there.
Code:
# cat test.sh
#!/bin/bash
t=$(/usr/bin/cputemp)
kodi-send --action=notification"($t,temp,10000)"
After that, I have to add it to a keybind which will be avaiable everywhere, so I made this xml file
Code:
# cat test.xml
<keymap>
<global>
<keyboard>
<t mod="longpress">System.Exec(/storage/test.sh)</t>
</keyboard>
</global>
</keymap>
p.s. Due to high temperatures here, I may be afk the following days, so please excuse any delays in answering. I will do my best to reply in timely manner.