summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-02-05 18:31:27 +0000
committerjao <jao@gnu.org>2024-02-05 18:31:27 +0000
commitc54d93e6d4d6c0d194bcd8696dce92da9f795869 (patch)
tree22e05dd920dcde337178bfb8636a163d07bb99e1
parent915b869896404d60bc6aa41c4c3c9311237595f2 (diff)
downloadxmobar-c54d93e6d4d6c0d194bcd8696dce92da9f795869.tar.gz
xmobar-c54d93e6d4d6c0d194bcd8696dce92da9f795869.tar.bz2
actions: spawnCommand instead of deprecated system
This should address the problems reported in issue #688
-rw-r--r--src/Xmobar/Run/Actions.hs6
-rw-r--r--xmobar.cabal2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Xmobar/Run/Actions.hs b/src/Xmobar/Run/Actions.hs
index 2a49312..51dbb85 100644
--- a/src/Xmobar/Run/Actions.hs
+++ b/src/Xmobar/Run/Actions.hs
@@ -16,7 +16,7 @@ module Xmobar.Run.Actions ( Button
, runAction'
, stripActions) where
-import System.Process (system)
+import System.Process (spawnCommand)
import Control.Monad (void)
import Text.Regex (Regex, subRegex, mkRegex, matchRegex)
import Data.Word (Word32)
@@ -26,11 +26,11 @@ type Button = Word32
data Action = Spawn [Button] String deriving (Eq, Read, Show)
runAction :: Action -> IO ()
-runAction (Spawn _ s) = void $ system (s ++ "&")
+runAction (Spawn _ s) = void $ spawnCommand s
-- | Run action with stdout redirected to stderr
runAction' :: Action -> IO ()
-runAction' (Spawn _ s) = void $ system (s ++ " 1>&2 &")
+runAction' (Spawn _ s) = void $ spawnCommand (s ++ " 1>&2")
stripActions :: String -> String
stripActions s = case matchRegex actionRegex s of
diff --git a/xmobar.cabal b/xmobar.cabal
index 3694e49..7559af2 100644
--- a/xmobar.cabal
+++ b/xmobar.cabal
@@ -1,5 +1,5 @@
name: xmobar
-version: 0.47.2
+version: 0.48
homepage: https://codeberg.org/xmobar/xmobar
synopsis: A Minimalistic Text Based Status Bar
description: Xmobar is a minimalistic text based status bar.