diff --git a/pkgs/applications/window-managers/sway/contrib.nix b/pkgs/applications/window-managers/sway/contrib.nix index 6ab8ea4ec8e..e2c27fb470f 100644 --- a/pkgs/applications/window-managers/sway/contrib.nix +++ b/pkgs/applications/window-managers/sway/contrib.nix @@ -1,4 +1,5 @@ { stdenv + , fetchurl , coreutils , makeWrapper @@ -9,6 +10,8 @@ , slurp , grim , jq + +, python3Packages }: { @@ -76,4 +79,29 @@ grimshot = stdenv.mkDerivation rec { }; }; + +inactive-windows-transparency = python3Packages.buildPythonApplication rec { + # long name is long + lname = "inactive-windows-transparency"; + pname = "sway-${lname}"; + version = sway-unwrapped.version; + + src = sway-unwrapped.src; + + format = "other"; + dontBuild = true; + dontConfigure = true; + + propagatedBuildInputs = [ python3Packages.i3ipc ]; + + installPhase = '' + install -Dm 0755 $src/contrib/${lname}.py $out/bin/${lname}.py + ''; + + meta = sway-unwrapped.meta // { + description = "It makes inactive sway windows transparent"; + homepage = "https://github.com/swaywm/sway/tree/${sway-unwrapped.version}/contrib"; + }; +}; + }