Add BACKGROUND-QUTEBROWSER-INSTANCES

This commit is contained in:
Leon Kowarschick 2020-05-16 22:02:51 +02:00
parent 6baba38cd7
commit 975c6265d7

View file

@ -331,7 +331,7 @@ myKeys =
-- For this to work, the window needs to have the `_NET_WM_PID` set and unique!
launchWithBackgroundInstance :: (Query Bool) -> String -> X ()
launchWithBackgroundInstance windowQuery commandToRun = withWindowSet $ \winSet -> do
quteWins <- (W.allWindows winSet) |> filter (\win -> Just True == fmap ("NSP" ==) (W.findTag win winSet))
quteWins <- (W.allWindows winSet) |> filter (\win -> Just True == (("NSP" ==) <$> (W.findTag win winSet)))
|> filterM (runQuery windowQuery)
case quteWins of
[] -> do spawnHere commandToRun