diff options
author | lassulus <lassulus@lassul.us> | 2018-03-06 21:30:05 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-03-06 21:30:05 +0100 |
commit | 02f67eed443ba552d775d1a0ab7860d439f7552b (patch) | |
tree | 3d9bcb9e7424ebdd04bf8ddcaf96f11626ea351b /lass | |
parent | bec10e329b2fa74251043da7ebc6c7943a97205d (diff) |
l xephyrify: add minimal xmonad
Diffstat (limited to 'lass')
-rw-r--r-- | lass/5pkgs/xephyrify/default.nix | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/lass/5pkgs/xephyrify/default.nix b/lass/5pkgs/xephyrify/default.nix index cd918af37..8b18ea949 100644 --- a/lass/5pkgs/xephyrify/default.nix +++ b/lass/5pkgs/xephyrify/default.nix @@ -1,9 +1,42 @@ -{ writeDashBin, coreutils, xorg, virtualgl, ... }: +{ writeDashBin, writeHaskell, coreutils, xorg, virtualgl, ... }: -writeDashBin "xephyrify" '' +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 '' |