xmonad-config/lib/Shell.hs

25 lines
474 B
Haskell
Raw Normal View History

2020-03-18 12:17:39 -04:00
module Shell where
import XMonad
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 #!>>