Giter Club home page Giter Club logo

xsuspender's Introduction

XSuspender

Build Status

Automatically suspend inactive X11 applications.

XSuspender project website

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.

See section BUGS in the manual for the full, updated list.

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    \
                 libwnck3-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

Automatically starting xsuspender

Upon installation there will be a /etc/xdg/autostart/xsuspender.dektop file which allows you to autostart xsuspender on the start of your desktop. You need to explicitly enable autostarting xsuspender in your desktop's session management settings - this amounts to the same as copying /etc/xdg/autostart/xsuspender.dektop to ~/.config/autostart/ and setting Hidden=false.

If you let xsuspender autostart, then you need to be aware of spurious suspended app lock-ups such as in GH-11 and be ready to mitigate them.

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.

Logs

If xsuspender is autostarted 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.

xsuspender's People

Contributors

kernc avatar mdom avatar offlinehacker avatar stewi1014 avatar tpo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

xsuspender's Issues

Suspend process tree without using external dependencies

Issue description

Currently procps, gawk, coreutils, bash and findutils are needed to run a script that suspends whole process tree. This not only presents extra unneeded dependencies, but also slows downs execution as not only xsuspender, but also executed bash process needs to execute other processes. Also user needs to have these tools installed and in path, except if wrapper is made around installed xsuspender binary, like it is on nixos ;)

Solution

Implement process tree parsing in native C. While these requires a few extra lines of code, it makes xsuspender even more portable as it is.

Xsuspender does not register focus/unfocus events

Hello, firstly, thank you very much for this program! It's just what I need for a few pesky applications that take up CPU even when not being used.

Specs

OS: ArchLinux
Xsuspender version: Latest as-of today (4cce090)
Window Manager: AwesomeWM v4.3
Xorg-server version: 21.1.8

Steps to reproduce

  1. Have this config:
[Default]
suspend_delay = 5
resume_every = 0
resume_for = 0
send_signals = true
only_on_battery = false
auto_suspend_on_battery = true
downclock_on_battery = 0
# Suspend all processes.
suspend_subtree_pattern = .

[Pavucontrol]
match_wm_class_group_contains = Pavucontrol
  1. Open pavucontrol (I tried Chromium and other apps too, any app will do)
  2. Run G_MESSAGES_DEBUG=xsuspender xsuspender in a terminal
  3. Focus Pavucontrol and notice that it's responding to mouse events.
  4. Wait 5 seconds
  5. Pavucontrol stops responding to mouse/keyboard events. No amount of clicking or minimising and re-maximising resumes the process.
  6. Terminate xsuspender to have Pavucontrol resume running.

Here's the output of that:

$ G_MESSAGES_DEBUG=xsuspender xsuspender
(xsuspender:110132): xsuspender-DEBUG: 21:24:53.280: Initializing.
(xsuspender:110132): xsuspender-DEBUG: 21:24:53.282:
needle_wm_class = (null)
needle_wm_class_group = Pavucontrol
needle_wm_name = (null)
delay = 5
resume_every = 0
resume_for = 1
only_on_battery = 0
send_signals = 1
subtree_pattern = .
downclock_on_battery = 0
exec_suspend = (null)
exec_resume = (null)

(xsuspender:110132): xsuspender-DEBUG: 21:25:03.244: AC power = 0; State changed. Suspending/resuming windows.
(xsuspender:110132): xsuspender-DEBUG: 21:25:04.244: kill -STOP 104986
(xsuspender:110132): xsuspender-DEBUG: 21:25:04.244: Exec: pstree 104986 (.) | kill -STOP
(xsuspender:110132): xsuspender-DEBUG: 21:25:04.244:       kill -STOP 104986
^C(xsuspender:110132): xsuspender-DEBUG: 21:25:12.548: Exiting ...
(xsuspender:110132): xsuspender-DEBUG: 21:25:12.549: kill -CONT 104986
(xsuspender:110132): xsuspender-DEBUG: 21:25:12.549: Exec: pstree 104986 (.) | kill -CONT
(xsuspender:110132): xsuspender-DEBUG: 21:25:12.549:       kill -CONT 104986
(xsuspender:110132): xsuspender-DEBUG: 21:25:12.558: Bye.

