Giter Club home page Giter Club logo

bouncer's Introduction

Bouncer

Description

When leaving X and returning to the console, most window managers will forcefully destroy all windows still open, giving you no chance to gracefully close some applications.

Bouncer sends _ NET_CLOSE_WINDOW messages to every window matching a pattern and blocks until all those windows are closed or a specified timeout expires.

Dependencies

  • GNU C Compiler
  • GNU Make
  • libxcb

Installing

Simply running

make install

as root will install the binaries to /usr/bin, configuration to /etc and MAN-pages to /usr/share/man/. If you want to install to a fake root directory (e.g. for package creation) use the prefix-variable.

make install prefix=/fake/root

The subdirectories usr/bin, usr/share/man and etc must exist.

Debugging

make debug

Compiles source files without optimizations and with debugging informations (-O0 -g).

Usage

Instead of just calling

$ shutdown -h

you could call

$ bouncer -t 30 -p "Firefox" && shutdown -h

This will send a _NET_CLOSE_WINDOW message to every window with the string "Firefox" in its WM_CLASS property and wait until they are closed or 30 seconds elapsed.

As root you can call

$ bouncer-global -t 30 -p "Firefox" && shutdown -h

to affect all Displays.

The file ~/.bouncerc can be used as alternative to the -p argument.

TODO

I want a systemd service to run before shutdown but I can't get it to work. So, if anyone's more into this...

bouncer's People

Contributors

thewebster avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

bouncer's Issues

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.