diff options
author | lassulus <lassulus@lassul.us> | 2018-03-28 21:11:51 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-03-28 21:11:51 +0200 |
commit | 28e1b8d3a51e2405ecc60b04e321f1f7dba364ad (patch) | |
tree | 2a1d80c992bf5f127c175a76f8eebd2f31688072 /lass/5pkgs/xephyrify/default.nix | |
parent | 9c1e215dd500458d37832f234ecb33f455ed4c64 (diff) |
l xephyrify: change ownership of socket if wanted
Diffstat (limited to 'lass/5pkgs/xephyrify/default.nix')
-rw-r--r-- | lass/5pkgs/xephyrify/default.nix | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lass/5pkgs/xephyrify/default.nix b/lass/5pkgs/xephyrify/default.nix index f1711891c..8d6036843 100644 --- a/lass/5pkgs/xephyrify/default.nix +++ b/lass/5pkgs/xephyrify/default.nix @@ -43,13 +43,20 @@ let }; in writeDashBin "xephyrify" '' - NDISPLAY=:$(${coreutils}/bin/shuf -i 100-65536 -n 1) + NDISPLAY=''${NDISPLAY:-$(${coreutils}/bin/shuf -i 100-65536 -n 1)} echo "using DISPLAY $NDISPLAY" - ${xorg.xorgserver}/bin/Xephyr -br -ac -reset -terminate -resizeable $NDISPLAY & + ${xorg.xorgserver}/bin/Xephyr -br -ac -reset -terminate -resizeable -dpi 60 -nolisten local :$NDISPLAY & + if test -n $DROP_TO_USER; then + sleep 1 + ls /tmp/.X11-unix/ + id + ${coreutils}/bin/chgrp "$DROP_TO_USER" "/tmp/.X11-unix/X$NDISPLAY" + ${coreutils}/bin/chmod 770 "/tmp/.X11-unix/X$NDISPLAY" + fi XEPHYR_PID=$! - DISPLAY=$NDISPLAY ${minimalXmonad}/bin/xmonad & + DISPLAY=:$NDISPLAY ${xephyrify-xmonad}/bin/xmonad & XMONAD_PID=$! - DISPLAY=$NDISPLAY ${virtualgl}/bin/vglrun "$@" + DISPLAY=:$NDISPLAY ${virtualgl}/bin/vglrun "$@" kill $XMONAD_PID kill $XEPHYR_PID '' |