It seems that whatever mechanism xsuspender uses to listen to the focus/unfocus events isn't working? Can I provide any more info or experiments to help debug this issue?

AUR package does not update automatically

The AUR package I created works properly and follows guidelines, but I wanted to start a discussion on bumping its pkgver (make AUR helpers update it automatically). Currently the package builds from the latest commit and installs, and never updates without the user explicitly re-installing it.

There's some interesting discussion here;
https://wiki.archlinux.org/title/Talk:VCS_package_guidelines#Guidelines_on_updating_version_numbers
https://wiki.archlinux.org/title/Talk:VCS_package_guidelines#Warn_against_trivial_pkgver_bumps

Notably there doesn't seem to be much consensus on how packagers should handle this. I think the arguments against mostly focus on avoiding bumping it on every commit, which is fair. Bumping on new releases seems more common, and IMHO, a reasonable path to take to make it explicit to the user that it's worth updating.

My proposal would be to implement a pipeline to update the pkgver on the creation of new releases. I can implement this.

What are people's thoughts on this and what do we do for the other packages? Other options are adding a second non '-git' package that follows releases, or leaving it as is and letting updates be the responsibility of users.

xsuspender confused by additional entry in `/sys/class/power_supply`

I'm using the "official" Ubuntu .deb on Ubuntu 22.04 on a HP Envy x360 convertible.
My /sys/class/power_supply contains a directory hid-0018:04F3:2B11.0001-battery which links to the battery of a stylus I (rarely!) use with my notebook. Unfortunately that directory has an online "file" which seems to always contain 1 (even when the stylus battery is empty...). As a result is_on_ac_power() in

xsuspender/src/events.c

Lines 208 to 234 in 0cca558

