dotfiles/.config/awesome/lanxu
2018-02-03 13:41:40 +02:00
..
dkjson.lua Updated configurations and added new player widget 2017-10-06 22:50:36 +03:00
mcstatus.lua Moved from luasec to pure curl implementation. mcstatus is now async. 2018-02-03 13:41:40 +02:00
mcstatustest.lua Updated configurations and added new player widget 2017-10-06 22:50:36 +03:00
README.md Moved from luasec to pure curl implementation. mcstatus is now async. 2018-02-03 13:41:40 +02:00

lanxu awesome scripts

Requirements

  • dkjson (for parsing json. Available with this widget)

How to use

You may create your widget like this:

local mcstatus = require("lanxu/mcstatus")
myserverstatus = mcstatus({
  settings = function()
    widget.markup = "PLAYERS <b>" .. totalplayers .. "</b>" 
  end
})

After this you can use "myserverstatus" like any other textbox widget

full list of available settings below

myserverstatus = mcstatus({
  hideempty = false,
  hideoffline = true,
  calluri = "https://page.not.found/mc_stats.php?type=server_status",
  settings = function()
    widget.markup = "PLAYERS <b>" .. totalplayers .. "</b>" 
  end
})