aboutsummaryrefslogtreecommitdiffstats
path: root/types.go
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-07-30 23:25:59 +0000
committerterminaldweller <devi@terminaldweller.com>2024-07-30 23:25:59 +0000
commit81469bbb1745a835676c3664e75a4a951223da9d (patch)
tree70a53b118c406d5958a8fb8c72e391fb6439f729 /types.go
parentwe can now add new commands from lua plugins (diff)
downloadmilla-81469bbb1745a835676c3664e75a4a951223da9d.tar.gz
milla-81469bbb1745a835676c3664e75a4a951223da9d.zip
* 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
Diffstat (limited to 'types.go')
-rw-r--r--types.go8
1 files changed, 7 insertions, 1 deletions
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)
}