xmonad-config/lib/XMonad/Internal/Shell.hs

31 lines
561 B
Haskell
Raw Normal View History

2020-04-01 20:17:47 -04:00
module XMonad.Internal.Shell
( fmtCmd
, spawnCmd
, (#!&&)
, (#!||)
, (#!>>)
) where
2020-03-18 12:17:39 -04:00
2020-03-28 18:38:38 -04:00
import XMonad
2020-03-18 12:17:39 -04:00
fmtCmd :: String -> [String] -> String
fmtCmd cmd args = unwords $ cmd : args
spawnCmd :: String -> [String] -> X ()
spawnCmd cmd args = spawn $ fmtCmd cmd args
(#!&&) :: String -> String -> String
cmdA #!&& cmdB = cmdA ++ " && " ++ cmdB
infixr 0 #!&&
(#!||) :: String -> String -> String
cmdA #!|| cmdB = cmdA ++ " || " ++ cmdB
infixr 0 #!||
(#!>>) :: String -> String -> String
cmdA #!>> cmdB = cmdA ++ "; " ++ cmdB
infixr 0 #!>>