3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/window-managers/i3/layout-manager.nix
Maximilian Bosch d2adb05aa6
i3-layout-manager: init at unstable-2019-06-19
Simple script which is a wrapper for i3's layout persist functionality[1] that
automates the manual editing of the exported layout JSON.

[1] https://i3wm.org/docs/layout-saving.html
2019-06-24 01:01:54 +02:00

40 lines
1,014 B
Nix

{ stdenv, fetchFromGitHub, vim, makeWrapper, jq, rofi, xrandr, xdotool, i3, gawk, libnotify }:
let
path = stdenv.lib.makeBinPath [ vim jq rofi xrandr xdotool i3 gawk libnotify ];
in
stdenv.mkDerivation rec {
pname = "i3-layout-manager";
version = "unstable-2019-06-19";
src = fetchFromGitHub {
owner = "klaxalk";
repo = pname;
rev = "80ade872bfd70d9c6039024097ceb8c852a2816a";
sha256 = "02xhyd737qwni628mjzr9i5v2kga5cq4k8m77bxm1p6kkj84nlmg";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
runHook preInstall
install -D layout_manager.sh $out/bin/layout_manager
wrapProgram $out/bin/layout_manager \
--prefix PATH : "${path}"
runHook postInstall
'';
meta = with stdenv.lib; {
homepage = https://github.com/klaxalk/i3-layout-manager;
description = "Saving, loading and managing layouts for i3wm.";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ ma27 ];
};
}