alfred-0.2: utility library for Alfred version 2

Safe HaskellNone

Alfred

Synopsis

Documentation

data Item Source

This type represents items that should be rendered by Alfred as the result of a script filter.

Constructors

Item 

item :: ItemSource

Default item.

data Icon Source

Represents icons of an item.

type Renderer a = Renderer' Text aSource

This type represents rendering functions as used by runScript.

type Renderer' q a = q -> Either String a -> ItemsSource

This type represents rendering functions as used by runScript'.

runScriptSource

Arguments

:: Query a

query function

-> Renderer a

rendering function

-> IO () 

This function runs a script consisting of a query function and a rendering function. The query function takes string parameters and produces an output that is then passed to the rendering function to produce items that are then passed to Alfred.

runScript'Source

Arguments

:: ([Text] -> q) 
-> Query' q a

query function

-> Renderer' q a

rendering function

-> IO () 

This function runs a script consisting of a query function and a rendering function. The query function takes string parameters and produces an output that is then passed to the rendering function to produce items that are then passed to Alfred.

data Search Source

This data type represents standard search scripts used by searchRenderer.

Constructors

Search 

Fields

searchURL :: Text -> Text
 
found :: Text -> Text
 
notFound :: Text -> Text
 
suggestError :: Text -> Text