l: add xephyrify

This commit is contained in:
lassulus 2018-03-03 18:28:05 +01:00
parent 742cda0e22
commit 7eb71976f1
2 changed files with 10 additions and 1 deletions

View File

@ -99,6 +99,7 @@ in {
zathura
cabal2nix
xephyrify
];
fonts.fonts = with pkgs; [
@ -129,7 +130,6 @@ in {
};
systemd.user.services.xmonad = {
#wantedBy = [ "graphical-session.target" ];
environment = {
DISPLAY = ":${toString config.services.xserver.display}";
RXVT_SOCKET = "%t/urxvtd-socket";

View File

@ -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
''