MyNixOS website logo
Description

a "Desktop Workflow" monad with Objective-C bindings.

a "Desktop Workflow" monad with Objective-C bindings.

includes bindings to:

  • press keys with modifiers

  • get/set the clipboard

  • launch/focus applications

  • get the name of the current application

  • open URLs

for example:

-- | cut the currently highlighted region
cut :: (MonadWorkflow m) => m String
cut = do
 sendKeyChord [CommandModifier] XKey
 delay 250
 getClipboard
-- | transform the currently highlighted region, via the clipboard
transformClipboard :: (MonadWorkflow m) => (String -> String) -> m ()
transformClipboard f = do
 contents <- cut
 setClipboard (f contents)
 sendKeyChord [CommandModifier] VKey

see Workflow.OSX for several more examples

(if hackage won't build the docs, see them at http://sboosali.github.io/documentation/workflow-osx/index.html)

(this package is on hackage for convenience, but it's still a prerelease)

workflow-osx

a (free) monad, with Objective-C bindings, for "Workflow" actions.

for detailed examples, see the documentation on hackage https://hackage.haskell.org/package/workflow-osx or github (<http://sboosali.github.io/documentation/workflow-osx/index.html).

Issues

the build

foreign dependencies always complicate the build process. it's known to work with the following:

  • OS

      $ sw_vers
      ProductName:	Mac OS X
      ProductVersion:	10.9.5
      BuildVersion:	13F34
    
  • C compiler

      $ gcc --version
      Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
      Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
      Target: x86_64-apple-darwin13.4.0
      Thread model: posix
    
  • Haskell compiler

      $ ghc --version 
      The Glorious Glasgow Haskell Compilation System, version 7.10.1
    

TODO

platform agnosticism

exploit the free monad's flexibility to define platform-agnostic workflows

problem: windows (Linux/Windows) versus processes (OS X)

problem: keyboards. Apple keyboards don't have the Windows key, Windows keyboards don't have the Apple key. some keyboards have a dozen random extra unbound keys.

automatic delay insertion

problem: currently, delays must be inserted manually. keyboard shortcuts in Emacs succeed with no delay. keyboard shortcuts in Chrome, like closing a tab with M-w, may drop without a long delay (like 250ms). furthermore, different actions need different delays between them (e.g. inserting text into Chrome can be done without delay).

parameterize Workflow on a keyboard type.

Metadata

Version

0.0.1

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows