dsh-cursor-whale 0.2.0 → 0.2.1
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/LICENSE +21 -0
- package/README.md +87 -17
- package/app/DSH-Hotkey.exe +0 -0
- package/assets/whale-alpha.png +0 -0
- package/build.ps1 +29 -0
- package/package.json +15 -3
- package/src/DshHudHotkey.cs +1309 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-cursor-whale contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,30 +1,100 @@
|
|
|
1
|
-
# dsh-cursor-whale
|
|
1
|
+
# dsh-cursor-whale · 跟随鼠标的鲸鱼
|
|
2
2
|
|
|
3
|
-
把 dsh-mini
|
|
3
|
+
把 [dsh-mini](https://www.npmjs.com/package/dsh-mini) 的小窗收成一只**跟着鼠标走的透明鲸鱼**:平时它是一张贴在光标右下的小鲸鱼,按鼠标前进键就变回真正的 DSH 小窗。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Windows only · 需要 DSH 桌面端 + dsh-mini
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## 它做什么
|
|
10
|
+
|
|
11
|
+
- dsh-mini 的小窗不挡桌面时,收成 96×55 的透明鲸鱼,跟着光标走(16ms 刷新);
|
|
12
|
+
- 鼠标**前进键**一键切回小窗,再按一次收回鲸鱼;
|
|
13
|
+
- 鼠标**后退键**切换主窗 ⇄ 小窗;
|
|
14
|
+
- 鼠标**移出小窗**自动收成鲸鱼;
|
|
15
|
+
- 全部是系统级热键,DSH 最小化/被遮挡时也能用。
|
|
16
|
+
|
|
17
|
+
## 安装
|
|
18
|
+
|
|
19
|
+
在 DSH 里让 Agent 安装:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
plugin_manager → install_bundle → target: "dsh-cursor-whale@0.2.1"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
或命令行:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
dsh plugin --profile desktop add dsh-cursor-whale
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
安装后插件会:
|
|
32
|
+
|
|
33
|
+
1. 把 `app/DSH-Hotkey.exe` 和鲸鱼图复制到 `%LOCALAPPDATA%\DSH-Hotkey`(不覆盖已有的 `hotkey.ini`);
|
|
34
|
+
2. 启动这个托盘助手;
|
|
35
|
+
3. 插件被禁用/卸载时把助手一起退出。
|
|
36
|
+
|
|
37
|
+
## 使用
|
|
38
|
+
|
|
39
|
+
| 操作 | 行为 |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| 鼠标**后退键** | 主窗 ⇄ 小窗 |
|
|
42
|
+
| 鼠标**前进键** | 鲸鱼 ⇄ 小窗 |
|
|
43
|
+
| 鼠标移出小窗 | 收成鲸鱼跟随光标 |
|
|
44
|
+
| `Ctrl+Alt+\`` | 手动切换鲸鱼/小窗 |
|
|
45
|
+
| `Ctrl+Alt+Shift+Q` | 退出助手 |
|
|
11
46
|
|
|
12
47
|
## 配置
|
|
13
48
|
|
|
14
|
-
|
|
49
|
+
`%LOCALAPPDATA%\DSH-Hotkey\hotkey.ini`,保存后约 2 秒生效:
|
|
15
50
|
|
|
16
51
|
```ini
|
|
17
|
-
toggle = XButton1
|
|
18
|
-
openMini = XButton2
|
|
19
|
-
|
|
20
|
-
|
|
52
|
+
toggle = XButton1 # 主窗 ⇄ 小窗
|
|
53
|
+
openMini = XButton2 # 鲸鱼 ⇄ 小窗
|
|
54
|
+
follow = Ctrl+Alt+` # 手动切换
|
|
55
|
+
quit = Ctrl+Alt+Shift+Q
|
|
56
|
+
|
|
57
|
+
whaleScale = 3 # 鲸鱼宽度 = 系统指针宽度 × 该倍数
|
|
58
|
+
whaleOffsetX = 16 # 相对光标的偏移
|
|
21
59
|
whaleOffsetY = 16
|
|
22
60
|
whaleImage = whale-alpha.png
|
|
23
61
|
```
|
|
24
62
|
|
|
25
|
-
##
|
|
63
|
+
## 要求
|
|
64
|
+
|
|
65
|
+
- Windows 10/11 **x64**;
|
|
66
|
+
- 已安装 **dsh-mini** 插件(小窗与 `/dsh-mini/open` 接口由它提供);
|
|
67
|
+
- **DSH 桌面端**(网页版没有可折叠的小窗)。
|
|
68
|
+
|
|
69
|
+
## 已知限制
|
|
70
|
+
|
|
71
|
+
- 助手是**未签名**的 exe,首次运行可能被 SmartScreen 拦一次;
|
|
72
|
+
- 小窗第一次打开需 2~4 秒(WebView2 现起窗口),之后切换是毫秒级;
|
|
73
|
+
- 自动拉起的小窗落在首页(接口不带会话 id),点小窗标题栏的 `▯` 才是当前会话;
|
|
74
|
+
- 只认进程名 `DeepSeek Harness` / `DSH小窗`,第三方壳或纯网页版不适用。
|
|
75
|
+
|
|
76
|
+
## 从源码构建
|
|
77
|
+
|
|
78
|
+
托盘助手是 C#(.NET Framework 4.x),插件半边是普通 ESM:
|
|
79
|
+
|
|
80
|
+
```powershell
|
|
81
|
+
./build.ps1 # 用系统自带 csc 编译 src/DshHudHotkey.cs → app/DSH-Hotkey.exe
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
编译后重启 DSH(或禁用再启用插件)即可加载新 exe。
|
|
85
|
+
|
|
86
|
+
## 目录结构
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
├── app/ # 运行资源(exe、鲸鱼图、默认配置)
|
|
90
|
+
├── src/DshHudHotkey.cs # 托盘助手源码(全局热键、窗口控制、鲸鱼渲染)
|
|
91
|
+
├── lib/index.js # DSH 插件 Host 半边(复制资源 + 启停助手)
|
|
92
|
+
├── locale/ # 插件页显示名与描述(zh/en)
|
|
93
|
+
├── docs/ # 插件详情页与预览图
|
|
94
|
+
├── cordis.patch.yml # 插件挂载声明
|
|
95
|
+
└── build.ps1 # 重新编译助手
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## License
|
|
26
99
|
|
|
27
|
-
|
|
28
|
-
- 需要先安装 **dsh-mini** 插件,并使用 **DSH 桌面端**(网页版没有可折叠的小窗);
|
|
29
|
-
- 自带的是未签名 exe,首次运行可能被 SmartScreen/杀软拦一次;
|
|
30
|
-
- 插件被禁用或卸载时,助手进程会一起退出。
|
|
100
|
+
[MIT](LICENSE)
|
package/app/DSH-Hotkey.exe
CHANGED
|
Binary file
|
|
Binary file
|
package/build.ps1
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Rebuild the tray helper from source.
|
|
2
|
+
#
|
|
3
|
+
# Requirements: .NET Framework 4.x shipped with Windows 10/11 (provides csc.exe).
|
|
4
|
+
# Output: app\DSH-Hotkey.exe
|
|
5
|
+
|
|
6
|
+
$ErrorActionPreference = 'Stop'
|
|
7
|
+
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
8
|
+
$csc = Join-Path $env:WINDIR 'Microsoft.NET\Framework64\v4.0.30319\csc.exe'
|
|
9
|
+
|
|
10
|
+
if (-not (Test-Path $csc)) {
|
|
11
|
+
throw "csc.exe not found: $csc (.NET Framework 4.x is required)"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
Push-Location $root
|
|
15
|
+
try {
|
|
16
|
+
& $csc /nologo /target:winexe `
|
|
17
|
+
/r:System.Windows.Forms.dll `
|
|
18
|
+
/r:System.Drawing.dll `
|
|
19
|
+
/out:app\DSH-Hotkey.exe `
|
|
20
|
+
src\DshHudHotkey.cs
|
|
21
|
+
|
|
22
|
+
if ($LASTEXITCODE -ne 0) { throw "compile failed (csc exit $LASTEXITCODE)" }
|
|
23
|
+
|
|
24
|
+
Copy-Item assets\whale-alpha.png app\whale-alpha.png -Force
|
|
25
|
+
Write-Host "built app\DSH-Hotkey.exe"
|
|
26
|
+
}
|
|
27
|
+
finally {
|
|
28
|
+
Pop-Location
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-cursor-whale",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -13,9 +13,13 @@
|
|
|
13
13
|
"app",
|
|
14
14
|
"locale",
|
|
15
15
|
"docs",
|
|
16
|
+
"src",
|
|
17
|
+
"assets",
|
|
18
|
+
"build.ps1",
|
|
16
19
|
"cordis.patch.yml",
|
|
17
20
|
"icon.svg",
|
|
18
|
-
"README.md"
|
|
21
|
+
"README.md",
|
|
22
|
+
"LICENSE"
|
|
19
23
|
],
|
|
20
24
|
"description": "把 dsh-mini 的小窗收成跟着鼠标走的透明鲸鱼,鼠标前进键一键切回。Windows only.",
|
|
21
25
|
"keywords": [
|
|
@@ -23,13 +27,21 @@
|
|
|
23
27
|
"dsh-plugin",
|
|
24
28
|
"deepseek-harness",
|
|
25
29
|
"always-on-top",
|
|
26
|
-
"window",
|
|
30
|
+
"floating-window",
|
|
27
31
|
"whale"
|
|
28
32
|
],
|
|
29
33
|
"os": [
|
|
30
34
|
"win32"
|
|
31
35
|
],
|
|
32
36
|
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/ats-wee/dsh-cursor-whale.git"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/ats-wee/dsh-cursor-whale#readme",
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/ats-wee/dsh-cursor-whale/issues"
|
|
44
|
+
},
|
|
33
45
|
"dsh": {
|
|
34
46
|
"bundle": {
|
|
35
47
|
"patch": "./cordis.patch.yml"
|