Home

Awesome

alfred-footman

A library for writing script filters in Alfred persistent state

Somewhat a WIP.

Example usage:

import Alfred
import Data.Time.LocalTime

myReturn :: AlfM String Return
myReturn = do
  time <- liftIO getZonedTime
  prevTime <- get
  put $ show time
  return $ defaultReturn
    { items = [ defaultItem { title    = "Time"
                            , subtitle = Just "Outputs the last time the scipt was run"
                            , arg      = Just $ show prevTime }]}

main = alfMain myReturn

Use with alfred

The easiest way to develop a workflow is to point the script action you are making to ~/.local/bin/<yourexe> and run stack install while testing, and when done copy the executable into the script folder.