dsh-any-background 0.1.5 → 0.1.6

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 CHANGED
@@ -45,23 +45,23 @@ dsh-any-background/
45
45
 
46
46
  ## Implementation
47
47
 
48
- The plugin is a Cordis plugin split into two halves:
49
-
50
- - **Node half** (`src/index.ts`) — owns file-backed persistence. It manages the `.dsh-any-background-data/` store under the DSH data home (`~/.dsh/`) and exposes a small RPC surface over the shared `/api` channel.
51
- - **Browser half** (`src/client/index.tsx`) — all UI logic lives here. The browser cannot touch the filesystem, so it reads/writes the store through the node half's RPC endpoints.
52
-
53
- ### Persistence
54
-
55
- Since the plugin surfaces in the browser, persisted data is stored on disk by the **node half**:
56
-
57
- ```
58
- ~/.dsh/.dsh-any-background-data/
59
- ├── theme-config.json # color, main/settings/wallpaper opacity, blur, bg edit state
60
- └── wallpaper.jpg # the chosen background image (deleted when removed)
61
- ```
62
-
63
- - On startup the client calls `read`, which returns the config and (if present) the wallpaper as a data URL.
64
- - Every setting change is written back synchronously to `theme-config.json`; changing the wallpaper writes `wallpaper.jpg`, removing it deletes the file.
48
+ The plugin is a Cordis plugin split into two halves:
49
+
50
+ - **Node half** (`src/index.ts`) — owns file-backed persistence. It manages the `.dsh-any-background-data/` store under the DSH data home (`~/.dsh/`) and exposes a small RPC surface over the shared `/api` channel.
51
+ - **Browser half** (`src/client/index.tsx`) — all UI logic lives here. The browser cannot touch the filesystem, so it reads/writes the store through the node half's RPC endpoints.
52
+
53
+ ### Persistence
54
+
55
+ Since the plugin surfaces in the browser, persisted data is stored on disk by the **node half**:
56
+
57
+ ```
58
+ ~/.dsh/.dsh-any-background-data/
59
+ ├── theme-config.json # color, main/settings/wallpaper opacity, blur, bg edit state
60
+ └── wallpaper.jpg # the chosen background image (deleted when removed)
61
+ ```
62
+
63
+ - On startup the client calls `read`, which returns the config and (if present) the wallpaper as a data URL.
64
+ - Every setting change is written back synchronously to `theme-config.json`; changing the wallpaper writes `wallpaper.jpg`, removing it deletes the file.
65
65
  - The store is created automatically if missing; a missing or malformed config falls back to defaults (with a warning), and all writes are error-guarded to avoid data loss.
66
66
 
67
67
  ### Architecture
@@ -187,7 +187,9 @@ Install the plugin directly from GitHub into your Web profile:
187
187
  ```sh
188
188
  dsh plugin --profile web add github:Tkingxiao/dsh-any-background
189
189
  ```
190
-
190
+ ```sh
191
+ dsh plugin --profile web add dsh-any-background
192
+ ```
191
193
  Then launch the Web UI:
192
194
 
193
195
  ```sh
@@ -203,6 +205,9 @@ If you don't have `dsh` installed globally, use `npx`:
203
205
  ```sh
204
206
  npx @deepseek-ai/dsh plugin --profile web add github:Tkingxiao/dsh-any-background
205
207
  ```
208
+ ```sh
209
+ npx @deepseek-ai/dsh plugin --profile web add dsh-any-background
210
+ ```
206
211
 
207
212
  Then launch:
208
213
 
@@ -228,10 +233,11 @@ pnpm run bundle
228
233
 
229
234
  # 4. Install the plugin into the web profile from the local checkout
230
235
  # (`dsh plugin add` wraps `pnpm add <dir>`, so point it at this directory)
231
- dsh plugin --profile web add .
236
+ cd .
237
+ pnpm dsh plugin --profile web add “dsh-any-background”
232
238
 
233
239
  # 5. Launch
234
- dsh web
240
+ pnpm dsh web
235
241
  ```
236
242
 
237
243
  ## Compatibility
@@ -255,11 +261,11 @@ The plugin works on both the **Web UI** and the **desktop client**:
255
261
 
256
262
  ## Star History
257
263
 
258
- <a href="https://www.star-history.com/?repos=Tkingxiao%2Fdsh-any-background&type=date&legend=bottom-right">
264
+ <a href="https://www.star-history.com/?repos=Tkingxiao%2Fdsh-any-background&type=timeline&legend=bottom-right">
259
265
  <picture>
260
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=date&theme=dark&legend=bottom-right&sealed_token=7GSnWLC53Di99WoOA-OGKn_GLJ-kQ6jgcdGRLS7wUzlwkbtJxLtH9kT3D7gCvxb0HoMF8aZklqQT4ijJ7hcFA2zO43Sfh-ccbqGBtvLundJKPELZ1a2xNA" />
261
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=date&legend=bottom-right&sealed_token=7GSnWLC53Di99WoOA-OGKn_GLJ-kQ6jgcdGRLS7wUzlwkbtJxLtH9kT3D7gCvxb0HoMF8aZklqQT4ijJ7hcFA2zO43Sfh-ccbqGBtvLundJKPELZ1a2xNA" />
262
- <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=date&legend=bottom-right&sealed_token=7GSnWLC53Di99WoOA-OGKn_GLJ-kQ6jgcdGRLS7wUzlwkbtJxLtH9kT3D7gCvxb0HoMF8aZklqQT4ijJ7hcFA2zO43Sfh-ccbqGBtvLundJKPELZ1a2xNA" />
266
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=timeline&theme=dark&legend=bottom-right&sealed_token=eWfGjN-Qq27TMTaT_VVvuRZMI72MUHAVfaHws-WOwQE7ld9defq7Bn7Xsgmlg-7iFSCeNoOIhgxFfZM3jazeXnLzldBkMCN3jm4CMxvn6Em0EBEZWWK5pA" />
267
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=timeline&legend=bottom-right&sealed_token=eWfGjN-Qq27TMTaT_VVvuRZMI72MUHAVfaHws-WOwQE7ld9defq7Bn7Xsgmlg-7iFSCeNoOIhgxFfZM3jazeXnLzldBkMCN3jm4CMxvn6Em0EBEZWWK5pA" />
268
+ <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=timeline&legend=bottom-right&sealed_token=eWfGjN-Qq27TMTaT_VVvuRZMI72MUHAVfaHws-WOwQE7ld9defq7Bn7Xsgmlg-7iFSCeNoOIhgxFfZM3jazeXnLzldBkMCN3jm4CMxvn6Em0EBEZWWK5pA" />
263
269
  </picture>
