Skip to content

A-Cloud-Ninja/ironbar-ipc-luajit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ironbar-ipc-luajit

Ironbar IPC implementation for Luajit

Dependencies

Basic usage:

  • require("ironbar") Returns a function to obtain both the ironbar library, and the json library passed through.
local ironbar,json = require("ironbar")()
ironbar.ping()
ironbar.get("key")
ironbar.set("key","value")
ironbar.load_css("/path/to/stylesheet.css")
--I also built some goofy syntax for using it this way
ironbar("ping")
ironbar("get","key")
ironbar("set","key","value")
ironbar("load_css","/path/to/stylesheet.css")

All of these will return the decoded json as a table for use. See https://github.com/JakeStanger/ironbar/wiki/controlling-ironbar for the full list.

Files within

  • cdefs.lua: Luajit FFI Cdefs for unix socket handling
  • packets.lua: Table format for automated parsing of arguments -> json structures. This can also be used a reference for (and parser for, I suppose) argument order and types.
  • ironbar.lua: Main library, returns a function used to get both the ironbar module and json module used within.

ironbar.lua does not directly "expose" any given IPC message. It uses lua metatables to automatically use indexing on the ironbar module to pass through to the corresponding IPC packet (i.e ironbar.ping() -> turns into an internal dispatch(ping) call) This may change as ironbars IPC changes.

About

Ironbar IPC implementation for Luajit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages