summaryrefslogtreecommitdiffhomepage
path: root/src/Actions.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Actions.hs')
-rw-r--r--src/Actions.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Actions.hs b/src/Actions.hs
index 5bcfea7..cd8ecb9 100644
--- a/src/Actions.hs
+++ b/src/Actions.hs
@@ -12,7 +12,7 @@
module Actions (Action(..), runAction, stripActions) where
-import System.Process (runCommand)
+import System.Process (system)
import Control.Monad (void)
import Text.Regex (Regex, subRegex, mkRegex, matchRegex)
import Graphics.X11.Types (Button)
@@ -21,14 +21,14 @@ data Action = Spawn [Button] String
deriving (Eq)
runAction :: Action -> IO ()
-runAction (Spawn _ s) = void $ runCommand s
+runAction (Spawn _ s) = void $ system (s ++ "&")
stripActions :: String -> String
stripActions s = case matchRegex actionRegex s of
Nothing -> s
Just _ -> stripActions strippedOneLevel
where
- strippedOneLevel = subRegex actionRegex s $ "[action=\\1\\2]\\3[/action]"
+ strippedOneLevel = subRegex actionRegex s "[action=\\1\\2]\\3[/action]"
actionRegex :: Regex
actionRegex = mkRegex "<action=`?([^>`]*)`?( +button=[12345]+)?>(.+)</action>"