summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/xephyrify/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lass/5pkgs/xephyrify/default.nix')
-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
+''