summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/xmonad-lass.nix
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-02-16 00:05:38 +0100
committerlassulus <lass@lassul.us>2017-02-16 00:08:05 +0100
commit679ccce6bd5feef4edd7533a67536836f7b7aa26 (patch)
treef465e04433f875e6c6093a88d562a6d63ce14ceb /lass/5pkgs/xmonad-lass.nix
parent1b5196f4fdc8dc32fb771d518f08a769329b5fd9 (diff)
l 2: use upstream xserver
Diffstat (limited to 'lass/5pkgs/xmonad-lass.nix')
-rw-r--r--lass/5pkgs/xmonad-lass.nix22
1 files changed, 3 insertions, 19 deletions
diff --git a/lass/5pkgs/xmonad-lass.nix b/lass/5pkgs/xmonad-lass.nix
index dd4d8803c..22ec7efa9 100644
--- a/lass/5pkgs/xmonad-lass.nix
+++ b/lass/5pkgs/xmonad-lass.nix
@@ -22,7 +22,7 @@ import XMonad
import qualified XMonad.StackSet as W
import Control.Exception
import Data.List (isInfixOf)
-import System.Environment (getArgs, withArgs, getEnv)
+import System.Environment (getArgs, withArgs)
import System.IO (hPutStrLn, stderr)
import System.Posix.Process (executeFile)
import Text.Read (readEither)
@@ -60,21 +60,17 @@ main = getArgs >>= \case
mainNoArgs :: IO ()
mainNoArgs = do
- workspaces0 <- getWorkspaces0
xmonad'
$ withUrgencyHook (SpawnUrgencyHook "echo emit Urgency ")
$ def
{ terminal = urxvtcPath
, modMask = mod4Mask
- , workspaces = workspaces0
, layoutHook = smartBorders $ myLayoutHook
, manageHook = placeHook (smart (1,0)) <+> floatNextHook
- , startupHook = do
- path <- liftIO (getEnv "XMONAD_STARTUP_HOOK")
- forkFile path [] Nothing
, normalBorderColor = "#1c1c1c"
, focusedBorderColor = "#f000b0"
, handleEventHook = handleShutdownEvent
+ , workspaces = [ "dashboard" ]
} `additionalKeysP` myKeyMap
myLayoutHook = defLayout
@@ -84,7 +80,7 @@ myLayoutHook = defLayout
xmonad' :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO ()
xmonad' conf = do
- path <- getEnv "XMONAD_STATE"
+ let path = "/tmp/xmonad.state"
try (readFile path) >>= \case
Right content -> do
hPutStrLn stderr ("resuming from " ++ path)
@@ -93,18 +89,6 @@ xmonad' conf = do
hPutStrLn stderr (displaySomeException e)
xmonad conf
-getWorkspaces0 :: IO [String]
-getWorkspaces0 =
- try (getEnv "XMONAD_WORKSPACES0_FILE") >>= \case
- Left e -> warn (displaySomeException e)
- Right p -> try (readFile p) >>= \case
- Left e -> warn (displaySomeException e)
- Right x -> case readEither x of
- Left e -> warn e
- Right y -> return y
- where
- warn msg = hPutStrLn stderr ("getWorkspaces0: " ++ msg) >> return []
-
displaySomeException :: SomeException -> String
displaySomeException = displayException