This Application takes string params to automate tasks. It can also be run in 'server' mode listening for commands from Pushbullet. The first command should be the task with any addition values following. Implemented tasks are:
- play/pause media
- lock desktop (win/ubuntu)
- volume control
Install dependancies: npm i
Build: tsc -b
Test jest
or npm run test
Run: node .\build\src\main.js [args]
-
Show all commands:
<ctrl + shift + p> or F1
-
Select
Tasks:Run Task
-
Run the NPM command
run-param-lock
orrun-param-server
. These can be extended with your desired parameter. -
F5 This launch functionality can be edited in
/.vscode/launch.json
Launch w/ param server
Debug with breakpoints withserver
parameter.vscode-jest-tests
Run Jest Unit Tests with breakpoints
-
pushbullet
orserver
This will launch a websocket server listening subscribing to Pushbullet. On pushes to pushbullet it will check for parameters and execute any command matched.
This requiresPUSHBULLET_API_KEY
to be set in your.env
file in the project root. You can create an API key from Pushbullet Settings under Access Tokens. You will also need to create a mechanism to push to messages to your pushbullet account. I suggest IFTT. A recipe for creating this is:1. If 1. Google Assistant 2. Say a phrase with a text ingredient 3. Selector command followed by a `$` for your text ingredient. e.g "PC $" or "Computer $". 2. Then 1. Push a note 2. Message should be `textfield` 3. Create
-
lock
Locks the user space on win, linux and mac using lock-system. -
volume <1-100>
This command will set the volume of the current playback device to the given value. -
play
orpause
This command emulates a keyboard media button press of play or pause.