+
Skip to content

leaty/paction

Repository files navigation

paction

Execute actions relative to process existance. I really ought to find a better name for this though.

Configuration

The configuration may contain multiple actions, each with multiple or singular criteria. Default location is ~/.config/paction/config.toml, see paction --help for more options. Copy the sample config for reference when configuring.

Example config

Stop compton when either CS:GO or THUG Pro and OBS Studio is running - to get those extra frames you know. Once criteria is no longer met, start compton again.

tick = 500

[[action]]
name = "some action" # Name used in output
exec = ["pkill", "compton"]
undo = ["compton"]

# CS:GO or THUG Pro must be running by the same user as paction
[[action.criteria]]
user = ["$USER"]
name = ["csgo_linux64", "THUGPro.exe"]
cmd = []

# OBS Studio must ALSO be running
# By either "someuser", 1001 or the same user as paction
# With the switch --startreplaybuffer
[[action.criteria]]
user = ["someuser", 1001, "$USER"]
name = ["obs"]
cmd = ["--startreplaybuffer"]

Running as service

For X display support (e.g. start a GUI program on exec) I recommend running as a user service.

You could run install.sh or just follow the steps below.

Install as user service

cargo build --release
cp paction.service ~/.config/systemd/user/
sudo cp target/release/paction /usr/bin
systemctl --user enable paction
systemctl --user start paction

About

Execute actions relative to process existance

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载