Skip to content

Commit

Permalink
try_swap_workspace: nixify
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed May 1, 2023
1 parent 8ce472d commit 2e2ecbe
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
hyprprop = prev.callPackage ./hyprprop {};
scratchpad = prev.callPackage ./scratchpad {hyprland = null;};
shellevents = prev.callPackage ./shellevents {hyprland = null;};
try_swap_workspace = prev.callPackage ./try_swap_workspace {};
};

packages = genSystems (system: self.overlays.default null pkgsFor.${system});
Expand Down
33 changes: 33 additions & 0 deletions try_swap_workspace/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
coreutils,
scdoc,
makeShellWrapper,
libnotify,
bash,
}:
stdenvNoCC.mkDerivation {
pname = "try_swap_workspace";
version = "0.1";
src = ./.;

buildInputs = [bash scdoc];
makeFlags = ["PREFIX=$(out)"];
nativeBuildInputs = [makeShellWrapper];

postInstall = ''
wrapProgramShell $out/bin/try_swap_workspace --prefix PATH ':' \
"${lib.makeBinPath [
coreutils
libnotify
]}"
'';

meta = with lib; {
description = "Workspace switching helper for Hyprland";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [fufexan];
};
}

0 comments on commit 2e2ecbe

Please sign in to comment.