diff options
Diffstat (limited to 'tv/5pkgs')
-rw-r--r-- | tv/5pkgs/default.nix | 9 | ||||
-rw-r--r-- | tv/5pkgs/simple/xmonad-tv/default.nix | 10 |
2 files changed, 6 insertions, 13 deletions
diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index 261871e62..82474ade5 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -33,13 +33,4 @@ foldl' mergeAttrs {} ''; gnupg = self.gnupg22; - - # https://github.com/NixOS/nixpkgs/issues/16113 - wvdial = let - nixpkgs-1509 = import (self.fetchFromGitHub { - owner = "NixOS"; repo = "nixpkgs-channels"; - rev = "91371c2bb6e20fc0df7a812332d99c38b21a2bda"; - sha256 = "1as1i0j9d2n3iap9b471y4x01561r2s3vmjc5281qinirlr4al73"; - }) {}; - in nixpkgs-1509.wvdial; } 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 |