mirror of
https://github.com/alexal1/Insomniac.git
synced 2026-04-26 18:15:54 +03:00
[GH-ISSUE #138] add custom hooks #108
Labels
No labels
bug
duplicate
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Insomniac#108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @muzzol on GitHub (Oct 14, 2020).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/138
this is a feature request to add possibility to execute custom scripts on certain events.
I was thinking of running Insomniac unnatended but I want to get reports and notifications in case something happens, for example receiving a telegram message.
Instead of hardcode any kind of notification a simpler and efective aproach is executing custom scripts on events like:
my proposal is that when an event like this occurs it search for a script in src subdir, so if user creates a script like this:
it gets executed with some specific environment variables or parameters: date, number of interactions, number of likes, completed sessions, duration, path to crash zip file...
the script could be of any type: crash.(sh|py|pl)
with mentioned example there could be this scripts:
if no scripts are found, the tool just continues as usual.
@muzzol commented on GitHub (Oct 16, 2020):
I've found another use case: when using emulator, sometimes it gets stuck and irresponsive so with a hook I can restart it.
@muzzol commented on GitHub (Dec 11, 2020):
is there any progress on this feature?
@Fadude commented on GitHub (Jan 6, 2021):
Done on v3.6.0
@muzzol commented on GitHub (Jan 30, 2021):
hi, I've found another use case.
sometimes my usb cable got disconnected on my headless setup, and I don't get any info about that as it runs in a raspberry with an attached mobile phone.
can you add on action notifications?
in my proposal I suggested simple names for script hooks that get executed if found.
so in this case it would be something like
or maybe a generic error script hook would be enough. something like
this way I can send a notification or execute whatever I want on each action.
what do you think?