Git Product home page Git Product logo

inhibitor's Introduction

inhibitor

This is a little utility to bridge between dbus org.freedesktop.ScreenSaver Inhibit/UnInhibit messages and systemd's logind idle inhibits. The usecase is to provide environments like i3/sway a mechanism to inhibit the screensaver when browsers and the like are playing video. It relies on other tools like swayidle respecting systemd's logind inhibits.

It provides a visual indicator in the status tray (if present) as to whether it is currently holding any inhibits. Green for none held, yellow for programmatic inhibits and red if there is a manual inhibit in place. A manual inhibit can be placed via the menu available from the systray status icon or toggled by sending SIGUSR1. Using SIGUSR1 allows you to wire up hotkeys in sway/i3/whatever to change the inhibit state without the mouse. If not systray is present, the tool will still function but status won't be visible.

inhibitor will heartbeat check peers that have requested programatic inhibits so that it doesn't leave the machine in an inhibited state in the case where the requesting peer program has crashed.

It works with recent versions of both Chrome, Firefox and vlc. In Firefox, you may need to enable dom.wakelock.enabled in about:config so that dbus messages are sent.

It accepts the following flags:

  • --heartbeat - how often to check peers for liveness.
  • --logfile - where to write logs
  • --manual_inhibit_timeout - the duration for which manual inhibits are honoured
  • --notify - whether to send notifications of state changes in some cases
  • --verbose - whether to write logs

License

inhibitor is available under the Simplified BSD License; see LICENSE for the full text.

inhibitor's People

Contributors

bdwalton 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.