https://github.com/ericonr/apppauser
An application pauser for all occasions
https://github.com/ericonr/apppauser
golang linux-gaming socket
Last synced: about 1 year ago
JSON representation
An application pauser for all occasions
- Host: GitHub
- URL: https://github.com/ericonr/apppauser
- Owner: ericonr
- License: mit
- Created: 2019-12-08T00:54:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-22T01:27:47.000Z (about 6 years ago)
- Last Synced: 2025-03-20T15:40:33.562Z (over 1 year ago)
- Topics: golang, linux-gaming, socket
- Language: Go
- Size: 6.84 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AppPauser
[](https://forthebadge.com)
*an application pauser for all occasions*
This application was inspired by [this post on Reddit](https://www.reddit.com/r/pcgaming/comments/e7ftzr/unpausable_cutscenes_i_made_a_windows_application/), which showcased an application that allows one to pause a game during unpausable cutscenes on Windows.
OP's comments showed that the application had to pause the executing thread to pause a game, which led me to thinking about developing a similar application for Linux.
It's indeed very simple to send STOP and CONT signals on Linux, which made it possible to create a launcher wrapper that listens on a socket for commands like `pause`, `resume` and `kill`.
## How to use
Launch the desired application with
```shell
$ apppauser your-application [arguments]
```
and control it with
```shell
apppauserctl command
```
where `command` can be:
* `pause`: sends the SIGSTOP signal to an application
* `resume`: sends the SIGCONT signal to an application
* `toggle`: sends either SIGSTOP or SIGCONT signal to an application, depending on its current status
* `kill`: sends the SIGTERM signal to an application
## How to install
Install the Go compiler, and then run `go get github.com/ericonr/AppPauser` to compile both binaries and store them in `$GOBIN`.
You then only need to add `$GOBIN` to your `$PATH` and you are ready to use this!
## Future steps
There's still a lot to do. What I've already thought about:
* Make the default name for sockets be related to the user's username
* Include feedback on the output of apppauserctl, which for now doesn't listen to any responses
* Create command line options to determine the socket name and other options (such as starting an application already paused)
## Warning
This is as incomplete as it comes, but it did work in my machine. Please let me know about any issues!