-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Utilities (e.g. Googling the clipboard contents) for the `workflow` pacakge -- -- Over functions to defined your own custom workflows, which should be -- shareable across platforms. (for example, the usage of M-c -- ("meta") over A-c ("alt") or C-c ("control") is -- encouraged). -- -- documention at Workflow.Derived. -- -- see the source of Workflow.Derived.Main for an example. -- -- Combine with one of the platform-specific packages -- (workflow-osx, workflow-windows, -- workflow-x11, etc) with Workflow.Derived.Repl to -- verify that the bindings behave correctly on your system. -- -- transitive dependencies: -- @package workflow-extra @version 0.0.1 -- | A command line interface for manual integration testing. -- -- cmdln is parametrized over a platform-specific workflow -- executor. module Workflow.Derived.Repl type WorkflowIO_ = WorkflowT IO () data Action Quit :: Action Help :: Action Stay :: (WorkflowIO_) -> Action Pause :: Int -> (WorkflowIO_) -> Action Action :: (WorkflowIO_) -> Action -- | prefix with a number to pause (for that many seconds) before -- execution. -- -- prefix with "stay" to disable "alt-tab"ing before execution. -- -- e.g. -- --
-- > help -- ... -- > stay paste -- > copy # (Having selected some text topmost (besides the current) window) -- > 1000 paste # Wait a second before pasting -- > quit --cmdln :: ExecuteWorkflow -> IO () evalAction :: ExecuteWorkflow -> String -> Maybe (IO ()) runAction :: ExecuteWorkflow -> Action -> Maybe (IO ()) help :: IO () parseAction :: String -> Action gAction :: Grammar r (Prod r e [Char] Action) module Workflow.Derived.Extra failed :: (MonadThrow m) => String -> m a nothing :: (Monad m) => m () maybe2bool :: Maybe a -> Bool either2maybe :: Either e a -> Maybe a either2bool :: Either e a -> Bool module Workflow.Derived chord :: MonadFree WorkflowF m0 => [Modifier] -> Key -> m0 () -- | access the currently selected region from Haskell, by copying to the -- clipboard, via the default keyboard shortcut. (waits 30ms) copy :: (MonadWorkflow m) => m String -- | paste via the default keyboard shortcut. paste :: (MonadWorkflow m) => m () zoomInByKeyboard :: MonadFree WorkflowF m0 => m0 () zoomOutByKeyboard :: MonadFree WorkflowF m0 => m0 () insert :: MonadFree WorkflowF m0 => String -> m0 () -- | "paste" by directly inserting the current clipboard contents. paste' :: (MonadWorkflow m) => m () click :: (MonadWorkflow m) => [Modifier] -> Natural -> MouseButton -> m () leftClick :: MonadFree WorkflowF m0 => m0 () middleClick :: MonadFree WorkflowF m0 => m0 () rightClick :: MonadFree WorkflowF m0 => m0 () doubleClick :: MonadFree WorkflowF m0 => m0 () tripleClick :: MonadFree WorkflowF m0 => m0 () controlClick :: MonadFree WorkflowF m0 => m0 () shiftClick :: MonadFree WorkflowF m0 => m0 () scroll :: MonadFree WorkflowF m0 => [Modifier] -> MouseScroll -> Natural -> m0 () ticks :: Num a => a -> a -- | scroll one "tick" of the wheel. scrollOnce :: MonadFree WorkflowF m0 => MouseScroll -> m0 () zoomInByMouse :: MonadFree WorkflowF m0 => m0 () zoomOutByMouse :: MonadFree WorkflowF m0 => m0 () flingAway :: MonadFree WorkflowF m0 => m0 () wait :: (MonadWorkflow m, Integral a) => a -> m () -- | google a query. properly encodes the url. google :: (MonadWorkflow m) => String -> m () -- | intersperse a delay between each action. -- --
-- delayWorkflowT 1 $ do -- sendKeyChord [CommandModifier] VKey -- s <- getClipboard -- sendText s ---- -- is equivalent to: -- --
-- do -- sendKeyChord [CommandModifier] VKey -- delay 1 -- s <- getClipboard -- delay 1 -- sendText s --delayWorkflowT :: (Monad m) => Int -> WorkflowT m a -> WorkflowT m a sendTextEach :: (MonadWorkflow m) => Int -> String -> m () digit2keychord :: (MonadThrow m, Num i, Eq i, Show i) => i -> m KeyChord module Workflow.Derived.Main main :: IO ()