is_on_ac_power ()
{
#ifdef __linux__
// Read AC power state from /sys/class/power_supply/*/online (== 1 on AC).
// Should work in most cases. See: https://bugs.debian.org/473629
const char *DIRNAME = "/sys/class/power_supply";
const char *basename;
g_autoptr (GError) err = NULL;
g_autoptr (GDir) dir = g_dir_open (DIRNAME, 0, &err);
if (err) {
g_warning ("Cannot read battery/AC status: %s", err->message);
return FALSE;
}
while ((basename = g_dir_read_name (dir))) {
g_autofree char *filename = g_build_filename (DIRNAME, basename, "online", NULL);
g_autofree char *contents = NULL;
if (! g_file_get_contents (filename, &contents, NULL, NULL))
continue;
if (g_strcmp0 (g_strstrip (contents), "1") == 0)
return TRUE;
}
return FALSE;
always returns true and xsuspender does not work.
Any chance this could be fixed? Ideally of course by detecting that this directory doesn't represent an AC power source, but it would probably be sufficient to add a command line option (or environment variable) which lets me specify what subdirectory of /sys/class/power_supply represents my AC power source.

Setting max CPU consumption

# Limit CPU consumption for this factor when on battery power.
# Value 1 means 50% decrease, 2 means 66%, 3 75% etc.
downclock_on_battery = 0

Given the default max consumption is 100%, does giving a value of 3 mean the program will use max 75% CPU, or max 25% CPU?

I would like to limit my browser to a max of 80% CPU consumption (on whatever core its grinding away on...)

Configration reloading

Implement configuration reloading by sending SIGUSR1 to xsuspender. This enables if xsuspender is started without process supervision to still be able to reload config without restarting it.

Will xsuspender work with xwayland layers?

Xsuspender isn't compatible with Wayland, but most Wayland WMs include xwayland which is a layer that allows applications to run on x under Wayland. Will xsuspender work with in this configuration?

Conditional suspension

Issue description

Currently it's possible to specify exec_suspend command that gets executed when suspend is triggered. While user can override the suspension process, he needs to re-implement process tree suspension mechanism if he needs that. In a case when only a simple check needs to be preformed, like does the application play audio (using pacmd list-sink-inputs short) or does the application have a high CPU load, or does the application has a network traffic. In such cases it would suffice to only have a simple pre-check if suspension is needed in a form of executing an external command.

Soution

Implement additional exec_check option that gets executed before suspension that return 0 or 1 as exit code and informs xsuspender if suspension is needed or not.

Mouse battery messing it up?

Just trying it out and it seems to work pretty good for my use case, but when I plug in the dongle for my wireless mouse, I get an error:

Message from syslogd@fightgar at Oct 29 08:47:22 ...
 kernel:[ 4108.289786] Uhhuh. NMI received for unknown reason 30 on CPU 0.

Message from syslogd@fightgar at Oct 29 08:47:22 ...
 kernel:[ 4108.289787] Do you have a strange power saving mode enabled?```

Any way I can tell it to ignore the mouse battery?

Bug on Ubuntu 19.04

On Ubuntu 19.04, I get:
"(xsuspender:15598): GLib-WARNING **: 14:29:02.244: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Failed to open file ?/sys/class/power_supply/BAT0/online?: No such file or directory"

THere is no
/sys/class/power_supply/BAT0/online
there is however
/sys/class/power_supply/AC/online

apt update: E: The repository 'http://download.opensuse.org/repositories/home:/kernc:/xsuspender/xUbuntu_22.04 Release' no longer has a Release file.

When I ran apt update on my Ubuntu 22.04 today, it complained:

E: The repository 'http://download.opensuse.org/repositories/home:/kernc:/xsuspender/xUbuntu_22.04 Release' no longer has a Release file.

This seems to be caused by Open Build Service requiring additional project configurations to select preferred dependencies. See the Monitor page, it says:

have choice for libjpeg-dev needed by libgdk-pixbuf-2.0-dev: libjpeg-dev libjpeg-turbo8-dev, have choice for libjpeg-dev needed by libtiff-dev: libjpeg-dev libjpeg-turbo8-dev

libwnck not found in OpenSuSE Leap 15.2

I'm trying to install Xsuspender in my OpenSuSE Leap 15.2 (an RPM-based) desktop system. When I run
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
I get the following output:

`$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'glib-2.0'
-- Found glib-2.0, version 2.62.6
-- Checking for module 'libwnck-3.0'
-- No package 'libwnck-3.0' found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:467 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:647 (_pkg_check_modules_internal)
src/CMakeLists.txt:4 (pkg_check_modules)

-- Configuring incomplete, errors occurred!
See also "/usr/local/Downloads/Packages/Non-RPMs/Linux/xsuspender-master/build/CMakeFiles/CMakeOutput.log".`

Searching my system, I see that libwnck-3 is installed, but its name is different:

`$ rpm -q libwnck-3-0 --filesbypkg

libwnck-3-0 /usr/lib64/libwnck-3.so.0

libwnck-3-0 /usr/lib64/libwnck-3.so.0.3.0

libwnck-3-0 /usr/share/doc/packages/libwnck-3-0

libwnck-3-0 /usr/share/doc/packages/libwnck-3-0/AUTHORS

libwnck-3-0 /usr/share/doc/packages/libwnck-3-0/ChangeLog

libwnck-3-0 /usr/share/doc/packages/libwnck-3-0/NEWS

libwnck-3-0 /usr/share/doc/packages/libwnck-3-0/README

libwnck-3-0 /usr/share/licenses/libwnck-3-0

libwnck-3-0 /usr/share/licenses/libwnck-3-0/COPYING`

Can I get past this by making a symbolic link that cmake will recognize, or is there some better/more correct way to handle it?

Link fails with gcc 10

On my Arch system, I get the following link errors when using gcc 10.2.0:

/usr/bin/ld: CMakeFiles/xsuspender.dir/events.c.o:(.bss+0x8): multiple definition of `queued_entries'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/events.c.o:(.bss+0x18): multiple definition of `is_battery_powered'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x18): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/events.c.o:(.bss+0x10): multiple definition of `suspended_entries'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x10): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/events.c.o:(.bss+0x0): multiple definition of `rules'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/events.c.o:(.bss+0x1c): multiple definition of `IS_DEBUG'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x1c): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/exec.c.o:(.bss+0x0): multiple definition of `rules'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/exec.c.o:(.bss+0x8): multiple definition of `queued_entries'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/exec.c.o:(.bss+0x10): multiple definition of `suspended_entries'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x10): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/exec.c.o:(.bss+0x18): multiple definition of `is_battery_powered'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x18): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/exec.c.o:(.bss+0x1c): multiple definition of `IS_DEBUG'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x1c): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/rule.c.o:(.bss+0x0): multiple definition of `rules'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/rule.c.o:(.bss+0x8): multiple definition of `queued_entries'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x8): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/rule.c.o:(.bss+0x10): multiple definition of `suspended_entries'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x10): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/rule.c.o:(.bss+0x18): multiple definition of `is_battery_powered'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x18): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/rule.c.o:(.bss+0x1c): multiple definition of `IS_DEBUG'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x1c): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/xsuspender.c.o:(.bss+0x1c): multiple definition of `IS_DEBUG'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x1c): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/xsuspender.c.o:(.bss+0x18): multiple definition of `is_battery_powered'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x18): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/xsuspender.c.o:(.bss+0x0): multiple definition of `rules'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x0): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/xsuspender.c.o:(.bss+0x10): multiple definition of `suspended_entries'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x10): first defined here
/usr/bin/ld: CMakeFiles/xsuspender.dir/xsuspender.c.o:(.bss+0x8): multiple definition of `queued_entries'; CMakeFiles/xsuspender.dir/config.c.o:(.bss+0x8): first defined here
collect2: error: ld returned 1 exit status

It works if I instead run gcc 9.3.0

CC=gcc-9 cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..

Scripts for additional suspension checks

Idea

Implement a scripts that checks whether suspension is needed or not based on current process behavior. Have an option which scripts to activate for a profile.

Example checks

  • Does application play sound or not by checking pulse audio inputs.

pacmd list-sink-inputs short command gives information which processes are playing sound, also PID of process

  • Is application under high CPU load

If application is under high CPU load it might not be wise to suspend processes, as it might be processing something.

  • Is application having high network traffic lately

If application is having high network traffic it might not be wise to suspend processes, as it might be downloading or uploading something.

Make window matchers accept regex pattern

Issue

Currently window matchers only accept exact match. So that means if window class is chromium-browser, match_wm_class_contains = chromium would only match chromium window class and not chromium-browser class. I assume it's the same for other matchers.

Solution

Implement additional matchers (or change existing ones to match by regex). Example:

[Chromium]
suspend_delay = 10
match_wm_class_contains_pattern = (chormium|chromium-browser)
suspend_subtree_pattern = chromium

uninstalling borked my apt and nala on Kubuntu 22.04

i dont know what to do now, i run Kubuntu 22.04 KDE plasma-desktop

`Raw = False: [b'(Reading database ... 100%\r(Reading database ... 219772 files and directories currently installed.)\r\n']
line_fix = [b'(Reading database ... \r']

