summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/haskell/xmonad-tv/src
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2021-01-18 21:13:46 +0100
committerlassulus <lassulus@lassul.us>2021-01-18 21:13:46 +0100
commitc5b36af49fdfac5934edd376c8de84a6947ebd4a (patch)
treed467593699cad09b06c779f60ce6164d55bf6f20 /tv/5pkgs/haskell/xmonad-tv/src
parentdba3ca21f28dbb213d6dc44cfc301a958f87a623 (diff)
parentff6f5ef5e1cdbd27b2211c54643fa2754f888cbb (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/5pkgs/haskell/xmonad-tv/src')
-rw-r--r--tv/5pkgs/haskell/xmonad-tv/src/main.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/tv/5pkgs/haskell/xmonad-tv/src/main.hs b/tv/5pkgs/haskell/xmonad-tv/src/main.hs
index b8ddd27e8..50b03d81c 100644
--- a/tv/5pkgs/haskell/xmonad-tv/src/main.hs
+++ b/tv/5pkgs/haskell/xmonad-tv/src/main.hs
@@ -8,6 +8,7 @@ import System.Exit (exitFailure)
import Control.Exception
import Control.Monad.Extra (whenJustM)
+import qualified Data.List
import Graphics.X11.ExtraTypes.XF86
import Text.Read (readEither)
import XMonad
@@ -59,6 +60,11 @@ main = getArgs >>= \case
args -> hPutStrLn stderr ("bad arguments: " <> show args) >> exitFailure
+queryPrefix :: Query String -> String -> Query Bool
+queryPrefix query prefix =
+ fmap (Data.List.isPrefixOf prefix) query
+
+
mainNoArgs :: IO ()
mainNoArgs = do
workspaces0 <- getWorkspaces0
@@ -82,7 +88,7 @@ mainNoArgs = do
, manageHook =
composeAll
[ appName =? "fzmenu-urxvt" --> doCenterFloat
- , appName =? "pinentry" --> doCenterFloat
+ , appName `queryPrefix` "pinentry" --> doCenterFloat
, title =? "Upload to Imgur" -->
doRectFloat (W.RationalRect 0 0 (1 % 8) (1 % 8))
, placeHook (smart (1,0))