add ping toggle
This commit is contained in:
@@ -33,8 +33,9 @@ Configuration is stored in `~/.iamwaiting/config.edn` with the following structu
|
||||
```clojure
|
||||
{:webhook-url "https://discord.com/api/webhooks/..."
|
||||
:user-id "123456789012345678" ; Optional: Discord user ID for @mentions
|
||||
:toggles {:idle-prompt true ; Enable idle prompt notifications
|
||||
:permission-prompt true}} ; Enable permission prompt notifications
|
||||
:toggles {:idle-prompt true ; Enable idle prompt notifications
|
||||
:permission-prompt true ; Enable permission prompt notifications
|
||||
:permission-prompt-ping true}} ; Enable @mentions on permission prompts
|
||||
```
|
||||
|
||||
Alternatively, configuration can be set via environment variables:
|
||||
@@ -55,6 +56,9 @@ iamwaiting toggle idle-prompt off
|
||||
|
||||
# Enable permission prompt notifications
|
||||
iamwaiting toggle permission-prompt on
|
||||
|
||||
# Disable @mentions on permission prompts
|
||||
iamwaiting toggle permission-prompt-ping off
|
||||
```
|
||||
|
||||
**Manually editing config file:**
|
||||
@@ -62,15 +66,33 @@ iamwaiting toggle permission-prompt on
|
||||
;; Only get notified for permission prompts
|
||||
{:webhook-url "https://discord.com/api/webhooks/..."
|
||||
:toggles {:idle-prompt false
|
||||
:permission-prompt true}}
|
||||
:permission-prompt true
|
||||
:permission-prompt-ping true}}
|
||||
|
||||
;; Get permission prompt notifications but don't @mention
|
||||
{:webhook-url "https://discord.com/api/webhooks/..."
|
||||
:user-id "123456789012345678"
|
||||
:toggles {:idle-prompt true
|
||||
:permission-prompt true
|
||||
:permission-prompt-ping false}}
|
||||
|
||||
;; Disable all notifications
|
||||
{:webhook-url "https://discord.com/api/webhooks/..."
|
||||
:toggles {:idle-prompt false
|
||||
:permission-prompt false}}
|
||||
:permission-prompt false
|
||||
:permission-prompt-ping false}}
|
||||
```
|
||||
|
||||
**Default behavior:** If toggles are not specified in the config file, both notification types are enabled.
|
||||
**Default behavior:** If toggles are not specified in the config file, all notification features are enabled.
|
||||
|
||||
### Permission Prompt Pings
|
||||
|
||||
The `:permission-prompt-ping` toggle controls whether you get @mentioned (pinged) on permission prompts. This is useful when:
|
||||
- You want to disable pings during focus time
|
||||
- You want notifications but not intrusive @mentions
|
||||
- You want to keep your user ID configured without getting pinged
|
||||
|
||||
**Note:** This toggle only has effect if you have a user ID configured. The ping toggle defaults to `true` for backwards compatibility.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -123,6 +145,12 @@ iamwaiting toggle idle-prompt on
|
||||
|
||||
# Disable permission prompt notifications
|
||||
iamwaiting toggle permission-prompt off
|
||||
|
||||
# Disable @mentions on permission prompts
|
||||
iamwaiting toggle permission-prompt-ping off
|
||||
|
||||
# Enable @mentions on permission prompts
|
||||
iamwaiting toggle permission-prompt-ping on
|
||||
```
|
||||
|
||||
### Running via Babashka Tasks
|
||||
@@ -171,16 +199,16 @@ Notifications include:
|
||||
- ⏳ Waiting indicator
|
||||
- 📁 Current working directory / project name
|
||||
- 🕐 Timestamp (HH:mm:ss format)
|
||||
- @mention (if user ID is configured and it's a permission prompt)
|
||||
- @mention (if user ID is configured, it's a permission prompt, and ping toggle is enabled)
|
||||
|
||||
Example message (normal prompt):
|
||||
Example message (idle prompt):
|
||||
```
|
||||
⏳ **Claude is waiting** in `ajet-industries`
|
||||
📁 Path: `/home/user/repos/ajet-industries`
|
||||
🕐 Time: 14:23:45
|
||||
```
|
||||
|
||||
Example message (permission prompt with user ID configured):
|
||||
Example message (permission prompt with ping enabled):
|
||||
```
|
||||
<@123456789012345678> ⏳ **Claude is waiting** in `ajet-industries`
|
||||
📁 Path: `/home/user/repos/ajet-industries`
|
||||
@@ -188,6 +216,14 @@ Example message (permission prompt with user ID configured):
|
||||
📢 Type: `permission_prompt`
|
||||
```
|
||||
|
||||
Example message (permission prompt with ping disabled):
|
||||
```
|
||||
⏳ **Claude is waiting** in `ajet-industries`
|
||||
📁 Path: `/home/user/repos/ajet-industries`
|
||||
🕐 Time: 14:23:45
|
||||
📢 Type: `permission_prompt`
|
||||
```
|
||||
|
||||
### Error Handling
|
||||
|
||||
- Missing configuration prompts user to run `./iamwaiting setup`
|
||||
|
||||
Reference in New Issue
Block a user