Raw = False: [b'Removing xsuspender (1.3-1) ...\r\n']

Raw = False: [b'dpkg: error processing package xsuspender (--remove):\r\n installed xsuspender package post-removal script subprocess returned error exit status 1\r\ndpkg: too many errors, stopping\r\n']
Data_Split = [b'dpkg: error processing package xsuspender (--remove):', b' installed xsuspender package post-removal script subprocess returned error exit status 1', b'dpkg: too many errors, stopping', b'']

Raw = False: [b'Errors were encountered while processing:\r\n xsuspender\r\nProcessing was halted because there were too many errors.\r\n']
Data_Split = [b'Errors were encountered while processing:', b' xsuspender', b'Processing was halted because there were too many errors.', b'']

['Traceback (most recent call last):\n', ' File "/usr/lib/python3/dist-packages/nala/dpkg.py", line 459, in run_install\n os._exit(apt.do_install(self.write_stream.fileno())) # type: ignore[attr-defined]\n', 'apt_pkg.Error: E:Sub-process /usr/bin/dpkg returned an error code (1)\n']`

Won't suspend app "closed" to systray

Hi,

( nice tool! fyi, I just made a Gentoo ebuild for it :) )

xsuspender seems to be working so far. However, I noticed that it won't suspend certain apps that are "closed" but really just "minimize" to the systray. In this case, Signal (Electron-based ๐Ÿ™„)

How it's started: firejail signal-desktop --use-tray-icon

Config:

[Default]
suspend_delay = 5
resume_every = 59
resume_for = 5
send_signals = true
only_on_battery = false
auto_suspend_on_battery = true
downclock_on_battery = 0

[Signal]
match_wm_class_contains = signal
suspend_subtree_pattern = .

When the window loses focus: ๐Ÿ‘

(xsuspender:2728894): xsuspender-DEBUG: 14:13:14.697: Suspending window in 5s: 0x4a00003 (1207188): Signal
(xsuspender:2728894): xsuspender-DEBUG: 14:13:19.823: kill -STOP 1207188
(xsuspender:2728894): xsuspender-DEBUG: 14:13:19.824: Exec: pstree 1207188 (.) | kill -STOP
(xsuspender:2728894): xsuspender-DEBUG: 14:13:19.824:       kill -STOP 1207188
(xsuspender:2728894): xsuspender-DEBUG: 14:13:19.845:       kill -STOP 1207191 1207192 1207354 1207433 1499504
(xsuspender:2728894): xsuspender-DEBUG: 14:13:19.863:       kill -STOP 1207347
(xsuspender:2728894): xsuspender-DEBUG: 14:13:19.897:       kill -STOP 1207194

When the window is "closed" to systray: ๐Ÿ‘Ž

(xsuspender:2728894): xsuspender-DEBUG: 14:13:56.384: Suspending window in 5s: 0x4a00003 (1207188): Signal
(then...nothing, unsuspended)

Thanks!

edit: Other "closed" windows are affected aswell. Discord, or birdtray'ed Thunderbird. Probably because from xsuspender's perspective, the window simply disappeared?

New chromium window does not appear until chromium is resumed

Issue

When opening a new chromium window if chromium is suspended it does not get opened until i focus one of existing chromium windows. This is a bit annoying, but additionally window gets spawned on workspace i switched to for resuming chromium, and not the one i wanted to start it originally.

Possible solution

If it would be possible to send SIGUSR1 signal to xsuspender and force it to resume all processes it would be possible to make chromium command wrapper or bpf (https://github.com/iovisor/bcc/blob/master/tools/execsnoop.py) script that would send SIGUSR1 to xsuspender whenever a new chromium is started (one without parent).

tldr: implement SIGUSR1 signal handler that resumes all suspended processes.

debian release signature invalid

Hi,

# apt-get update
Err:1 http://download.opensuse.org/repositories/home:/kernc:/xsuspender/Debian_Testing  InRelease
  The following signatures were invalid: EXPKEYSIG 9DCD4975404FB075 home:kernc OBS Project <home:[email protected]>

The problem seems to be that your key is no more valid:

$ apt-key list
/etc/apt/trusted.gpg.d/home_kernc_xsuspender.gpg
------------------------------------------------
pub   rsa2048 2017-12-30 [SC] [expired: 2022-05-05]
      550F F6DE 820F 0396 BC69  9C26 9DCD 4975 404F B075
uid           [ expired] home:kernc OBS Project <home:[email protected]>

Ubuntu official repository

Hello, thanks for making this tool. I understand that it's available via the OpenSuse repositories but was wondering why its not in the official Ubuntu repositories? And what would it take to have it there?

Better config examples

Greetings from the Internet,

Would it be possible to have more detailed config examples for the intellectually disabled pleb (e.g. me).

Thank you!

bug in the docs

The man page lists "XSuspender wonโ€™t work with Wayland." as a bug, but the real bug is anyone using Wayland, so this should be recategorized as a feature.

Update dependecies for libwnck

Hi,
libwnck-devel is now changed to libwnck3-devel, because cmake require the version above 3.0.
Please update it in the Fedora section in the readme.md .
Thank you!

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.