summaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorSpencer Janssen <spencerjanssen@gmail.com>2009-01-17 04:49:59 +0100
committerSpencer Janssen <spencerjanssen@gmail.com>2009-01-17 04:49:59 +0100
commitd200a1bb6dda29222ab948c2b8d8d69139cbd31e (patch)
tree173e1553bbe2a875c1e90fa50d6c9fe32f1c5554 /XMonad
parent1b2ce920c53098b76043bcf17db31068fdba7a15 (diff)
downloadmetatile-d200a1bb6dda29222ab948c2b8d8d69139cbd31e.tar
metatile-d200a1bb6dda29222ab948c2b8d8d69139cbd31e.zip
Add --restart, a command line flag to cause a running xmonad process to restart
Ignore-this: 45c8c8aba7cc7391b95c7e3fb01e5bf9 darcs-hash:20090117034959-25a6b-794fb65d26a59f6ca34b16538c35dc3c266ced7d
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Main.hsc6
1 files changed, 6 insertions, 0 deletions
diff --git a/XMonad/Main.hsc b/XMonad/Main.hsc
index 99bc77f..27295ba 100644
--- a/XMonad/Main.hsc
+++ b/XMonad/Main.hsc
@@ -280,6 +280,12 @@ handle (ConfigureEvent {ev_window = w}) = whenX (isRoot w) rescreen
handle PropertyEvent { ev_event_type = t, ev_atom = a }
| t == propertyNotify && a == wM_NAME = userCodeDef () =<< asks (logHook . config)
+handle e@ClientMessageEvent { ev_message_type = mt } = do
+ a <- getAtom "XMONAD_RESTART"
+ if (mt == a)
+ then restart "xmonad" True
+ else broadcastMessage e
+
handle e = broadcastMessage e -- trace (eventName e) -- ignoring