pi-notifi 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -12
- package/index.ts +1 -2
- package/package.json +1 -2
- package/examples/notifi.json +0 -7
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# pi-notifi
|
|
2
2
|
|
|
3
|
-
A [pi](https://pi.dev/)
|
|
4
|
-
interactive pi task finishes,
|
|
5
|
-
already visible in Hyprland.
|
|
3
|
+
A focus-aware desktop notification package for [pi](https://pi.dev/). It sends a
|
|
4
|
+
notification when an interactive pi task finishes, but skips the notification if
|
|
5
|
+
the tmux window containing that pi agent is already visible in Hyprland.
|
|
6
6
|
|
|
7
7
|
Notifications include a `Focus` action that jumps back to the originating pi
|
|
8
|
-
agent by
|
|
8
|
+
agent by restoring the saved Hyprland/Ghostty/tmux target.
|
|
9
9
|
|
|
10
10
|
This package is intentionally developed for an Arch + Hyprland + Ghostty +
|
|
11
11
|
tmux + dunst workflow. If your setup differs, copy/fork it and adapt the small
|
|
@@ -75,7 +75,7 @@ Hyprland binds:
|
|
|
75
75
|
|
|
76
76
|
```ini
|
|
77
77
|
bind = SUPER, X, exec, dunstctl close
|
|
78
|
-
bind = SUPER, N, exec, dunstctl action
|
|
78
|
+
bind = SUPER, N, exec, dunstctl action
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
Dunst mouse behavior:
|
|
@@ -88,7 +88,7 @@ mouse_right_click = close_current
|
|
|
88
88
|
Behavior:
|
|
89
89
|
|
|
90
90
|
- `SUPER X` / right click: close the current notification without action.
|
|
91
|
-
- `SUPER N` / left click: invoke the notification action
|
|
91
|
+
- `SUPER N` / left click: invoke the notification action. Dunst closes actioned notifications automatically.
|
|
92
92
|
- For notifi notifications, the action jumps to the Ghostty/tmux location that
|
|
93
93
|
produced that specific notification.
|
|
94
94
|
|
|
@@ -124,12 +124,6 @@ Example:
|
|
|
124
124
|
}
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
An example file is included at:
|
|
128
|
-
|
|
129
|
-
```text
|
|
130
|
-
examples/notifi.json
|
|
131
|
-
```
|
|
132
|
-
|
|
133
127
|
Available JSON fields:
|
|
134
128
|
|
|
135
129
|
| Field | Default | Description |
|
package/index.ts
CHANGED
|
@@ -86,8 +86,7 @@ const env = (name: string): string | undefined => {
|
|
|
86
86
|
return value && value.trim().length > 0 ? value : undefined;
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
const
|
|
90
|
-
const packageRoot = dirname(extensionDir);
|
|
89
|
+
const packageRoot = dirname(fileURLToPath(import.meta.url));
|
|
91
90
|
const focusScriptPath = join(packageRoot, "scripts", "notifi-focus");
|
|
92
91
|
|
|
93
92
|
const fileExists = async (path: string): Promise<boolean> => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-notifi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Pi extension that sends focus-aware desktop notifications when pi finishes a task.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
"index.ts",
|
|
24
24
|
"scripts/",
|
|
25
|
-
"examples/",
|
|
26
25
|
"README.md"
|
|
27
26
|
],
|
|
28
27
|
"scripts": {
|