summaryrefslogtreecommitdiffstats
path: root/tv/2configs/xserver/xmonad/Main.hs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-26 11:27:02 +0100
committertv <tv@shackspace.de>2015-10-26 11:27:02 +0100
commite5ac86ee44c4e7a5784cef1569873d246352e4fe (patch)
tree6a7bf7ce68f6069a0c83a1f8054599647520fe54 /tv/2configs/xserver/xmonad/Main.hs
parent4b22988392f940c705e7f3fddc39481635777895 (diff)
tv xmonad: provide XMONAD_SPAWN_WORKSPACE
Diffstat (limited to 'tv/2configs/xserver/xmonad/Main.hs')
-rw-r--r--tv/2configs/xserver/xmonad/Main.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/tv/2configs/xserver/xmonad/Main.hs b/tv/2configs/xserver/xmonad/Main.hs
index 186a5e22c..cc958155e 100644
--- a/tv/2configs/xserver/xmonad/Main.hs
+++ b/tv/2configs/xserver/xmonad/Main.hs
@@ -8,7 +8,8 @@ module Main where
import Control.Exception
import Text.Read (readEither)
import XMonad
-import System.Environment (getArgs, getEnv)
+import System.Environment (getArgs, getEnv, getEnvironment)
+import System.Posix.Process (executeFile)
import XMonad.Prompt (defaultXPConfig)
import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace
, removeEmptyWorkspace)
@@ -100,8 +101,11 @@ displaySomeException = displayException
spawnTermAt :: String -> X ()
--spawnTermAt _ = floatNext True >> spawn myTerm
--spawnTermAt "ff" = floatNext True >> spawn myTerm
-spawnTermAt _ = spawn myTerm
-
+--spawnTermAt _ = spawn myTerm
+spawnTermAt ws = do
+ env <- liftIO getEnvironment
+ let env' = ("XMONAD_SPAWN_WORKSPACE", ws) : env
+ xfork (executeFile "urxvtc" True [] (Just env')) >> return ()
myKeys :: XConfig Layout -> Map (KeyMask, KeySym) (X ())
myKeys conf = Map.fromList $