delta
f42a3a2cc9
add new icons, switch over to using stylesheets instead of gears.color.recolor_image, add a music widget to the panel, optimize services in common.lua, fix the application lense filtering and increase the update rate of services in common.lua Signed-off-by: delta <darkussdelta@gmail.com>
24 lines
722 B
Rust
24 lines
722 B
Rust
mod lenses;
|
|
mod net;
|
|
|
|
use mlua::prelude::*;
|
|
use html_escape::decode_html_entities_to_string;
|
|
|
|
#[mlua::lua_module]
|
|
fn qnative(lua: &Lua) -> LuaResult<LuaTable> {
|
|
let lenses = lua.create_table()?;
|
|
lenses.set("1", lua.create_function(lenses::calculator::query)?)?;
|
|
lenses.set("2", lua.create_function(lenses::application::query)?)?;
|
|
|
|
let exports = lua.create_table()?;
|
|
exports.set("lenses", lenses)?;
|
|
exports.set("get_essid", lua.create_function(net::get_first_essid)?)?;
|
|
exports.set("decode_html", lua.create_function(|_: &Lua, string: String| {
|
|
let mut output = String::new();
|
|
decode_html_entities_to_string(string, &mut output);
|
|
Ok(output)
|
|
})?)?;
|
|
|
|
Ok(exports)
|
|
}
|