diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-10-05 22:27:06 +0200 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-10-05 22:27:06 +0200 |
commit | 195647841245c07b5745392c1a8351ef068e0de8 (patch) | |
tree | 9f251b3c2696abb96a9cd3734a1793a20a9d9247 /pkgs/larbs-scripts/displayselect | |
parent | 9be00a1b0eaa19d3784c3abb823f3e2ebe80f716 (diff) | |
parent | 98f5cb6f6975b0fb4afd301439957ed863b0e7ab (diff) | |
download | pnpkgs-195647841245c07b5745392c1a8351ef068e0de8.tar.gz pnpkgs-195647841245c07b5745392c1a8351ef068e0de8.zip |
Merge branch 'master' into displayselect
Diffstat (limited to 'pkgs/larbs-scripts/displayselect')
-rw-r--r-- | pkgs/larbs-scripts/displayselect/wrapper.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/larbs-scripts/displayselect/wrapper.nix b/pkgs/larbs-scripts/displayselect/wrapper.nix new file mode 100644 index 0000000..bcc051b --- /dev/null +++ b/pkgs/larbs-scripts/displayselect/wrapper.nix @@ -0,0 +1,40 @@ +{ stdenv, buildEnv, callPackage, lib, xrandr, libnotify, arandr }: + +displayselect: + +let + + mapCase = options: + builtins.concatStringsSep "\n" + (builtins.map + (option: "\t\"${option}\") ${builtins.getAttr option options} ;;") + (builtins.attrNames options)); + + wrapper = { moreOptions ? {} }: + let + dmenu = callPackage ../../larbs/dmenu { }; + in + buildEnv { + name = "displayselect-env"; + + paths = [ + xrandr + arandr + libnotify + dmenu + ]; + + postBuild = '' + mkdir -p $out/bin + cp ${displayselect}/bin/displayselect $out/bin + echo ${mapCase moreOptions} >> $out/bin/test + ''; + + + meta = { + description = "A fancy monitor configuration menu."; + homepage = "https://github.com/LukeSmithXYZ/voidrice"; + }; + }; +in + lib.makeOverridable wrapper |