summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/xephyrify
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-03-03 18:28:05 +0100
committerlassulus <lassulus@lassul.us>2018-03-03 18:28:05 +0100
commit7eb71976f102eb616dc1ab07283acdbdf519ea90 (patch)
tree6b2d3028bd01e0327bac384a90fd3c38207d7616 /lass/5pkgs/xephyrify
parent742cda0e2261acad6b3d17dc42331ecc5e833854 (diff)
l: add xephyrify
Diffstat (limited to 'lass/5pkgs/xephyrify')
-rw-r--r--lass/5pkgs/xephyrify/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/lass/5pkgs/xephyrify/default.nix b/lass/5pkgs/xephyrify/default.nix
new file mode 100644
index 000000000..cd918af37
--- /dev/null
+++ b/lass/5pkgs/xephyrify/default.nix
@@ -0,0 +1,9 @@
+{ writeDashBin, coreutils, xorg, virtualgl, ... }:
+
+writeDashBin "xephyrify" ''
+ NDISPLAY=:$(${coreutils}/bin/shuf -i 100-65536 -n 1)
+ ${xorg.xorgserver}/bin/Xephyr -br -ac -reset -terminate -resizeable $NDISPLAY &
+ XEPHYR_PID=$!
+ DISPLAY=$NDISPLAY ${virtualgl}/bin/vglrun "$@"
+ kill $XEPHYR_PID
+''