Skip to content

Commit 746ce10

Browse files
committed
first version of scripting
1 parent 96e310c commit 746ce10

File tree

29 files changed

+1743
-31
lines changed

29 files changed

+1743
-31
lines changed

Cargo.lock

Lines changed: 73 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

book/src/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
- [Pronunciation](guides/pronunciation.md)
2424
- [Reduce Noise](guides/reduce-noise.md)
2525
- [Single Pane](guides/single-pane.md)
26+
- [Scripts](guides/scripts.md)
2627
- [Storing Passwords in a File](guides/password-file.md)
2728
- [Unix Signals](guides/unix-signals.md)
2829
- [Text Formatting](guides/text-formatting.md)
@@ -91,6 +92,7 @@
9192
- [SOCKS5](configuration/proxy/socks5.md)
9293
- [Tor](configuration/proxy/tor.md)
9394
- [Scale factor](configuration/scale-factor.md)
95+
- [Scripts](configuration/scripts/README.md)
9496
- [Servers](configuration/servers/README.md)
9597
- [Filters](configuration/servers/filters.md)
9698
- [SASL External](configuration/servers/sasl-external.md)

book/src/configuration/notifications/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Following notifications are available:
4242
| `monitored_online` | Triggered when a user you're monitoring is online | N/A |
4343
| `monitored_offline` | Triggered when a user you're monitoring is offline | N/A |
4444
| `reconnected` | Triggered when a server reconnects | N/A |
45+
| `scripts` | Triggered by script callbacks via `ctx:notification` | Notification body |
4546

4647
`channel` is an array of tables, with each entry a notification for a single
4748
channel. For example, the following shows a toast notification for every
@@ -52,6 +53,13 @@ message in `#halloy`:
5253
show_toast = true
5354
```
5455

56+
`scripts` is also an array of tables, with each entry keyed by script name:
57+
58+
```toml
59+
[notifications.scripts."my_script"]
60+
show_toast = true
61+
```
62+
5563
## Built-in Sounds
5664

5765
The following table shows all available built-in sounds
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Scripts
2+
3+
Script configuration options.
4+
5+
For scripting help, see the [Scripts guide](../../guides/scripts.md).
6+
7+
- [Scripts](#scripts)
8+
- [Configuration](#configuration)
9+
- [autorun](#autorun)
10+
11+
## Configuration
12+
13+
### autorun
14+
15+
Specify the script filename(s) to load when Halloy starts.
16+
17+
```toml
18+
# Type: array of strings
19+
# Values: exact script filenames
20+
# Default: []
21+
22+
[scripts]
23+
autorun = ["hello.lua", "auto-op.lua"]
24+
```

0 commit comments

Comments
 (0)