summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jeschli/5pkgs/simple/xmonad-jeschli/default.nix9
-rw-r--r--krebs/5pkgs/haskell/xmonad-stockholm.nix12
-rw-r--r--lass/5pkgs/custom/xmonad-lass/default.nix10
-rw-r--r--tv/2configs/xserver/default.nix2
-rw-r--r--tv/5pkgs/simple/xmonad-tv/default.nix22
5 files changed, 22 insertions, 33 deletions
diff --git a/jeschli/5pkgs/simple/xmonad-jeschli/default.nix b/jeschli/5pkgs/simple/xmonad-jeschli/default.nix
index 4ebd98f09..827c77b77 100644
--- a/jeschli/5pkgs/simple/xmonad-jeschli/default.nix
+++ b/jeschli/5pkgs/simple/xmonad-jeschli/default.nix
@@ -24,8 +24,9 @@ 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, lookupEnv)
+import System.Exit (exitFailure)
+import System.IO (hPutStrLn, stderr)
import System.Posix.Process (executeFile)
import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace
, removeEmptyWorkspace)
@@ -66,12 +67,14 @@ myFont = "-schumacher-*-*-*-*-*-*-*-*-*-*-*-iso10646-*"
main :: IO ()
main = getArgs >>= \case
- ["--shutdown"] -> sendShutdownEvent
- _ -> mainNoArgs
+ [] -> mainNoArgs
+ ["--shutdown"] -> shutdown
+ args -> hPutStrLn stderr ("bad arguments: " <> show args) >> exitFailure
mainNoArgs :: IO ()
mainNoArgs = do
workspaces0 <- getWorkspaces0
+ handleShutdownEvent <- newShutdownEventHandler
xmonad
-- $ withUrgencyHookC dzenUrgencyHook { args = ["-bg", "magenta", "-fg", "magenta", "-h", "2"], duration = 500000 }
-- urgencyConfig { remindWhen = Every 1 }
diff --git a/krebs/5pkgs/haskell/xmonad-stockholm.nix b/krebs/5pkgs/haskell/xmonad-stockholm.nix
index 7f6bb299d..228d365a3 100644
--- a/krebs/5pkgs/haskell/xmonad-stockholm.nix
+++ b/krebs/5pkgs/haskell/xmonad-stockholm.nix
@@ -1,16 +1,16 @@
-{ mkDerivation, base, containers, fetchgit, stdenv, X11, X11-xft, X11-xshape
-, xmonad, xmonad-contrib
+{ mkDerivation, base, containers, fetchgit, filepath, stdenv, unix, X11, X11-xft
+, X11-xshape, xmonad, xmonad-contrib
}:
mkDerivation rec {
pname = "xmonad-stockholm";
- version = "1.2.0";
+ version = "1.3.0";
src = fetchgit {
url = http://cgit.ni.krebsco.de/xmonad-stockholm;
- rev = "refs/tags/v${version}";
- sha256 = "13mvmh3kk9a79l1nii028p0n7l95pb78wz9c4j42l90m02mg6cis";
+ rev = "refs/tags/v1.3.0";
+ sha256 = "1np5126wn67y0a1r60rnkq828s0w9zjnvai4b8zy3yc02xlkrjm9";
};
libraryHaskellDepends = [
- base containers X11 X11-xft X11-xshape xmonad xmonad-contrib
+ base containers filepath unix X11 X11-xft X11-xshape xmonad xmonad-contrib
];
license = stdenv.lib.licenses.mit;
}
diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/5pkgs/custom/xmonad-lass/default.nix
index 087d54eca..3a4970767 100644
--- a/lass/5pkgs/custom/xmonad-lass/default.nix
+++ b/lass/5pkgs/custom/xmonad-lass/default.nix
@@ -25,6 +25,8 @@ import Control.Monad.Extra (whenJustM)
import Data.List (isInfixOf)
import Data.Monoid (Endo)
import System.Environment (getArgs, lookupEnv)
+import System.Exit (exitFailure)
+import System.IO (hPutStrLn, stderr)
import System.Posix.Process (executeFile)
import XMonad.Actions.CopyWindow (copy, kill1)
import XMonad.Actions.CycleWS (toggleWS)
@@ -49,7 +51,7 @@ import XMonad.Util.EZConfig (additionalKeysP)
import XMonad.Util.NamedWindows (getName)
import XMonad.Util.Run (safeSpawn)
-import XMonad.Stockholm.Shutdown (handleShutdownEvent, sendShutdownEvent)
+import XMonad.Stockholm.Shutdown (newShutdownEventHandler, shutdown)
import XMonad.Stockholm.Pager (defaultWindowColors, pager, MatchMethod(MatchPrefix), PagerConfig(..))
data LibNotifyUrgencyHook = LibNotifyUrgencyHook deriving (Read, Show)
@@ -69,11 +71,13 @@ myFont = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1"
main :: IO ()
main = getArgs >>= \case
- ["--shutdown"] -> sendShutdownEvent
- _ -> main'
+ [] -> main'
+ ["--shutdown"] -> shutdown
+ args -> hPutStrLn stderr ("bad arguments: " <> show args) >> exitFailure
main' :: IO ()
main' = do
+ handleShutdownEvent <- newShutdownEventHandler
xmonad $ ewmh
$ withUrgencyHook LibNotifyUrgencyHook
$ def
diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix
index 199ffcaf8..a44ece8b1 100644
--- a/tv/2configs/xserver/default.nix
+++ b/tv/2configs/xserver/default.nix
@@ -101,7 +101,7 @@ in {
"\${XMONAD_DATA_DIR}"
]}";
ExecStart = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem}";
- ExecStop = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem} --shutdown $MAINPID";
+ ExecStop = "${pkgs.xmonad-tv}/bin/xmonad-${currentSystem} --shutdown";
User = cfg.user.name;
WorkingDirectory = cfg.user.home;
};
diff --git a/tv/5pkgs/simple/xmonad-tv/default.nix b/tv/5pkgs/simple/xmonad-tv/default.nix
index ab4be91f3..edfee98a0 100644
--- a/tv/5pkgs/simple/xmonad-tv/default.nix
+++ b/tv/5pkgs/simple/xmonad-tv/default.nix
@@ -19,10 +19,7 @@ pkgs.writeHaskellPackage "xmonad-tv" {
module Main where
-import System.IO.Error (isDoesNotExistError, tryIOError)
import System.Exit (exitFailure)
-import Control.Monad (forever)
-import Control.Concurrent (threadDelay)
import Control.Exception
import Control.Monad.Extra (whenJustM)
@@ -32,8 +29,6 @@ import XMonad
import System.IO (hPutStrLn, stderr)
import System.Environment (getArgs, getEnv, getEnvironment, lookupEnv)
import System.Posix.Process (executeFile)
-import System.Posix.Signals (nullSignal, signalProcess)
-import System.Posix.Types (ProcessID)
import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace
, removeEmptyWorkspace)
import XMonad.Actions.GridSelect
@@ -65,26 +60,13 @@ myFont = "-schumacher-*-*-*-*-*-*-*-*-*-*-*-iso10646-*"
main :: IO ()
main = getArgs >>= \case
[] -> mainNoArgs
- ["--shutdown", pidArg] -> mainShutdown (read pidArg)
+ ["--shutdown"] -> shutdown
args -> hPutStrLn stderr ("bad arguments: " <> show args) >> exitFailure
-mainShutdown :: ProcessID -> IO ()
-mainShutdown pid = do
- sendShutdownEvent
- hPutStrLn stderr ("waiting for: " <> show pid)
- result <- tryIOError (waitProcess pid)
- if isSuccess result
- then hPutStrLn stderr ("result: " <> show result <> " [AKA success^_^]")
- else hPutStrLn stderr ("result: " <> show result)
- where
- isSuccess = either isDoesNotExistError (const False)
-
-waitProcess :: ProcessID -> IO ()
-waitProcess pid = forever (signalProcess nullSignal pid >> threadDelay 10000)
-
mainNoArgs :: IO ()
mainNoArgs = do
workspaces0 <- getWorkspaces0
+ handleShutdownEvent <- newShutdownEventHandler
xmonad
$ withUrgencyHook (SpawnUrgencyHook "echo emit Urgency ")
$ def