diff options
author | jeschli <jeschli@gmail.com> | 2018-03-20 15:37:44 +0100 |
---|---|---|
committer | jeschli <jeschli@gmail.com> | 2018-03-20 15:37:44 +0100 |
commit | 01358d3947b46c2d9cceb7f6c53855cb536d6efe (patch) | |
tree | 194c3c5e346327774603f8948a0fa301a082be90 /lass/5pkgs/xephyrify | |
parent | 390375cd8a0c745eb6b4df93f3f6f3e5f2985c90 (diff) | |
parent | 6267aa42509a4f56dc95dfc2db7773c33ca12522 (diff) |
Merge branch 'staging/jeschli' of prism.r:stockholm into staging/jeschli
Diffstat (limited to 'lass/5pkgs/xephyrify')
-rw-r--r-- | lass/5pkgs/xephyrify/default.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lass/5pkgs/xephyrify/default.nix b/lass/5pkgs/xephyrify/default.nix new file mode 100644 index 000000000..8b18ea949 --- /dev/null +++ b/lass/5pkgs/xephyrify/default.nix @@ -0,0 +1,42 @@ +{ writeDashBin, writeHaskell, coreutils, xorg, virtualgl, ... }: + +let + + minimalXmonad = writeHaskell "minimalXmonad" { + executables.xmonad = { + extra-depends = [ + "containers" + "xmonad" + ]; + text = /* haskell */ '' + module Main where + import XMonad + import qualified Data.Map as Map + + main :: IO () + main = do + xmonad def + { workspaces = [ "1" ] + , layoutHook = myLayoutHook + , keys = myKeys + , normalBorderColor = "#000000" + , focusedBorderColor = "#000000" + } + + myLayoutHook = Full + myKeys _ = Map.fromList [] + ''; + }; + }; + +in writeDashBin "xephyrify" '' + NDISPLAY=:$(${coreutils}/bin/shuf -i 100-65536 -n 1) + echo "using DISPLAY $NDISPLAY" + ${xorg.xorgserver}/bin/Xephyr -br -ac -reset -terminate -resizeable $NDISPLAY & + XEPHYR_PID=$! + DISPLAY=$NDISPLAY ${minimalXmonad}/bin/xmonad & + XMONAD_PID=$! + DISPLAY=$NDISPLAY ${virtualgl}/bin/vglrun "$@" + kill $XMONAD_PID + kill $XEPHYR_PID +'' |