From 81469bbb1745a835676c3664e75a4a951223da9d Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Tue, 30 Jul 2024 19:25:59 -0400 Subject: * fixed a crash when unloading a lua script * added event types, foreground and background color for watchlists * added a url_encode function to lua to encode urls. Underneath, it just calls the standard library function from golang * updated the README * the urban plugin now can take in the number of entries to return * reverted a bug where setting the http proxy for the lua http module was not working * fixed the url for the ip script so it is actually working. the current provider does not support ipv6 though --- types.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'types.go') diff --git a/types.go b/types.go index d6f3236..85f820d 100644 --- a/types.go +++ b/types.go @@ -33,6 +33,9 @@ type WatchList struct { WatchList []string `toml:"watchList"` WatchFiles []string `toml:"watchFiles"` Words []string `toml:"watchWords"` + EventTypes []string `toml:"eventTypes"` + FGColor int `toml:"fgColor"` + BGColor int `toml:"bgColor"` } type LuaCommand struct { @@ -114,7 +117,10 @@ func (config *TomlConfig) deleteLstate(name string) { if config.LuaStates == nil { return } - config.LuaStates[name].Cancel() + + if config.LuaStates[name].Cancel != nil { + config.LuaStates[name].Cancel() + } delete(config.LuaStates, name) } -- cgit v1.2.3