7 python3Packages.buildPythonApplication rec {
8 pname = "sway-assign-cgroups";
10 src = fetchFromGitHub {
12 repo = "sway-systemd";
14 hash = "sha256-AJ87/sPy8IVJgb5YehfUfNTOFEDithLfiTxgZfZf238=";
18 propagatedBuildInputs = with python3Packages; [
29 cp src/assign-cgroups.py $out/bin/
34 description = "Place GUI applications into systemd scopes for systemd-oomd compatibility";
35 mainProgram = "assign-cgroups.py";
37 Automatically assign a dedicated systemd scope to the GUI applications
38 launched in the same cgroup as the compositor. This could be helpful for
39 implementing cgroup-based resource management and would be necessary when
40 `systemd-oomd` is in use.
42 Limitations: The script is using i3ipc window:new event to detect application
43 launches and would fail to detect background apps or special surfaces.
44 Therefore it's recommended to supplement the script with use of systemd user
45 services for such background apps.
47 license = licenses.mit;
48 platforms = platforms.linux;
49 maintainers = with maintainers; [ nickhu ];