ADD rofi-bw and rofi-dev selectors

This commit is contained in:
Nathan Dwarshuis 2020-05-02 00:02:29 -04:00
parent 0374b8768c
commit db7aa8ce6a
2 changed files with 15 additions and 3 deletions

View File

@ -405,6 +405,7 @@ mkKeys ts c =
, ("M-a", "launch network selector", runNetMenu) , ("M-a", "launch network selector", runNetMenu)
, ("M-w", "launch window selector", runWinMenu) , ("M-w", "launch window selector", runWinMenu)
, ("M-u", "launch device selector", runDevMenu) , ("M-u", "launch device selector", runDevMenu)
, ("M-b", "launch bitwarden selector", runBwMenu)
, ("M-C-e", "launch editor", runEditor) , ("M-C-e", "launch editor", runEditor)
, ("M-C-w", "launch browser", runBrowser) , ("M-C-w", "launch browser", runBrowser)
, ("M-C-t", "launch terminal", runTerm) , ("M-C-t", "launch terminal", runTerm)

View File

@ -8,6 +8,7 @@ module XMonad.Internal.Command.DMenu
, runWinMenu , runWinMenu
, runNetMenu , runNetMenu
, runDevMenu , runDevMenu
, runBwMenu
, runShowKeys , runShowKeys
) where ) where
@ -82,7 +83,7 @@ spawnDmenuCmd :: String -> [String] -> X ()
spawnDmenuCmd cmd args = do spawnDmenuCmd cmd args = do
name <- getMonitorName name <- getMonitorName
case name of case name of
Just n -> spawnCmd cmd $ ["-m", n] ++ args Just n -> spawnCmd cmd $ args ++ ["-m", n]
Nothing -> io $ putStrLn "fail" Nothing -> io $ putStrLn "fail"
spawnDmenuCmd' :: [String] -> X () spawnDmenuCmd' :: [String] -> X ()
@ -91,6 +92,18 @@ spawnDmenuCmd' = spawnDmenuCmd myDmenuCmd
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- | Exported Commands -- | Exported Commands
devSecrets :: [String]
devSecrets = concatMap (\x -> ["-s", x])
[ "/media/ndwar/Roylab:user=ndwarshuis3@gatech.edu,host=outlook.office365.com"
, "/media/ndwar/MC3M:user=ndwarshuis3@gatech.edu,host=outlook.office365.com"
]
runDevMenu :: X ()
runDevMenu = spawnDmenuCmd "rofi-dev" $ devSecrets ++ ["--"]
runBwMenu :: X ()
runBwMenu = spawnDmenuCmd "rofi-bw" ["-c", "--"]
runShowKeys :: [((KeyMask, KeySym), NamedAction)] -> NamedAction runShowKeys :: [((KeyMask, KeySym), NamedAction)] -> NamedAction
runShowKeys x = addName "Show Keybindings" $ do runShowKeys x = addName "Show Keybindings" $ do
name <- getMonitorName name <- getMonitorName
@ -128,5 +141,3 @@ runWinMenu = spawnDmenuCmd' ["-show", "window"]
runNetMenu :: X () runNetMenu :: X ()
runNetMenu = spawnDmenuCmd "networkmanager_dmenu" [] runNetMenu = spawnDmenuCmd "networkmanager_dmenu" []
runDevMenu :: X ()
runDevMenu = spawnDmenuCmd "rofi-devices" []