tv xmonad: center float all pinentry windows
This commit is contained in:
parent
e7116bc68e
commit
d59ef4a45c
@ -8,6 +8,7 @@ import System.Exit (exitFailure)
|
|||||||
|
|
||||||
import Control.Exception
|
import Control.Exception
|
||||||
import Control.Monad.Extra (whenJustM)
|
import Control.Monad.Extra (whenJustM)
|
||||||
|
import qualified Data.List
|
||||||
import Graphics.X11.ExtraTypes.XF86
|
import Graphics.X11.ExtraTypes.XF86
|
||||||
import Text.Read (readEither)
|
import Text.Read (readEither)
|
||||||
import XMonad
|
import XMonad
|
||||||
@ -59,6 +60,11 @@ main = getArgs >>= \case
|
|||||||
args -> hPutStrLn stderr ("bad arguments: " <> show args) >> exitFailure
|
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 :: IO ()
|
||||||
mainNoArgs = do
|
mainNoArgs = do
|
||||||
workspaces0 <- getWorkspaces0
|
workspaces0 <- getWorkspaces0
|
||||||
@ -82,7 +88,7 @@ mainNoArgs = do
|
|||||||
, manageHook =
|
, manageHook =
|
||||||
composeAll
|
composeAll
|
||||||
[ appName =? "fzmenu-urxvt" --> doCenterFloat
|
[ appName =? "fzmenu-urxvt" --> doCenterFloat
|
||||||
, appName =? "pinentry" --> doCenterFloat
|
, appName `queryPrefix` "pinentry" --> doCenterFloat
|
||||||
, title =? "Upload to Imgur" -->
|
, title =? "Upload to Imgur" -->
|
||||||
doRectFloat (W.RationalRect 0 0 (1 % 8) (1 % 8))
|
doRectFloat (W.RationalRect 0 0 (1 % 8) (1 % 8))
|
||||||
, placeHook (smart (1,0))
|
, placeHook (smart (1,0))
|
||||||
|
Loading…
Reference in New Issue
Block a user