summaryrefslogtreecommitdiffstats
path: root/tv
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2015-10-26 11:27:02 +0100
committertv <tv@krebsco.de>2015-10-26 11:27:02 +0100
commit6e3f992fca275bd97d7cd5332724acabfe749884 (patch)
tree7bc9389488061a9bb1e50f8cd1d424f653f9ea06 /tv
parentbd4b77d9411d151b021d8f7d66208c2fa3d74972 (diff)
tv xmonad: provide XMONAD_SPAWN_WORKSPACE
Diffstat (limited to 'tv')
-rw-r--r--tv/2configs/xserver/xmonad/Main.hs10
-rw-r--r--tv/2configs/xserver/xmonad/xmonad.cabal1
2 files changed, 8 insertions, 3 deletions
diff --git a/tv/2configs/xserver/xmonad/Main.hs b/tv/2configs/xserver/xmonad/Main.hs
index 186a5e2..cc95815 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 $
diff --git a/tv/2configs/xserver/xmonad/xmonad.cabal b/tv/2configs/xserver/xmonad/xmonad.cabal
index 00acf17..cc72d39 100644
--- a/tv/2configs/xserver/xmonad/xmonad.cabal
+++ b/tv/2configs/xserver/xmonad/xmonad.cabal
@@ -10,6 +10,7 @@ Executable xmonad
base,
containers,
filepath,
+ unix,
X11,
X11-xshape,
xmonad,