264
270
  </a>
265
271
 
package/README.zh.md CHANGED
@@ -164,7 +164,7 @@ dsh-any-background/
164
164
 
165
165
  <p align="center">
166
166
  <img src="example_img/image-8.png" alt="壁纸透明度100%" width="400">
167
- <img src="example_img/image-9.png" alt="壁纸透明度500%" width="400">
167
+ <img src="example_img/image-9.png" alt="壁纸透明度50%" width="400">
168
168
  <br/>
169
169
  <em>壁纸透明度 0% · 壁纸透明度 100%</em>
170
170
  </p>
@@ -187,7 +187,9 @@ dsh-any-background/
187
187
  ```sh
188
188
  dsh plugin --profile web add github:Tkingxiao/dsh-any-background
189
189
  ```
190
-
190
+ ```sh
191
+ dsh plugin --profile web add dsh-any-background
192
+ ```
191
193
  然后启动 Web UI:
192
194
 
193
195
  ```sh
@@ -203,6 +205,9 @@ dsh web
203
205
  ```sh
204
206
  npx @deepseek-ai/dsh plugin --profile web add github:Tkingxiao/dsh-any-background
205
207
  ```
208
+ ```sh
209
+ npx @deepseek-ai/dsh plugin --profile web add dsh-any-background
210
+ ```
206
211
 
207
212
  然后启动:
208
213
 
@@ -227,10 +232,11 @@ pnpm run bundle
227
232
 
228
233
  # 4. 从本地安装到 web profile
229
234
  # (`dsh plugin add` 是 `pnpm add <dir>` 的封装,传入本目录即可)
230
- dsh plugin --profile web add .
235
+ cd .
236
+ pnpm dsh plugin --profile web add "dsh-any-background"
231
237
 
232
238
  # 5. 启动
233
- dsh web
239
+ pnpm dsh web
234
240
  ```
235
241
 
236
242
  ## 兼容性
@@ -254,11 +260,11 @@ dsh web
254
260
 
255
261
  ## Star History
256
262
 
257
- <a href="https://www.star-history.com/?repos=Tkingxiao%2Fdsh-any-background&type=date&legend=bottom-right">
263
+ <a href="https://www.star-history.com/?repos=Tkingxiao%2Fdsh-any-background&type=timeline&legend=bottom-right">
258
264
  <picture>
259
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=date&theme=dark&legend=bottom-right&sealed_token=7GSnWLC53Di99WoOA-OGKn_GLJ-kQ6jgcdGRLS7wUzlwkbtJxLtH9kT3D7gCvxb0HoMF8aZklqQT4ijJ7hcFA2zO43Sfh-ccbqGBtvLundJKPELZ1a2xNA" />
260
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=date&legend=bottom-right&sealed_token=7GSnWLC53Di99WoOA-OGKn_GLJ-kQ6jgcdGRLS7wUzlwkbtJxLtH9kT3D7gCvxb0HoMF8aZklqQT4ijJ7hcFA2zO43Sfh-ccbqGBtvLundJKPELZ1a2xNA" />
261
- <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=date&legend=bottom-right&sealed_token=7GSnWLC53Di99WoOA-OGKn_GLJ-kQ6jgcdGRLS7wUzlwkbtJxLtH9kT3D7gCvxb0HoMF8aZklqQT4ijJ7hcFA2zO43Sfh-ccbqGBtvLundJKPELZ1a2xNA" />
265
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=timeline&theme=dark&legend=bottom-right&sealed_token=eWfGjN-Qq27TMTaT_VVvuRZMI72MUHAVfaHws-WOwQE7ld9defq7Bn7Xsgmlg-7iFSCeNoOIhgxFfZM3jazeXnLzldBkMCN3jm4CMxvn6Em0EBEZWWK5pA" />
266
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=timeline&legend=bottom-right&sealed_token=eWfGjN-Qq27TMTaT_VVvuRZMI72MUHAVfaHws-WOwQE7ld9defq7Bn7Xsgmlg-7iFSCeNoOIhgxFfZM3jazeXnLzldBkMCN3jm4CMxvn6Em0EBEZWWK5pA" />
267
+ <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=Tkingxiao/dsh-any-background&type=timeline&legend=bottom-right&sealed_token=eWfGjN-Qq27TMTaT_VVvuRZMI72MUHAVfaHws-WOwQE7ld9defq7Bn7Xsgmlg-7iFSCeNoOIhgxFfZM3jazeXnLzldBkMCN3jm4CMxvn6Em0EBEZWWK5pA" />
262
268
  </picture>
263
269
  </a>
264
270