meck / alfred-footman

A library for writing script filters for Alfred in Haskell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
  • Requires stack
  • The code is documented with haddock
  • There is an test workflow included in app/Main.hs that can be built with ./buildexample.sh

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.

About

A library for writing script filters for Alfred in Haskell

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 98.9%Language:Shell 1.1%