diff options
author | makefu <github@syntax-fehler.de> | 2017-11-15 16:43:36 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-11-15 16:43:36 +0100 |
commit | f70cfd8f1f90872e7e4b413d66f43f0eb1a3cf57 (patch) | |
tree | 4245e3c7fb93d0d33535bc885e0a3684da99d64f /tv/5pkgs/simple/xmonad-tv/default.nix | |
parent | 379ef615059bdda14c751bad9352504cac37f96d (diff) | |
parent | 2f183f41ca257fbe9b48b58314849175ceb2dc6b (diff) |
Merge remote-tracking branch 'tv/master'
Diffstat (limited to 'tv/5pkgs/simple/xmonad-tv/default.nix')
-rw-r--r-- | tv/5pkgs/simple/xmonad-tv/default.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tv/5pkgs/simple/xmonad-tv/default.nix b/tv/5pkgs/simple/xmonad-tv/default.nix index f73175bb1..94554f57c 100644 --- a/tv/5pkgs/simple/xmonad-tv/default.nix +++ b/tv/5pkgs/simple/xmonad-tv/default.nix @@ -3,6 +3,7 @@ pkgs.writeHaskell "xmonad-tv" { executables.xmonad = { extra-depends = [ "containers" + "extra" "unix" "X11" "xmonad" @@ -19,11 +20,12 @@ pkgs.writeHaskell "xmonad-tv" { module Main where import Control.Exception +import Control.Monad.Extra (whenJustM) import Graphics.X11.ExtraTypes.XF86 import Text.Read (readEither) import XMonad import System.IO (hPutStrLn, stderr) -import System.Environment (getArgs, withArgs, getEnv, getEnvironment) +import System.Environment (getArgs, withArgs, getEnv, getEnvironment, lookupEnv) import System.Posix.Process (executeFile) import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace , removeEmptyWorkspace) @@ -84,9 +86,9 @@ mainNoArgs = do -- , handleEventHook = myHandleEventHooks <+> handleTimerEvent --, handleEventHook = handleTimerEvent , manageHook = placeHook (smart (1,0)) <+> floatNextHook - , startupHook = do - path <- liftIO (getEnv "XMONAD_STARTUP_HOOK") - forkFile path [] Nothing + , startupHook = + whenJustM (liftIO (lookupEnv "XMONAD_STARTUP_HOOK")) + (\path -> forkFile path [] Nothing) , normalBorderColor = "#1c1c1c" , focusedBorderColor = "#f000b0" , handleEventHook = handleShutdownEvent |