Code Monkey home page Code Monkey logo

apppauser's Introduction

AppPauser

forthebadge

an application pauser for all occasions

This application was inspired by this post on Reddit, 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

$ apppauser your-application [arguments]

and control it with

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!

apppauser's People

Contributors

ericonr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.