trigout ships with two binaries, trigout and trigin.
trigout <socket name> <file name>
NOTE: for usage of filename, socket name MUST be provided.
Default socket name is 0.
If filename is provided, stdout will also be copied over to the file, overwriting it.
Config file: ~/.config/trigout.json
Each new socket address requires configuration in the json file
json [ { "sock_name": "a", // Socket name to connect "format_str": "Hi! Date is {date}. Time is {h}:{m}:{s}", } // Other sockets ]
Use {<var name>} inside the string. <var name> can be a-zA-Z0-9
This is a sample use case outlining all the features of trigout. The given example is for a status bar for dwm (my fork).
Configuration
[
{
"sock_name": "dwm",
"format_str": "{date} | {volume}",
}
]2 scripts are used, one to get the date and time formatted and one for volume
Script
echo "volume=70%" | trigin dwm -> Implementation of input
trigout dwm /tmp/dwm-status -> Creates a file which will be updated whenever stdout is updated
ls /tmp/dwm-status | entr update-dwm-status -> Use entr to monitor the file for changes and run the update-dwm-status script.
- Status bar for a minimal window manager like dwm
- Auto compilation
trigout is licensed under the GPL-3 license.