pi-notifi 0.1.3 → 0.1.4

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.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/index.ts +6 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -111,6 +111,7 @@ Configuration is read from the first valid JSON file that exists:
111
111
 
112
112
  1. `<project>/.pi/notifi.json`
113
113
  2. `~/.pi/agent/notifi.json`
114
+ 3. `~/.pi/agent/extensions/notifi.json`
114
115
 
115
116
  Example:
116
117
 
package/index.ts CHANGED
@@ -103,7 +103,12 @@ const cacheHome = (): string => process.env.XDG_CACHE_HOME ?? join(process.env.H
103
103
  const targetFile = (targetId: string): string => join(cacheHome(), "notifi", "targets", `${targetId}.json`);
104
104
 
105
105
  const readConfigFile = async (cwd: string): Promise<NotifiFileConfig> => {
106
- const paths = [join(cwd, ".pi", "notifi.json"), join(process.env.HOME ?? "", ".pi", "agent", "notifi.json")];
106
+ const home = process.env.HOME ?? "";
107
+ const paths = [
108
+ join(cwd, ".pi", "notifi.json"),
109
+ join(home, ".pi", "agent", "notifi.json"),
110
+ join(home, ".pi", "agent", "extensions", "notifi.json"),
111
+ ];
107
112
 
108
113
  for (const path of paths) {
109
114
  if (!path || !(await fileExists(path))) continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-notifi",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Pi extension that sends focus-aware desktop notifications when pi finishes a task.",
5
5
  "keywords": [
6
6
  "pi-package",