autorandr: add autorandr an automatic display configuration selector
This commit is contained in:
parent
6fc9f0ee91
commit
cd902179db
34
pkgs/tools/misc/autorandr/default.nix
Normal file
34
pkgs/tools/misc/autorandr/default.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ fetchgit, stdenv, disper ? null, xrandr, xdpyinfo }:
|
||||||
|
|
||||||
|
let
|
||||||
|
rev = "4f5e2401ef";
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "autorandr-${rev}";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
inherit rev;
|
||||||
|
url = "https://github.com/wertarbyte/autorandr.git";
|
||||||
|
};
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
substituteInPlace "autorandr" \
|
||||||
|
--replace "/usr/bin/xrandr" "${xrandr}/bin/xrandr" \
|
||||||
|
--replace "/usr/bin/xdpyinfo" "${xdpyinfo}/bin/xdpyinfo"
|
||||||
|
'' + stdenv.lib.optionalString (disper != null) ''
|
||||||
|
substituteInPlace "autorandr"
|
||||||
|
--replace "/usr/bin/disper" "${disper}/bin/disper"
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p "$out/etc/bash_completion.d"
|
||||||
|
cp -v bash_completion/autorandr "$out/etc/bash_completion.d"
|
||||||
|
mkdir -p "$out/bin"
|
||||||
|
cp -v autorandr auto-disper $out/bin
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Autorandr, automatic display configuration selector based on connected devices";
|
||||||
|
homepage = https://github.com/wertarbyte/autorandr;
|
||||||
|
};
|
||||||
|
}
|
@ -495,6 +495,11 @@ let
|
|||||||
|
|
||||||
autojump = callPackage ../tools/misc/autojump { };
|
autojump = callPackage ../tools/misc/autojump { };
|
||||||
|
|
||||||
|
autorandr = callPackage ../tools/misc/autorandr {
|
||||||
|
inherit (xorg) xrandr xdpyinfo;
|
||||||
|
disper = null;
|
||||||
|
};
|
||||||
|
|
||||||
avahi = callPackage ../development/libraries/avahi {
|
avahi = callPackage ../development/libraries/avahi {
|
||||||
qt4Support = config.avahi.qt4Support or false;
|
qt4Support = config.avahi.qt4Support or false;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user