Setup a command to be run when signaled on a named slot
Usage of this program is divided in two parts:
-
Registering a command to a slot. Do this with
./superslots.py wait <slot>
-
Triggering a slot with
./superslots.py trigger <slot>
, causing all it's registered commands to be run.
superslots.py has these subcommands:
superslots.py list
superslots.py reset
superslots.py wait
superslots.py trigger
Each of these has a separate --help page. Read them.
superslots.py wait --keepalive myslot1 -- ping -c2 localhost
superslots.py wait --special myslot2 -- 'ls | sort'
Then trigger in another window:
superslots.py trigger myslot1
Now ping
runs in the first terminal
NOTE: any non-arguments must come AFTER <slot>
-
In your OS's keyboard configuration, bind Ctrl+Shift+o (or something..) to run
superslots.py trigger build
-
cd
to your projects build dir -
run
superslots.py wait --keepalive build -- make -j4
-
Write code in another terminal, hit the key combo. Vuala! Your code compiles magically!
Python and Sqlite3. No other external dependencies.
Should work out-of-the-box with any *nix os. Uses signals in the trigger mechanism.
- python 3
- argparse
- subprocess
- signal
- time
- os
- functools
- datetime
- contextlib
- sqlite3