summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/xephyrify/default.nix
blob: cd918af379bc95fb2f0a03223d6c9ed2972b9a4b (plain)
1
2
3
4
5
6
7
8
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
''