Commit Graph

29 Commits

Author SHA1 Message Date
Michael Carlberg f4e8051e9e refactor(script): Merge back script handling 2017-01-10 05:12:53 +01:00
Michael Carlberg 946843ff59 feat(script): Configurable condition using exec-if
Add new config parameter `exec-if = cmd` that needs to
exit successfully before the main exec command will be invoked.

Closes #298
2017-01-10 03:02:00 +01:00
Michael Carlberg ccddf052ec refactor(script): Split non-/tail logic
Split the script module into one tailing output module and
one exec once module.

Refs #281
2017-01-01 09:05:18 +01:00
Michael Carlberg acb9ed910d fix(script): Unlock mutex before terminating command
Refs #281
2016-12-31 14:08:45 +01:00
Michael Carlberg c01f111e34 refactor(modules): Move setup to constructor 2016-12-21 08:00:09 +01:00
Michael Carlberg 08be86fbe1 wip(refactor): Improve signal and event handling 2016-12-14 11:01:44 +01:00
Michael Carlberg 604e926924 refactor(script): Format tag <label>
Mark <output> and maxlen as deprecated
2016-12-03 21:10:01 +01:00
Michael Carlberg ff9be848c7 refactor(clang-tidy): Apply fixes 2016-11-25 21:58:49 +01:00
Michael Carlberg c6d85b2b92 refactor: Optimize build 2016-11-20 23:04:31 +01:00
Michael Carlberg fd57ab0f3d fix: project rename 2016-11-19 06:26:07 +01:00
Michael Carlberg e7cb345cec wip: Separate source from definitions 2016-11-03 12:54:32 +01:00
Michael Carlberg e21d084fdd fix(mpd): Connection state broadcasting 2016-10-29 06:52:48 +02:00
Michael Carlberg 1075144b00 refactor(eventloop): Use concurrent queue for events
Events are now enqueued using a thread safe concurrent queue
which makes the previous eventloop locking redundant.
2016-10-29 06:48:51 +02:00
Michael Carlberg fa7e3d4430 fix(script): Terminate running commands
Make sure the previous command has ended before
executing a new command.

This also fixes the execution block that was
caused by the tailing the command output of
action commands.

Fixes jaagr/lemonbuddy#131
2016-10-28 18:54:08 +02:00
Michael Carlberg 660d06768b fix(script): Set 2s default interval for timed scripts 2016-10-26 12:20:55 +02:00
Michael Carlberg d879d6d42e fix: Throttle X input events
- Limit the amount of allowed input events
- Yield on lock failure
- Cleanup
2016-10-19 06:03:01 +02:00
Michael Carlberg 1c882508ec fix: Drop superflous prefix when throwing module_error 2016-10-19 02:15:52 +02:00
Michael Carlberg 68f72d69cc refactor: Drop tokenized labels
Handle placeholder tokens inside each label
instead of cloning into a new instance each time
2016-10-19 01:31:17 +02:00
Michael Carlberg 7e960a3966 fix(script): Rerun tail script when done
- Improve handling of command life time proc
- Restart tail command on successful completion
- Should fix jaagr/lemonbuddy#105
2016-10-19 01:31:05 +02:00
Michael Carlberg ba1939f4ca fix(script): Make sure the output is passed through the formatter
Fixes jaagr/lemonbuddy#97
2016-10-15 21:52:52 +02:00
Michael Carlberg dc82d0ed57 refactor(script): Make the module behave as intended
Tail script now block execution until there's data
available on the script's output stream.

Running commands are also being terminated properly.
2016-10-15 13:15:56 +02:00
Michael Carlberg 9238f56b72 fix(script): Broadcast empty content once 2016-10-14 17:18:29 +02:00
Michael Carlberg c8def6677d fix(script): Dispatch subthread on setup
Closes jaagr/lemonbuddy#77
2016-10-14 11:36:10 +02:00
Michael Carlberg d359ab6057 refactor: Application rewrite 2016-10-10 14:52:57 +02:00
Michael Carlberg e1f8c001dd refactor: Pass by value 2016-06-21 04:23:23 +02:00
Michael Carlberg 6cae06c4dc refactor(script): Better handling of tail scripts 2016-06-14 12:15:22 +02:00
Michael Carlberg f7734de26a feat(script): Option to tail script output 2016-06-13 23:41:59 +02:00
Michael Carlberg 39d3f61497 refactor(core): Clean-up
- use "#pragma once" instead of the regular include guard
- fix errors and warnings reported by cppcheck
2016-06-02 01:32:06 +02:00
Michael Carlberg eeefb3c610 init(git): Base commit 2016-05-19 20:23:45 +02:00