All Projects → kernc → Xsuspender

kernc / Xsuspender

Licence: wtfpl
👀 💻 💤 🔋 Save battery by auto-suspending unfocused X11 applications.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Xsuspender

I3
A fork of the i3 window manager with gaps and some other features
Stars: ✭ 5,512 (+10300%)
Mutual labels:  x11, i3, i3wm, xorg
Connmap
connmap is an X11 desktop widget that shows location of your current network peers on a world map (tested only with i3wm). Made with C and libcairo.
Stars: ✭ 90 (+69.81%)
Mutual labels:  x11, i3, i3wm
I3 Battery Popup
A script that shows warning messages to the user when the battery is almost empty. For i3wm users.
Stars: ✭ 190 (+258.49%)
Mutual labels:  i3, i3wm, battery
X11docker
Run GUI applications and desktops in docker and podman containers. Focus on security.
Stars: ✭ 3,797 (+7064.15%)
Mutual labels:  desktop, x11, xorg
Wallutils
🌆 Utilities for handling monitors, resolutions, wallpapers and timed wallpapers
Stars: ✭ 145 (+173.58%)
Mutual labels:  x11, i3, xorg
I3 Config
i3wm configuration files
Stars: ✭ 81 (+52.83%)
Mutual labels:  i3, i3wm, tiling-window-manager
Auto Cpufreq
Automatic CPU speed & power optimizer for Linux
Stars: ✭ 843 (+1490.57%)
Mutual labels:  daemon, cpu, battery
sway-alttab
Simple Alt-Tab daemon for SwayWM/i3. Switches back to previous focused window on Alt-Tab or SIGUSR1
Stars: ✭ 36 (-32.08%)
Mutual labels:  daemon, i3, i3wm
shod-old
hybrid (floating and tiling) tabbed window manager
Stars: ✭ 56 (+5.66%)
Mutual labels:  unix, x11, tiling-window-manager
shod
mouse-based window manager that can tile windows inside floating containers
Stars: ✭ 126 (+137.74%)
Mutual labels:  unix, x11, tiling-window-manager
i3altlayout
i3wm efficient screen real estate
Stars: ✭ 40 (-24.53%)
Mutual labels:  i3, tiling-window-manager, i3wm
Dotfiles
🌸 Configuration for i3, kitty, picom, ZSH, gtk, qutebrowser, qbittorrent and more... (All tools for an arch linux new installation)
Stars: ✭ 15 (-71.7%)
Mutual labels:  i3, xorg, i3wm
dxhd
daky's X11 Hotkey Daemon
Stars: ✭ 80 (+50.94%)
Mutual labels:  daemon, xorg, x11
x11-cr
X11 bindings for Crystal language.
Stars: ✭ 32 (-39.62%)
Mutual labels:  unix, x11, desktop
Green Recorder
A simple screen recorder for Linux desktop. Supports Wayland & Xorg
Stars: ✭ 594 (+1020.75%)
Mutual labels:  desktop, xorg
I3 Style
🎨 Make your i3 config a little more stylish.
Stars: ✭ 583 (+1000%)
Mutual labels:  i3, i3wm
I3ipc Python
🐍 An improved Python library to control i3wm and sway.
Stars: ✭ 634 (+1096.23%)
Mutual labels:  i3, i3wm
Imv
Image viewer for X11/Wayland
Stars: ✭ 652 (+1130.19%)
Mutual labels:  x11, tiling-window-manager
Dotfiles
i3 + Plasma: using the i3 window manager on the top of KDE Plasma and other dotfiles, configurations, scripts, workarounds and practises from my Debian Sid machines.
Stars: ✭ 651 (+1128.3%)
Mutual labels:  desktop, i3wm
Immortal
⭕ A *nix cross-platform (OS agnostic) supervisor
Stars: ✭ 701 (+1222.64%)
Mutual labels:  daemon, unix

XSuspender

Build Status

Automatically suspend inactive X11 applications.

XSuspender project website

Star the project if you use it.

When an application window loses focus, XSuspender tries to match it to one of the rules in its configuration. If a match is found, the application is sent a SIGSTOP signal (preventing the process from obtaining further CPU time). Upon windows regaining focus, the process is seamlessly continued where it had left off.

Advantages

  • Reduce battery use (increase battery run-time).
    Make your laptop run on battery for as long as your mobile phone does, using roughly the same technique.
  • Reduce interaction latency on low-end CPUs.
    With fewer clients requesting processing power, there's more of it to go around where it's needed.
  • Reduce CPU fan noise.
    Save the tinnitus for old age.
  • Avoid apps plotting stuff behind your back.
    That Kali you're running in a VM is perfectly fine, but god only knows what Microsoft Windos is doing.
  • Suspend processes using well-known Unix signals SIGSTOP & SIGCONT ...
    ... or custom shell scripts. Decades of portable operating systems engineering at its finest.
  • Preconfigured for recent versions of popular software.
    Chromium, Firefox, JetBrains IDEs, qBittorrent, VirtualBox ...

Quirks

  • Quirky. See Notes below.
  • May prevent suspended windows from redrawing until re-gaining focus.
  • May make your web downloads stall and your in-browser media playback stop if you configure it thus.
  • Prevents pasting from clipboard while the selection source process is suspended (explanation).
  • Relies on windows having their _NET_WM_PID hint set correctly.
  • Won't work in remote X sessions.
  • Won't work with Wayland.

Installation

Binary packages

Install binary package for your GNU/Linux distribution:

Debian, Ubuntu Arch Linux

From Source

# Install dependencies, namely GLib, Libwnck, procps
# on Debian / Ubuntu / Mint:
sudo apt install libglib2.0-dev \
                 libwnck-3-dev  \
                 procps         \
                 make cmake gcc pkg-config

# on Fedora / RHEL / openSUSE / Solus:
sudo dnf install glib2-devel   \
                 libwnck-devel \
                 procps-ng     \
                 make cmake gcc pkg-config
# Fetch a copy of the source code
git clone https://github.com/kernc/xsuspender
cd xsuspender

# Move to build directory for an out-of-tree build
cd build

# Configure and make
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
make
make test

# Install within chosen prefix
sudo make install

Usage

For brief usage instructions, run:

xsuspender --help

Configuration debugging

To have it print verbose debug messages about what it is doing, run the program with environmental variable G_MESSAGES_DEBUG=xsuspender set:

G_MESSAGES_DEBUG=xsuspender xsuspender

This is strongly recommended to confirm your customized configuration rules indeed work as you expect.

If xsuspender is auto run by your X session manager, you might find clues to its unexpected behavior in ~/.xsession-errors.

Notes

  • Processes that take a long time to shut down after their window already disappears may be stopped in the middle of their termination routines. Avoid with reasonably generous suspend_delay.
  • Windows that minimize to system tray need to be awaken frequently to respond to click events in a seamless manner.
  • Don't configure xsuspender for software you want to keep continuously alive in the background, such as music players, daemons, IM clients ... If you frequently stream music from YouTube, you might give Clementine, Minitube, YouTube Viewer or SMTube a try.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].