Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Hook scripts #8

Open
Nachasic opened this issue Dec 18, 2022 · 0 comments
Open

[Feature] Hook scripts #8

Nachasic opened this issue Dec 18, 2022 · 0 comments

Comments

@Nachasic
Copy link
Owner

I would like to script some actions, depending on my activity status for habit management. For example, if I'm procrastinating, I could send a notification to myself to start a pomodoro timer.

Possible solution

Add a property to each activity called scripts that sets a path to a collection of shell scripts:

[[activity]]
name = "rtrackr"
productivity = 1
scripts = "~/activities/rtrackr/"

[[activity.rule]]
# ...

All relative path are considered relative to $XDG_DATA_HOME.

The program then looks for shell scripts in the folder, following a naming convention [status]-[delay-in-seconds]-Script_name.sh, example:

AFK-15-Get_back_to_work_notification.sh
AFK-30-Do_some_pushups_lock.sh

These scripts can send me notifications, kill my browser or even lock my session if I want them to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant