Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denpamusic/lua-lcdproc
LCDproc client for Lua
https://github.com/denpamusic/lua-lcdproc
client lcd-display lcdproc lcdproc-client lua lua-lcdproc lua-library luasocket
Last synced: about 1 month ago
JSON representation
LCDproc client for Lua
- Host: GitHub
- URL: https://github.com/denpamusic/lua-lcdproc
- Owner: denpamusic
- License: mit
- Created: 2020-02-27T11:10:09.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-09T10:47:30.000Z (over 4 years ago)
- Last Synced: 2024-10-30T19:46:24.290Z (3 months ago)
- Topics: client, lcd-display, lcdproc, lcdproc-client, lua, lua-lcdproc, lua-library, luasocket
- Language: Lua
- Homepage: https://lua-lcdproc.denpa.pro/
- Size: 146 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lua-lcdproc - LCDproc client for Lua
## About
lua-lcdproc is a client for [LCDproc](https://github.com/lcdproc/lcdproc) server
written in Lua language using LuaSocket.## Installation
This project is available on [luarocks](https://luarocks.org/modules/denpamusic/lua-lcdproc).
```
$ luarocks install lua-lcdproc
```## OpenWrt
You can get OpenWRT package from [my feed](https://github.com/denpamusic/openwrt-feed):
```
$ wget -P /etc/opkg/keys/ http://openwrt.denpa.pro/keys/4b148d164b058d87
$ echo src/gz denpamusic http://openwrt.denpa.pro/packages >> /etc/opkg/customfeeds.conf
$ opkg update && opkg install lua-lcdproc
```## Usage
```lua
local LCDproc = require "lcdproc"-- firstly create client instance
local lcd = LCDproc("localhost", 13666)-- then create some screens...
local screen = lcd:add_screen("my_screen")-- ...and add some widgets to it
screen:add_title("one", "Title Text")
screen:add_string("two", 1, 2, "First Line Text")
screen:add_string("three", 1, 3, "Second Line Text")
screen:add_string("four", 1, 4, "Third Line Text")lcd:on_listen(function (screen)
-- text will be updated once screen is visible
screen.widgets.two:set_text("First Line Now Has New Text")
screen.widgets.three:set_text("Second Line Also Does")
end)lcd:on_ignore(function (screen)
-- do something on screen hide
end)while true do
local line = lcd:poll()
endlcd:close()
```## Documentation
Full documentation is available at [here](https://lua-lcdproc.denpa.pro).