Bladeren bron

添加快捷启动功能

soease 2 weken geleden
bovenliggende
commit
3534fa6357

+ 4 - 0
frontend/bindings/TengTuToolbox/index.js

@@ -9,6 +9,7 @@ import * as LocalSendService from "./localsendservice.js";
 import * as LocalService from "./localservice.js";
 import * as MemosService from "./memosservice.js";
 import * as ProxyService from "./proxyservice.js";
+import * as QuickService from "./quickservice.js";
 import * as SettingsService from "./settingsservice.js";
 import * as UDPService from "./udpservice.js";
 import * as YTDLPService from "./ytdlpservice.js";
@@ -20,6 +21,7 @@ export {
     LocalService,
     MemosService,
     ProxyService,
+    QuickService,
     SettingsService,
     UDPService,
     YTDLPService
@@ -52,6 +54,8 @@ export {
     PoemData,
     ProxyConfig,
     ProxyStatus,
+    QuickGroup,
+    QuickItem,
     RecordItem,
     ReleaseItem,
     RepoFeed,

+ 186 - 59
frontend/bindings/TengTuToolbox/models.js

@@ -127,6 +127,22 @@ export class AppSettings {
              */
             this["hotkey"] = "";
         }
+        if (!("quickHotkey" in $$source)) {
+            /**
+             * 在鼠标位置弹出「快捷」菜单的全局热键
+             * @member
+             * @type {string}
+             */
+            this["quickHotkey"] = "";
+        }
+        if (!("proxyHotkey" in $$source)) {
+            /**
+             * 开关「网络代理」的全局热键(空=不设热键)
+             * @member
+             * @type {string}
+             */
+            this["proxyHotkey"] = "";
+        }
         if (!("tabOrder" in $$source)) {
             /**
              * Tab 显示顺序(tabId 列表,未列出的追加到末尾)
@@ -191,6 +207,14 @@ export class AppSettings {
              */
             this["localTools"] = [];
         }
+        if (!("quickGroups" in $$source)) {
+            /**
+             * 「快捷」页分组(缩进分层,名称|路径|说明 条目)
+             * @member
+             * @type {QuickGroup[]}
+             */
+            this["quickGroups"] = [];
+        }
         if (!("controlKeys" in $$source)) {
             /**
              * 控制页按键配置(前 5 键固定 上/下/左/右/休眠,第 6 键起为额外按键)
@@ -481,82 +505,86 @@ export class AppSettings {
      * @returns {AppSettings}
      */
     static createFrom($$source = {}) {
-        const $$createField7_0 = $$createType0;
-        const $$createField8_0 = $$createType0;
-        const $$createField9_0 = $$createType2;
-        const $$createField12_0 = $$createType4;
-        const $$createField13_0 = $$createType6;
-        const $$createField14_0 = $$createType8;
-        const $$createField15_0 = $$createType10;
-        const $$createField27_0 = $$createType11;
-        const $$createField28_0 = $$createType11;
-        const $$createField29_0 = $$createType12;
+        const $$createField9_0 = $$createType0;
+        const $$createField10_0 = $$createType0;
+        const $$createField11_0 = $$createType2;
+        const $$createField14_0 = $$createType4;
+        const $$createField15_0 = $$createType6;
+        const $$createField16_0 = $$createType8;
+        const $$createField17_0 = $$createType10;
+        const $$createField18_0 = $$createType12;
         const $$createField30_0 = $$createType13;
-        const $$createField41_0 = $$createType14;
-        const $$createField42_0 = $$createType15;
-        const $$createField43_0 = $$createType16;
-        const $$createField44_0 = $$createType17;
-        const $$createField45_0 = $$createType18;
-        const $$createField46_0 = $$createType0;
+        const $$createField31_0 = $$createType13;
+        const $$createField32_0 = $$createType14;
+        const $$createField33_0 = $$createType15;
+        const $$createField44_0 = $$createType16;
+        const $$createField45_0 = $$createType17;
+        const $$createField46_0 = $$createType18;
         const $$createField47_0 = $$createType19;
-        const $$createField49_0 = $$createType20;
+        const $$createField48_0 = $$createType20;
+        const $$createField49_0 = $$createType0;
+        const $$createField50_0 = $$createType21;
+        const $$createField52_0 = $$createType22;
         let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
         if ("tabOrder" in $$parsedSource) {
-            $$parsedSource["tabOrder"] = $$createField7_0($$parsedSource["tabOrder"]);
+            $$parsedSource["tabOrder"] = $$createField9_0($$parsedSource["tabOrder"]);
         }
         if ("stockCodes" in $$parsedSource) {
-            $$parsedSource["stockCodes"] = $$createField8_0($$parsedSource["stockCodes"]);
+            $$parsedSource["stockCodes"] = $$createField10_0($$parsedSource["stockCodes"]);
         }
         if ("links" in $$parsedSource) {
-            $$parsedSource["links"] = $$createField9_0($$parsedSource["links"]);
+            $$parsedSource["links"] = $$createField11_0($$parsedSource["links"]);
         }
         if ("githubRepos" in $$parsedSource) {
-            $$parsedSource["githubRepos"] = $$createField12_0($$parsedSource["githubRepos"]);
+            $$parsedSource["githubRepos"] = $$createField14_0($$parsedSource["githubRepos"]);
         }
         if ("customTabs" in $$parsedSource) {
-            $$parsedSource["customTabs"] = $$createField13_0($$parsedSource["customTabs"]);
+            $$parsedSource["customTabs"] = $$createField15_0($$parsedSource["customTabs"]);
         }
         if ("localTools" in $$parsedSource) {
-            $$parsedSource["localTools"] = $$createField14_0($$parsedSource["localTools"]);
+            $$parsedSource["localTools"] = $$createField16_0($$parsedSource["localTools"]);
+        }
+        if ("quickGroups" in $$parsedSource) {
+            $$parsedSource["quickGroups"] = $$createField17_0($$parsedSource["quickGroups"]);
         }
         if ("controlKeys" in $$parsedSource) {
-            $$parsedSource["controlKeys"] = $$createField15_0($$parsedSource["controlKeys"]);
+            $$parsedSource["controlKeys"] = $$createField18_0($$parsedSource["controlKeys"]);
         }
         if ("stockTicker" in $$parsedSource) {
-            $$parsedSource["stockTicker"] = $$createField27_0($$parsedSource["stockTicker"]);
+            $$parsedSource["stockTicker"] = $$createField30_0($$parsedSource["stockTicker"]);
         }
         if ("newsTicker" in $$parsedSource) {
-            $$parsedSource["newsTicker"] = $$createField28_0($$parsedSource["newsTicker"]);
+            $$parsedSource["newsTicker"] = $$createField31_0($$parsedSource["newsTicker"]);
         }
         if ("poem" in $$parsedSource) {
-            $$parsedSource["poem"] = $$createField29_0($$parsedSource["poem"]);
+            $$parsedSource["poem"] = $$createField32_0($$parsedSource["poem"]);
         }
         if ("mouseAlert" in $$parsedSource) {
-            $$parsedSource["mouseAlert"] = $$createField30_0($$parsedSource["mouseAlert"]);
+            $$parsedSource["mouseAlert"] = $$createField33_0($$parsedSource["mouseAlert"]);
         }
         if ("localSend" in $$parsedSource) {
-            $$parsedSource["localSend"] = $$createField41_0($$parsedSource["localSend"]);
+            $$parsedSource["localSend"] = $$createField44_0($$parsedSource["localSend"]);
         }
         if ("croc" in $$parsedSource) {
-            $$parsedSource["croc"] = $$createField42_0($$parsedSource["croc"]);
+            $$parsedSource["croc"] = $$createField45_0($$parsedSource["croc"]);
         }
         if ("ytdlp" in $$parsedSource) {
-            $$parsedSource["ytdlp"] = $$createField43_0($$parsedSource["ytdlp"]);
+            $$parsedSource["ytdlp"] = $$createField46_0($$parsedSource["ytdlp"]);
         }
         if ("memos" in $$parsedSource) {
-            $$parsedSource["memos"] = $$createField44_0($$parsedSource["memos"]);
+            $$parsedSource["memos"] = $$createField47_0($$parsedSource["memos"]);
         }
         if ("brightness" in $$parsedSource) {
-            $$parsedSource["brightness"] = $$createField45_0($$parsedSource["brightness"]);
+            $$parsedSource["brightness"] = $$createField48_0($$parsedSource["brightness"]);
         }
         if ("toolOrder" in $$parsedSource) {
-            $$parsedSource["toolOrder"] = $$createField46_0($$parsedSource["toolOrder"]);
+            $$parsedSource["toolOrder"] = $$createField49_0($$parsedSource["toolOrder"]);
         }
         if ("gitLab" in $$parsedSource) {
-            $$parsedSource["gitLab"] = $$createField47_0($$parsedSource["gitLab"]);
+            $$parsedSource["gitLab"] = $$createField50_0($$parsedSource["gitLab"]);
         }
         if ("proxy" in $$parsedSource) {
-            $$parsedSource["proxy"] = $$createField49_0($$parsedSource["proxy"]);
+            $$parsedSource["proxy"] = $$createField52_0($$parsedSource["proxy"]);
         }
         return new AppSettings(/** @type {Partial<AppSettings>} */($$parsedSource));
     }
@@ -651,7 +679,7 @@ export class BiliFeedResult {
      * @returns {BiliFeedResult}
      */
     static createFrom($$source = {}) {
-        const $$createField0_0 = $$createType22;
+        const $$createField0_0 = $$createType24;
         let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
         if ("items" in $$parsedSource) {
             $$parsedSource["items"] = $$createField0_0($$parsedSource["items"]);
@@ -695,7 +723,7 @@ export class BrightnessConfig {
      * @returns {BrightnessConfig}
      */
     static createFrom($$source = {}) {
-        const $$createField1_0 = $$createType23;
+        const $$createField1_0 = $$createType25;
         let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
         if ("levels" in $$parsedSource) {
             $$parsedSource["levels"] = $$createField1_0($$parsedSource["levels"]);
@@ -1300,7 +1328,7 @@ export class MinuteChart {
      * @returns {MinuteChart}
      */
     static createFrom($$source = {}) {
-        const $$createField2_0 = $$createType25;
+        const $$createField2_0 = $$createType27;
         let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
         if ("points" in $$parsedSource) {
             $$parsedSource["points"] = $$createField2_0($$parsedSource["points"]);
@@ -1866,6 +1894,101 @@ export class ProxyStatus {
     }
 }
 
+/**
+ * QuickGroup 快捷启动分组(「快捷」页)。
+ * 设置文本中顶层无缩进行为分组名,其下缩进的「名称|路径|说明」条目归入该组;
+ * 未缩进但在某分组之前直接出现的条目归入「未分组」。
+ */
+export class QuickGroup {
+    /**
+     * Creates a new QuickGroup instance.
+     * @param {Partial<QuickGroup>} [$$source = {}] - The source object to create the QuickGroup.
+     */
+    constructor($$source = {}) {
+        if (!("name" in $$source)) {
+            /**
+             * 分组名(顶层无缩进行;空表示未分组)
+             * @member
+             * @type {string}
+             */
+            this["name"] = "";
+        }
+        if (!("items" in $$source)) {
+            /**
+             * 分组内快捷项(缩进条目)
+             * @member
+             * @type {QuickItem[]}
+             */
+            this["items"] = [];
+        }
+
+        Object.assign(this, $$source);
+    }
+
+    /**
+     * Creates a new QuickGroup instance from a string or object.
+     * @param {any} [$$source = {}]
+     * @returns {QuickGroup}
+     */
+    static createFrom($$source = {}) {
+        const $$createField1_0 = $$createType29;
+        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
+        if ("items" in $$parsedSource) {
+            $$parsedSource["items"] = $$createField1_0($$parsedSource["items"]);
+        }
+        return new QuickGroup(/** @type {Partial<QuickGroup>} */($$parsedSource));
+    }
+}
+
+/**
+ * QuickItem 快捷启动项(「快捷」页,设置中以缩进分层编辑)。
+ * 与 Biniware Run 类似:每项为「名称|程序路径|说明」,说明可省略。
+ */
+export class QuickItem {
+    /**
+     * Creates a new QuickItem instance.
+     * @param {Partial<QuickItem>} [$$source = {}] - The source object to create the QuickItem.
+     */
+    constructor($$source = {}) {
+        if (!("title" in $$source)) {
+            /**
+             * 显示名称
+             * @member
+             * @type {string}
+             */
+            this["title"] = "";
+        }
+        if (!("path" in $$source)) {
+            /**
+             * 程序路径(可执行文件,可带参数与 %VAR% 环境变量)
+             * @member
+             * @type {string}
+             */
+            this["path"] = "";
+        }
+        if (!("desc" in $$source)) {
+            /**
+             * 说明文字(可空)
+             * @member
+             * @type {string}
+             */
+            this["desc"] = "";
+        }
+
+        Object.assign(this, $$source);
+    }
+
+    /**
+     * Creates a new QuickItem instance from a string or object.
+     * @param {any} [$$source = {}]
+     * @returns {QuickItem}
+     */
+    static createFrom($$source = {}) {
+        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
+        return new QuickItem(/** @type {Partial<QuickItem>} */($$parsedSource));
+    }
+}
+
 /**
  * RecordItem 一条记录:姓名 + 名称 + 值 + 备注 + 录入时间,供记录 Tab 列表与柱状图使用
  */
@@ -2117,8 +2240,8 @@ export class RepoFeed {
      * @returns {RepoFeed}
      */
     static createFrom($$source = {}) {
-        const $$createField9_0 = $$createType27;
-        const $$createField10_0 = $$createType29;
+        const $$createField9_0 = $$createType31;
+        const $$createField10_0 = $$createType33;
         let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
         if ("newer" in $$parsedSource) {
             $$parsedSource["newer"] = $$createField9_0($$parsedSource["newer"]);
@@ -2820,24 +2943,28 @@ const $$createType5 = CustomTab.createFrom;
 const $$createType6 = $Create.Array($$createType5);
 const $$createType7 = LocalTool.createFrom;
 const $$createType8 = $Create.Array($$createType7);
-const $$createType9 = ControlKeyConfig.createFrom;
+const $$createType9 = QuickGroup.createFrom;
 const $$createType10 = $Create.Array($$createType9);
-const $$createType11 = TickerConfig.createFrom;
-const $$createType12 = PoemConfig.createFrom;
-const $$createType13 = MouseAlertConfig.createFrom;
-const $$createType14 = LocalSendConfig.createFrom;
-const $$createType15 = CrocConfig.createFrom;
-const $$createType16 = YTDLPConfig.createFrom;
-const $$createType17 = MemosConfig.createFrom;
-const $$createType18 = BrightnessConfig.createFrom;
-const $$createType19 = GitLabConfig.createFrom;
-const $$createType20 = ProxyConfig.createFrom;
-const $$createType21 = BiliDynamicItem.createFrom;
-const $$createType22 = $Create.Array($$createType21);
-const $$createType23 = $Create.Map($Create.Any, $Create.Any);
-const $$createType24 = MinutePoint.createFrom;
-const $$createType25 = $Create.Array($$createType24);
-const $$createType26 = ReleaseItem.createFrom;
+const $$createType11 = ControlKeyConfig.createFrom;
+const $$createType12 = $Create.Array($$createType11);
+const $$createType13 = TickerConfig.createFrom;
+const $$createType14 = PoemConfig.createFrom;
+const $$createType15 = MouseAlertConfig.createFrom;
+const $$createType16 = LocalSendConfig.createFrom;
+const $$createType17 = CrocConfig.createFrom;
+const $$createType18 = YTDLPConfig.createFrom;
+const $$createType19 = MemosConfig.createFrom;
+const $$createType20 = BrightnessConfig.createFrom;
+const $$createType21 = GitLabConfig.createFrom;
+const $$createType22 = ProxyConfig.createFrom;
+const $$createType23 = BiliDynamicItem.createFrom;
+const $$createType24 = $Create.Array($$createType23);
+const $$createType25 = $Create.Map($Create.Any, $Create.Any);
+const $$createType26 = MinutePoint.createFrom;
 const $$createType27 = $Create.Array($$createType26);
-const $$createType28 = CommitItem.createFrom;
+const $$createType28 = QuickItem.createFrom;
 const $$createType29 = $Create.Array($$createType28);
+const $$createType30 = ReleaseItem.createFrom;
+const $$createType31 = $Create.Array($$createType30);
+const $$createType32 = CommitItem.createFrom;
+const $$createType33 = $Create.Array($$createType32);

+ 77 - 0
frontend/bindings/TengTuToolbox/quickservice.js

@@ -0,0 +1,77 @@
+// @ts-check
+// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
+// This file is automatically generated. DO NOT EDIT
+
+/**
+ * QuickService 快捷启动服务,前端通过 bindings 调用。
+ * @module
+ */
+
+// eslint-disable-next-line @typescript-eslint/ban-ts-comment
+// @ts-ignore: Unused imports
+import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
+
+// eslint-disable-next-line @typescript-eslint/ban-ts-comment
+// @ts-ignore: Unused imports
+import * as $models from "./models.js";
+
+/**
+ * GetIcon 提取程序路径关联的图标,返回 PNG data URI(供 <img src> 展示)。
+ * 无法提取(文件不存在 / 非 exe 等)时返回空串,前端回退到通用图标。
+ * @param {string} path
+ * @returns {$CancellablePromise<string>}
+ */
+export function GetIcon(path) {
+    return $Call.ByID(2731395959, path);
+}
+
+/**
+ * GetQuickGroups 返回「快捷」页分组配置(含未分组条目)。
+ * @returns {$CancellablePromise<$models.QuickGroup[]>}
+ */
+export function GetQuickGroups() {
+    return $Call.ByID(1991714565).then(/** @type {($result: any) => any} */(($result) => {
+        return $$createType1($result);
+    }));
+}
+
+/**
+ * ImportBiniwareRun 弹出文件选择对话框,让用户选择 Biniware Run 的配置文件
+ * (brun.cfg),解析其中的快捷分组与条目并导入到当前程序的「快捷」设置中,
+ * 随后保存设置并重建托盘/右键菜单(含「快捷」子菜单)。
+ * 返回导入后的分组列表(用户取消时返回空切片,err 为 nil)。
+ * @returns {$CancellablePromise<$models.QuickGroup[]>}
+ */
+export function ImportBiniwareRun() {
+    return $Call.ByID(3556130271).then(/** @type {($result: any) => any} */(($result) => {
+        return $$createType1($result);
+    }));
+}
+
+/**
+ * Launch 启动一个快捷条目(分离启动,立即返回)。
+ * title 仅用于提示;path 为完整程序路径(可带参数与环境变量)。
+ * @param {string} title
+ * @param {string} path
+ * @returns {$CancellablePromise<string>}
+ */
+export function Launch(title, path) {
+    return $Call.ByID(480458633, title, path);
+}
+
+/**
+ * ShowQuickMenu 在鼠标当前位置弹出快捷菜单(分组子菜单 + 程序图标),
+ * 点击条目即启动。用于句柄/圆点右键与全局热键。
+ * 
+ * 用 Wails 官方 OpenContextMenu(quickContextMenu)实现:以主窗口句柄作宿主、
+ * 在光标位置弹出(ShowAtCursor -> GetCursorPos + TrackPopupMenuEx),因此
+ * 不受收拢后 32x32 小窗口尺寸限制(修复「收拢态右键不弹菜单」)。
+ * @returns {$CancellablePromise<string>}
+ */
+export function ShowQuickMenu() {
+    return $Call.ByID(1674670057);
+}
+
+// Private type creation functions
+const $$createType0 = $models.QuickGroup.createFrom;
+const $$createType1 = $Create.Array($$createType0);

+ 34 - 31
frontend/index.html

@@ -14,6 +14,9 @@
     <!-- 窗口收拢时居中显示的还原圆点:双击还原窗口大小 -->
     <div id="compact-restore" title="双击还原窗口"><span></span></div>
 
+    <!-- 句柄右键弹出的快捷启动菜单:内容由 main.js 按 设置→快捷 实时构建 -->
+    <div class="quick-menu" id="quick-menu" hidden></div>
+
     <div class="tab-container">
         <!-- 标签栏(兼作标题栏):左侧 tab,右侧窗口关闭按钮 -->
         <div class="tab-buttons">
@@ -735,6 +738,15 @@
                         <input class="input hotkey-input" id="hotkey" readonly placeholder="按下组合键">
                     </div>
 
+                    <!-- 快捷菜单热键:在鼠标位置弹出「快捷」启动菜单 -->
+                    <div class="setting-row">
+                        <div class="setting-info">
+                            <div class="setting-title">快捷菜单热键</div>
+                            <div class="setting-hint">按下后在鼠标位置弹出「快捷」启动菜单,例如 Ctrl+Shift+H</div>
+                        </div>
+                        <input class="input hotkey-input" id="quickhotkey" readonly placeholder="按下组合键">
+                    </div>
+
                     <!-- 指定浏览器:留空则用系统默认浏览器打开网址 -->
                     <div class="setting-row">
                         <div class="setting-info">
@@ -748,36 +760,6 @@
                         </div>
                     </div>
 
-                    <!-- 自动升级:私有 Git 仓库(Gogs / Gitea / GitLab)里的 Wails 升级清单 -->
-                    <div class="setting-row" data-tab-group="update">
-                        <div class="setting-info">
-                            <div class="setting-title">仓库地址</div>
-                            <div class="setting-hint">存放升级清单的私有 Git 根地址,如 https://git.scwy.net</div>
-                        </div>
-                        <input class="input" id="gitlab-base-url" type="text" placeholder="https://git.scwy.net" spellcheck="false">
-                    </div>
-                    <div class="setting-row" data-tab-group="update">
-                        <div class="setting-info">
-                            <div class="setting-title">项目路径</div>
-                            <div class="setting-hint">清单所在项目,如 ease/toolbox</div>
-                        </div>
-                        <input class="input" id="gitlab-project" type="text" placeholder="ease/toolbox" spellcheck="false">
-                    </div>
-                    <div class="setting-row" data-tab-group="update">
-                        <div class="setting-info">
-                            <div class="setting-title">访问令牌</div>
-                            <div class="setting-hint">私有仓库访问令牌;Gogs 走 Basic 认证,GitLab 走 PRIVATE-TOKEN</div>
-                        </div>
-                        <input class="input" id="gitlab-token" type="password" placeholder="访问令牌" spellcheck="false">
-                    </div>
-                    <div class="setting-row" data-tab-group="update">
-                        <div class="setting-info">
-                            <div class="setting-title">版本清单分支 / Tag</div>
-                            <div class="setting-hint">release/manifest.json 所在分支或 Tag,默认 main</div>
-                        </div>
-                        <input class="input" id="gitlab-branch" type="text" placeholder="main" spellcheck="false">
-                    </div>
-
                     <!-- Tab 显示顺序(归入「系统」组) -->
                     <div class="setting-row" data-tab-group="system">
                         <div class="setting-info">
@@ -805,6 +787,18 @@
                         <textarea class="input textarea" id="local-tools" rows="4" placeholder="记事本|notepad|系统自带&#10;清理|D:\scripts\clean.bat|每日清理临时文件&#10;脚本|powershell D:\scripts\hello.ps1|PowerShell 示例&#10;帮助页|D:\docs\help.html|本地文档,自动起服务打开"></textarea>
                     </div>
 
+                    <!-- 快捷启动(归入「快捷」组):缩进分层,顶层无缩进=分组名,缩进条目=名称|路径|说明 -->
+                    <div class="setting-row setting-row-col" data-tab-group="system">
+                        <div class="setting-info">
+                            <div class="setting-heading">
+                                <div class="setting-title">快捷启动</div>
+                                <button class="btn-ghost" id="quick-import-biniware" type="button" title="从 Biniware Run 的 brun.cfg 导入快捷启动分组与条目">导入BiniwareRun</button>
+                            </div>
+                            <div class="setting-hint">左上角圆点句柄鼠标右键点击出现快捷启动菜单</div>
+                        </div>
+                        <textarea class="input textarea" id="quick-tools" rows="8" spellcheck="false" placeholder="数据库&#10;        DBWeaver|D:\Tools\DBWeaver.exe|综合数据库工具&#10;        DBX|D:\Tools\DBX.exe|小巧数据工具&#10;编程&#10;        Aardio|D:\Tools\aardio\aardio.exe|国人 IDE 编程工具&#10;        Android Studio|D:\Tools\android-studio\bin\studio64.exe|安卓 IDE&#10;B站下载|D:\Tools\B站下载\JiJiDownForWPF.exe|B站视频下载工具&#10;LocalSend|D:\Tools\LocalSend\localsend_app.exe"></textarea>
+                    </div>
+
                     <!-- 控制页按键 -->
                     <div class="setting-row setting-row-col" data-tab-group="control">
                         <div class="setting-info">
@@ -999,6 +993,15 @@
                         <input class="input" id="upload-max-size" type="number" min="1" step="1" placeholder="默认 512MB">
                     </div>
 
+                    <!-- 代理开关热键:全局热键切换系统网络代理(归入「工具」组) -->
+                    <div class="setting-row" data-tab-group="tools">
+                        <div class="setting-info">
+                            <div class="setting-title">代理开关热键</div>
+                            <div class="setting-hint">点击输入框后按下组合键,全局切换系统网络代理;留空则不设热键(默认 Ctrl+Shift+J)</div>
+                        </div>
+                        <input class="input hotkey-input" id="proxyhotkey" readonly placeholder="留空=不设热键">
+                    </div>
+
                     <!-- LocalSend 本机名称 -->
                     <div class="setting-row" data-tab-group="tools">
                         <div class="setting-info">
@@ -1273,7 +1276,7 @@
                 <div class="feedback-title">意见/建议</div>
                 <button class="chart-close" id="feedback-close" title="关闭">×</button>
             </div>
-            <p class="feedback-desc">写下你的想法或遇到的问题,提交后推送到 ntfy 的 <code>ease</code> 主题。</p>
+            <p class="feedback-desc">写下你的想法或遇到的问题</p>
             <textarea class="input tr-input" id="feedback-input" rows="5" placeholder="写下你的意见或建议……"></textarea>
             <div class="feedback-actions">
                 <button class="btn-ghost" id="feedback-cancel" type="button">取消</button>

+ 120 - 2
frontend/public/style.css

@@ -136,7 +136,7 @@ body.window-compact::before {
     justify-content: center;
     cursor: grab;
     background: transparent;
-    --wails-draggable: drag;                /* 收拢态整个窗口可拖动 */
+    --wails-draggable: drag;                /* 收拢态整个窗口可拖动(左键);右键 contextmenu 由 JS 处理 */
 }
 body.window-compact #compact-restore {
     display: flex;
@@ -320,7 +320,8 @@ body.window-compact #compact-restore span {
     flex-shrink: 0;
     border-radius: 8px;
     cursor: grab;
-    --wails-draggable: drag;                    /* 手柄区域可拖动窗口 */
+    --wails-draggable: no-drag;                 /* 句柄需接收右键菜单,设为不可拖动;
+                                                   窗口拖动仍由父级 .tab-buttons 承担 */
     transition: background 0.18s ease;
 }
 .tab-drag-handle:hover {
@@ -808,6 +809,18 @@ body.window-compact #compact-restore span {
     font-weight: 600;
 }
 
+/* 标题行(标题 + 右侧按钮):让「快捷启动」标题与「导入BiniwareRun」按钮同行 */
+.setting-heading {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    gap: 12px;
+    margin-bottom: 4px;
+}
+.setting-heading .setting-title {
+    margin-bottom: 0; /* 标题自身不再留底边距,由 heading 统一控制 */
+}
+
 .setting-hint {
     color: var(--muted);
     font-size: calc(14px + var(--font-delta));
@@ -2474,6 +2487,111 @@ a.ver-muted:hover {
     opacity: 1;
 }
 
+/* ---------- 快捷启动菜单:句柄右键弹出(类似 Biniware Run) ---------- */
+.quick-menu {
+    position: fixed;
+    z-index: 9999;
+    min-width: 220px;
+    max-width: 320px;
+    max-height: 70vh;
+    overflow-y: auto;
+    padding: 6px;
+    border: 1px solid var(--glass-border);
+    border-radius: var(--radius);
+    background: var(--glass-strong, var(--glass));
+    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
+    /* 用 is-open 类控制显隐(hidden 属性会阻碍 getBoundingClientRect 定位测量) */
+    display: none;
+}
+.quick-menu.is-open {
+    display: block;
+}
+/* 分组标题:可点击,点击展开/收起(箭头指示) */
+.quick-menu-group {
+    display: flex;
+    align-items: center;
+    gap: 6px;
+    width: 100%;
+    padding: 6px 8px;
+    border: 0;
+    border-radius: 6px;
+    background: transparent;
+    color: var(--text-strong, var(--text));
+    font-weight: 600;
+    font-size: calc(12px + var(--font-delta));
+    text-align: left;
+    cursor: pointer;
+    opacity: .9;
+}
+.quick-menu-group:hover,
+.quick-menu-group:focus-visible {
+    background: var(--glass-strong);
+    outline: none;
+}
+.quick-menu-arrow {
+    width: 12px;
+    flex-shrink: 0;
+    font-size: 10px;
+    opacity: .7;
+}
+.quick-menu-count {
+    margin-left: auto;
+    flex-shrink: 0;
+    font-size: 11px;
+    font-weight: 400;
+    opacity: .55;
+}
+/* 分组条目容器:默认收起,is-open 展开;条目缩进体现层级 */
+.quick-menu-body {
+    display: none;
+    padding-left: 14px;
+}
+.quick-menu-body.is-open {
+    display: block;
+}
+.quick-menu-item {
+    display: flex;
+    align-items: center;
+    gap: 9px;
+    width: 100%;
+    padding: 6px 8px;
+    border: 0;
+    border-radius: 6px;
+    background: transparent;
+    color: var(--text);
+    text-align: left;
+    cursor: pointer;
+    font-size: calc(13px + var(--font-delta));
+}
+.quick-menu-item:hover,
+.quick-menu-item:focus-visible {
+    background: var(--glass-strong);
+    outline: none;
+}
+.quick-menu-item:disabled {
+    opacity: .6;
+    cursor: default;
+}
+.quick-menu-icon {
+    width: 20px;
+    height: 20px;
+    flex-shrink: 0;
+    object-fit: contain;
+}
+.quick-menu-name {
+    flex: 1;
+    min-width: 0;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+.quick-menu-empty {
+    padding: 10px 8px;
+    color: var(--muted);
+    font-size: calc(12px + var(--font-delta));
+    text-align: center;
+}
+
 /* ---------- 控制页:小车方向盘 ---------- */
 .control-wrap {
     display: flex;

+ 385 - 34
frontend/src/main.js

@@ -7,6 +7,7 @@ import {BrightnessService} from "../bindings/TengTuToolbox/index.js"; // 显示
 import {ProxyService} from "../bindings/TengTuToolbox/index.js"; // 网络代理服务(设置/启用/禁用 Windows 系统代理)
 import {YTDLPService} from "../bindings/TengTuToolbox/index.js"; // yt-dlp 服务(视频下载)
 import {LocalService} from "../bindings/TengTuToolbox/index.js"; // 本地资源启动服务(「本地」页)
+import {QuickService} from "../bindings/TengTuToolbox/index.js"; // 快捷启动服务(「快捷」页,含程序图标提取)
 import {UDPService} from "../bindings/TengTuToolbox/index.js"; // UDP 键值服务(工具页 UDP 服务器)
 import {getCalendarInfo} from "./lunar.js"; // 农历与节日计算
 
@@ -38,6 +39,7 @@ const FALLBACK_SETTINGS = {
     alwaysOnTop: false,
     startCompact: false, // 启动时自动收拢为圆点
     hotkey: 'CmdOrCtrl+Shift+G',
+    quickHotkey: 'Ctrl+Shift+H', // 「快捷」菜单全局热键(在鼠标位置弹出)
     tabOrder: ['links', 'news', 'github', 'stock', 'todo', 'record', 'tools', 'locals', 'control', 'host', 'settings'],
     stockCodes: ['sh000001', 'sh600519', 'sz000001'],
     links: [{name: '煎蛋', url: 'https://jandan.net/'}],
@@ -46,6 +48,7 @@ const FALLBACK_SETTINGS = {
     githubRepos: [{url: 'https://github.com/wailsapp/wails', desc: 'Wails 框架'}],
     customTabs: [],                   // 用户自定义 Tab 页面(名字 + 地址;http/https 为网页,其余为本地文件)
     localTools: [],                   // 「本地」页资源(标题 + 启动命令 + 说明)
+    quickGroups: [],                  // 「快捷」页分组(缩进分层:组名 + 名称|路径|说明 条目)
     apiAddr: '127.0.0.1:17890',
     serviceAddr: '0.0.0.0:9090', // 服务模式(--service)API 地址,仅电源类接口,其余转发给界面
     apiAutoStart: true, // 应用启动时自动启动内置 API 服务(默认开启)
@@ -188,9 +191,11 @@ async function applyCustomTabs(tabs) {
             modeGroup.className = 'custom-file-mode';
             const editBtn = document.createElement('button');
             editBtn.className = 'custom-file-mode-btn is-active';
+            editBtn.dataset.mode = 'edit';
             editBtn.textContent = '编辑';
             const previewBtn = document.createElement('button');
             previewBtn.className = 'custom-file-mode-btn';
+            previewBtn.dataset.mode = 'preview';
             previewBtn.textContent = '预览';
             modeGroup.appendChild(editBtn);
             modeGroup.appendChild(previewBtn);
@@ -221,6 +226,16 @@ async function applyCustomTabs(tabs) {
                 backupCustomFileTab(t);
             });
 
+            // 隐藏/显示乒乓键:隐藏编辑框与预览容器(保留工具栏),再点恢复
+            const hideBtn = document.createElement('button');
+            hideBtn.className = 'btn-ghost';
+            hideBtn.textContent = t.hidden ? '显示' : '隐藏';
+            hideBtn.title = t.hidden ? '显示此页面内容' : '隐藏此页面内容(按钮保留,可再次点击显示)';
+            hideBtn.addEventListener('click', (e) => {
+                e.stopPropagation();
+                t.hidden = !t.hidden; // 会话级状态:跨 Tab 切换保持,刷新页面重置
+                applyQuickHideState(t, hideBtn);
+            });
             bar.appendChild(modeGroup);
             // 状态提示(保存/备份/刷新结果),margin-right:auto 推到最左,编辑模式下也可见
             const status = document.createElement('span');
@@ -230,6 +245,7 @@ async function applyCustomTabs(tabs) {
             bar.appendChild(saveBtn);
             bar.appendChild(refreshBtn);
             bar.appendChild(backupBtn);
+            bar.appendChild(hideBtn);
             panel.appendChild(bar);
 
             // 编辑框(Markdown 源码)
@@ -261,6 +277,9 @@ async function applyCustomTabs(tabs) {
             previewBtn.addEventListener('click', () => setFileMode('preview'));
             // 编辑框为纯文本编辑:输入时不触发 Markdown 渲染(避免编辑态出现 markdown 副作用),
             // 预览容器仅在切到「预览」模式时渲染(见 setFileMode)。
+
+            // 若上次会话中该页面被隐藏(t.hidden),初始隐藏内容并让按钮显示「显示」
+            applyQuickHideState(t, hideBtn);
         }
         content.insertBefore(panel, settingsPanel);
     }
@@ -270,6 +289,30 @@ async function applyCustomTabs(tabs) {
     return customTabs.length > 0;
 }
 
+// 应用「隐藏/显示」乒乓状态:隐藏时编辑框与预览容器都不显示(工具栏保留),
+// 显示时恢复为当前编辑/预览模式(由高亮按钮判定)。
+function applyQuickHideState(t, hideBtn) {
+    const editor = document.getElementById(`editor-${t.id}`);
+    const md = document.getElementById(`md-${t.id}`);
+    const panel = document.getElementById(`tab-${t.id}`);
+    if (!editor || !md || !panel) return;
+
+    if (t.hidden) {
+        // 隐藏内容(保留工具栏)
+        editor.style.display = 'none';
+        md.style.display = 'none';
+        if (hideBtn) hideBtn.textContent = '显示';
+        return;
+    }
+
+    // 显示:恢复为当前模式(高亮按钮的 data-mode 判定,默认编辑)
+    const active = panel.querySelector('.custom-file-mode-btn.is-active');
+    const isPreview = active && active.dataset.mode === 'preview';
+    editor.style.display = isPreview ? 'none' : '';
+    md.style.display = isPreview ? '' : 'none';
+    if (hideBtn) hideBtn.textContent = '隐藏';
+}
+
 // 加载文件类自定义 Tab 内容:读取文本填入编辑框,并刷新预览
 async function loadCustomFileTab(t) {
     const editor = document.getElementById(`editor-${t.id}`);
@@ -482,8 +525,9 @@ function applyTabOrder(order) {
         });
         // 分组容器:系统在前,其后按 Tab 顺序;未对应 Tab 的组(如 poem)追加到末尾
         const groupOrder = ['system', ...allOrdered];
-        // 补全未出现在 Tab 顺序中的组(例如 poem),保持首次出现顺序
-        const named = new Map([['system', '系统'], ['poem', '古诗'], ['mouse', '鼠标提醒'], ['update', '升级']]);
+        // 补全未出现在 Tab 顺序中的组(例如 poem),保持首次出现顺序。
+        // 「升级」「快捷」设置项已并入「系统」组(data-tab-group=system),不再作为独立分组。
+        const named = new Map([['system', '系统'], ['poem', '古诗'], ['mouse', '鼠标提醒']]);
         Object.keys(grouped).forEach(g => {
             if (!groupOrder.includes(g)) groupOrder.push(g);
         });
@@ -696,6 +740,8 @@ const autostartToggle = document.getElementById('autostart');       // 开机启
 const topToggle = document.getElementById('always-on-top');         // 窗口置顶开关
 const startCompactToggle = document.getElementById('start-compact'); // 启动时缩小开关
 const hotkeyInput = document.getElementById('hotkey');              // 热键输入框
+const quickHotkeyInput = document.getElementById('quickhotkey');    // 「快捷」菜单热键输入框
+const proxyHotkeyInput = document.getElementById('proxyhotkey');    // 「网络代理」开关热键输入框
 const tabOrderText = document.getElementById('tab-order');          // Tab 显示顺序(每行一个 id)
 const stockCodesInput = document.getElementById('stock-codes');     // 股票代码
 const linksText = document.getElementById('links-text');            // 常用网址(每行 名称|网址)
@@ -712,14 +758,13 @@ const todoPathInput = document.getElementById('todo-path');         // 待办(
 const recordDBPathInput = document.getElementById('record-db-path'); // 记录(Record)数据库路径
 const backupDirInput = document.getElementById('backup-dir');       // 文本备份目录(文件类自定义 Tab「备份」按钮使用)
 const browserPathInput = document.getElementById('browser-path');   // 指定浏览器 exe 路径(空=系统默认)
-const gitlabUrlInput = document.getElementById('gitlab-base-url');  // GitLab 根地址
-const gitlabProjectInput = document.getElementById('gitlab-project'); // GitLab 项目路径
-const gitlabTokenInput = document.getElementById('gitlab-token');   // GitLab 访问令牌(masked)
-const gitlabBranchInput = document.getElementById('gitlab-branch'); // 版本清单分支 / Tag
 const browserPickBtn = document.getElementById('browser-pick');     // 选择浏览器按钮
 const browserClearBtn = document.getElementById('browser-clear');   // 清除浏览器按钮
 const customTabsText = document.getElementById('custom-tabs');      // 自定义 Tab(每行 名称|地址|备注)
 const localToolsText = document.getElementById('local-tools');      // 本地资源/工具(每行 标题|命令|说明)
+const quickToolsText = document.getElementById('quick-tools');      // 快捷启动(缩进分层:组名 + 缩进 名称|路径|说明)
+const quickImportBiniwareBtn = document.getElementById('quick-import-biniware'); // 从 Biniware Run brun.cfg 导入快捷启动
+const quickMenu = document.getElementById('quick-menu');            // 句柄右键弹出的快捷菜单容器
 const controlKeysText = document.getElementById('control-keys');    // 控制页按键(每行 图标|命令URL)
 const controlRepeatInput = document.getElementById('control-repeat'); // 控制页长按连发频率(秒)
 const saveButton = document.getElementById('save-settings');        // 保存按钮
@@ -826,6 +871,8 @@ async function syncForm(settings) {
     topToggle.checked = settings.alwaysOnTop;
     if (startCompactToggle) startCompactToggle.checked = !!settings.startCompact;
     hotkeyInput.value = settings.hotkey;
+    if (quickHotkeyInput) quickHotkeyInput.value = settings.quickHotkey || FALLBACK_SETTINGS.quickHotkey;
+    if (proxyHotkeyInput) proxyHotkeyInput.value = settings.proxyHotkey || ''; // 代理热键允许留空(不设热键)
     // 先重建自定义 Tab(供顺序文本框解析名称与 applyTabOrder 使用)
     await applyCustomTabs(settings.customTabs);
     // 完整 Tab 顺序文本:内置 + 自定义,按 settings.tabOrder 排序,未列出的追加(设置恒在最后)
@@ -850,6 +897,8 @@ async function syncForm(settings) {
     customTabsText.value = (settings.customTabs || []).map(t => `${t.name}|${t.url}${t.desc ? '|' + t.desc : ''}`).join('\n');
     localToolsText.value = (settings.localTools || []).map(t => `${t.title}|${t.cmd}${t.desc ? '|' + t.desc : ''}`).join('\n');
     renderLocals(settings.localTools || []); // 「本地」页卡片按最新配置重建
+    // 「快捷」项:仅回填设置文本,菜单在句柄右键时按最新配置实时构建
+    quickToolsText.value = quickGroupsToText(settings.quickGroups || []);
     // 控制页按键:回填设置表单并刷新方向盘按钮
     const cKeys = settings.controlKeys || FALLBACK_SETTINGS.controlKeys;
     controlKeysText.value = cKeys.map(k => `${k.icon || ''}|${k.cmd || ''}`).join('\n');
@@ -869,11 +918,6 @@ async function syncForm(settings) {
     recordDBPathInput.value = settings.recordDBPath;
     backupDirInput.value = settings.backupDir;
     browserPathInput.value = settings.browserPath || '';
-    const gl = settings.gitLab || {};
-    gitlabUrlInput.value = gl.baseUrl || 'https://git.scwy.net';
-    gitlabProjectInput.value = gl.projectPath || 'ease/toolbox';
-    gitlabTokenInput.value = gl.privateToken || '';
-    gitlabBranchInput.value = gl.branch || 'main';
     stockUpColorInput.value = settings.stockUpColor || FALLBACK_SETTINGS.stockUpColor;
     stockDownColorInput.value = settings.stockDownColor || FALLBACK_SETTINGS.stockDownColor;
     stockRefreshSecsInput.value = settings.stockRefreshSecs || FALLBACK_SETTINGS.stockRefreshSecs;
@@ -961,26 +1005,41 @@ function syncMouseAlertForm(cfg) {
 // ------------------------------------------------------------------------
 const MODIFIER_KEYS = ['Control', 'Shift', 'Alt', 'Meta'];
 
-hotkeyInput.addEventListener('keydown', (event) => {
-    event.preventDefault(); // 阻止输入框写入原始字符
+// 热键输入框通用绑定:点击后按下组合键,显示为 Ctrl+Shift+X 形式(支持 Ctrl/Shift/Alt/Meta)
+// 按 Backspace / Delete 清空(用于「留空=不设热键」,如代理开关热键)
+function bindHotkeyInput(input) {
+    if (!input) return;
+    input.addEventListener('keydown', (event) => {
+        event.preventDefault(); // 阻止输入框写入原始字符
 
-    if (MODIFIER_KEYS.includes(event.key)) {
-        return; // 只按下修饰键时,等待主键
-    }
+        if (MODIFIER_KEYS.includes(event.key)) {
+            return; // 只按下修饰键时,等待主键
+        }
+        // Backspace / Delete:清空热键(不设热键)
+        if (event.key === 'Backspace' || event.key === 'Delete') {
+            input.value = '';
+            markDirty();
+            return;
+        }
 
-    const parts = [];
-    if (event.ctrlKey || event.metaKey) parts.push('CmdOrCtrl'); // Windows 下对应 Ctrl
-    if (event.altKey) parts.push('Alt');
-    if (event.shiftKey) parts.push('Shift');
-    parts.push(event.key.length === 1 ? event.key.toUpperCase() : event.key); // 主键统一大写
+        const parts = [];
+        if (event.ctrlKey || event.metaKey) parts.push('CmdOrCtrl'); // Windows 下对应 Ctrl
+        if (event.altKey) parts.push('Alt');
+        if (event.shiftKey) parts.push('Shift');
+        parts.push(event.key.length === 1 ? event.key.toUpperCase() : event.key); // 主键统一大写
 
-    hotkeyInput.value = parts.join('+');
-    markDirty();
-});
+        input.value = parts.join('+');
+        markDirty();
+    });
 
-hotkeyInput.addEventListener('focus', () => {
-    hotkeyInput.select(); // 聚焦时全选,方便重新录入
-});
+    input.addEventListener('focus', () => {
+        input.select(); // 聚焦时全选,方便重新录入
+    });
+}
+
+bindHotkeyInput(hotkeyInput);
+bindHotkeyInput(quickHotkeyInput);
+bindHotkeyInput(proxyHotkeyInput);
 
 // 指定浏览器:选择按钮弹出文件选择框,清除按钮恢复系统默认
 browserPickBtn.addEventListener('click', async () => {
@@ -998,6 +1057,28 @@ browserClearBtn.addEventListener('click', () => {
     markDirty();
 });
 
+// 从 Biniware Run 的 brun.cfg 导入快捷启动:弹出文件选择框,后端解析并立即保存
+// (含托盘「快捷」子菜单重建),成功后把导入的分组回填到「快捷」文本域并同步内存配置。
+// 用户此后编辑文本域会进入「待保存」状态,点「保存」再持久化后续改动。
+quickImportBiniwareBtn.addEventListener('click', async () => {
+    try {
+        const groups = await QuickService.ImportBiniwareRun();
+        if (!groups || !groups.length) return; // 用户取消
+        currentSettings.quickGroups = groups;      // 同步内存配置,避免 syncForm 回退旧值
+        quickToolsText.value = quickGroupsToText(groups);
+        isDirty = false;                            // 后端已保存,无需再触发自动保存
+        renderQuickMenu(groups);                    // 立即刷新句柄右键「快捷」菜单
+        saveStatus.textContent = `已导入 ${groups.length} 组快捷项`;
+        saveStatus.classList.remove('is-error');
+        saveStatus.classList.add('is-ok');
+    } catch (err) {
+        console.warn('导入 BiniwareRun 配置失败:', err);
+        saveStatus.textContent = '导入失败:' + (err?.message || err);
+        saveStatus.classList.remove('is-ok');
+        saveStatus.classList.add('is-error');
+    }
+});
+
 // ------------------------------------------------------------------------
 // 读取 / 保存配置
 // ------------------------------------------------------------------------
@@ -1106,6 +1187,211 @@ function renderLocals(tools) {
     }
 }
 
+// ------------------------------------------------------------------------
+// 快捷页:缩进分层配置(组名 + 名称|路径|说明),自动识别程序图标并启动
+// ------------------------------------------------------------------------
+
+// 缩进识别:行首空格/制表符数量。>=2 个空格或 >=1 个制表符视为缩进条目。
+const QUICK_INDENT = /^(?: {2,}|\t)/;
+
+// 解析缩进分层文本为分组数组:
+// 顶层无缩进且不含 | 的行 = 分组名;缩进条目 = 名称|路径|说明;
+// 顶层无缩进但含 | 的行 = 未分组条目(不归任何组),集中到结尾的「未分组」组。
+function parseQuickText(text) {
+    const groups = [];
+    const ungrouped = []; // 未分组条目(顶层含 | 的行 + 无分组标题的缩进条目)
+    let cur = {name: '', items: []};
+    const flushCur = () => {
+        if (cur.items.length) {
+            if (cur.name) groups.push(cur);
+            else ungrouped.push(...cur.items); // 无标题的缩进条目并入未分组
+        }
+        cur = {name: '', items: []};
+    };
+    for (const raw of (text || '').split('\n')) {
+        const line = raw.replace(/\r$/, '');
+        const trimmed = line.trim();
+        if (!trimmed) continue; // 跳过空行
+        if (QUICK_INDENT.test(line)) {
+            // 缩进条目:名称|路径|说明(说明可省略)
+            const parts = trimmed.split('|');
+            const item = {
+                title: (parts[0] || '').trim(),
+                path: (parts[1] || '').trim(),
+                desc: (parts[2] || '').trim(),
+            };
+            if (item.title && item.path) cur.items.push(item);
+        } else if (trimmed.includes('|')) {
+            // 顶层条目(未分层):结束当前组,条目直接进未分组
+            flushCur();
+            const parts = trimmed.split('|');
+            const item = {
+                title: (parts[0] || '').trim(),
+                path: (parts[1] || '').trim(),
+                desc: (parts[2] || '').trim(),
+            };
+            if (item.title && item.path) ungrouped.push(item);
+        } else {
+            // 顶层分组名:结束当前组,开启新分组
+            flushCur();
+            cur = {name: trimmed, items: []};
+        }
+    }
+    flushCur();
+    if (ungrouped.length) groups.push({name: '', items: ungrouped}); // 未分组条目集中到结尾
+    return groups.filter(g => g.items.length > 0);
+}
+
+// 把分组数组编码为缩进分层文本(回填设置表单用)。
+// 未分组(name 为空)条目直接输出,其余组先输出组名再输出缩进条目。
+function quickGroupsToText(groups) {
+    return (groups || []).map(g => {
+        const lines = [];
+        if (g.name) lines.push(g.name);
+        for (const it of g.items) {
+            // 未分组条目不带缩进(否则重新解析会被归入最近的分组,丢失「未分组」语义)
+            const prefix = g.name ? '    ' : '';
+            lines.push(`${prefix}${it.title}|${it.path}${it.desc ? '|' + it.desc : ''}`);
+        }
+        return lines.join('\n');
+    }).join('\n');
+}
+
+// 构建「句柄右键 → 快捷启动」菜单:按分组嵌套,条目带图标 + 名称,
+// 点击即启动。无条目时显示「未配置快捷项」提示。
+// 层级结构:命名分组作为可展开/收起的节点(标题行点击切换,箭头 ▸/▾ 指示),
+// 未分组条目直接平铺在顶层。
+function renderQuickMenu(groups) {
+    if (!quickMenu) return;
+    quickMenu.innerHTML = '';
+    const list = groups || [];
+    if (!list.length) {
+        const empty = document.createElement('div');
+        empty.className = 'quick-menu-empty';
+        empty.textContent = '未配置快捷项:到 设置 → 快捷 添加';
+        quickMenu.appendChild(empty);
+        return;
+    }
+    for (const g of list) {
+        if (g.name) {
+            // 分组标题:点击展开/收起
+            const groupHead = document.createElement('button');
+            groupHead.type = 'button';
+            groupHead.className = 'quick-menu-group';
+            const arrow = document.createElement('span');
+            arrow.className = 'quick-menu-arrow';
+            arrow.textContent = '▸';
+            const gname = document.createElement('span');
+            gname.className = 'quick-menu-name';
+            gname.textContent = g.name;
+            const gcount = document.createElement('span');
+            gcount.className = 'quick-menu-count';
+            gcount.textContent = g.items.length;
+            groupHead.appendChild(arrow);
+            groupHead.appendChild(gname);
+            groupHead.appendChild(gcount);
+            quickMenu.appendChild(groupHead);
+
+            // 分组条目容器:默认收起(点击标题展开)
+            const groupBody = document.createElement('div');
+            groupBody.className = 'quick-menu-body';
+            groupHead.addEventListener('click', () => {
+                const isOpen = groupBody.classList.toggle('is-open');
+                arrow.textContent = isOpen ? '▾' : '▸';
+            });
+            appendQuickItems(groupBody, g.items);
+            quickMenu.appendChild(groupBody);
+        } else {
+            // 未分组条目:直接平铺在顶层
+            appendQuickItems(quickMenu, g.items);
+        }
+    }
+}
+
+// 向容器追加一组快捷条目(图标 + 名称,点击即启动)
+function appendQuickItems(container, items) {
+    for (const it of items) {
+        const row = document.createElement('button');
+        row.type = 'button';
+        row.className = 'quick-menu-item';
+        row.title = it.desc || it.path;
+
+        const icon = document.createElement('img');
+        icon.className = 'quick-menu-icon';
+        icon.alt = '';
+        icon.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; // 占位,加载后替换
+        // 自动识别程序图标:路径非空才请求,失败/无图标时回退通用图标
+        if (it.path) {
+            const src = it.path;
+            Promise.resolve()
+                .then(() => typeof QuickService?.GetIcon === 'function' ? QuickService.GetIcon(src) : Promise.resolve(''))
+                .then(uri => { icon.src = uri || quickFallbackIcon(); })
+                .catch(() => { icon.src = quickFallbackIcon(); });
+        }
+        row.appendChild(icon);
+
+        const name = document.createElement('span');
+        name.className = 'quick-menu-name';
+        name.textContent = it.title;
+        row.appendChild(name);
+
+        row.addEventListener('click', () => {
+            hideQuickMenu();
+            if (row.disabled) return;
+            const label = row.textContent;
+            row.disabled = true;
+            QuickService.Launch(it.title, it.path)
+                .then(() => { row.textContent = '已启动 ' + (it.title || ''); })
+                .catch(err => { row.textContent = '失败 ' + (it.title || ''); row.title = `启动失败:${err?.message || err}`; })
+                .finally(() => setTimeout(() => { row.textContent = label; row.disabled = false; }, 1200));
+        });
+        container.appendChild(row);
+    }
+}
+
+// 通用图标:后端 GetIcon 失败/无图标时回退为通用程序图形(SVG data URI)
+function quickFallbackIcon() {
+    const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="6" fill="rgba(128,128,128,.18)"/><rect x="9" y="13" width="14" height="10" rx="2" fill="none" stroke="currentColor" stroke-width="2"/><rect x="12" y="8" width="8" height="5" rx="1" fill="none" stroke="currentColor" stroke-width="2"/></svg>`;
+    return 'data:image/svg+xml;base64,' + btoa(unescape(encodeURIComponent(svg)));
+}
+
+// 显示句柄右键快捷菜单:定位到句柄下方,先构建再展示
+function showQuickMenu(anchor) {
+    if (!quickMenu) return;
+    renderQuickMenu(currentSettings.quickGroups || []);
+    const r = anchor.getBoundingClientRect();
+    // 贴住句柄左下角
+    positionQuickMenu(r.left, r.bottom + 4);
+}
+
+// 在指定 viewport 坐标处弹出快捷菜单(全局热键用,坐标已由后端换算)
+function showQuickMenuAt(x, y) {
+    if (!quickMenu) return;
+    renderQuickMenu(currentSettings.quickGroups || []);
+    positionQuickMenu(x, y);
+}
+
+// 统一菜单定位:先解除 hidden 使其可测量,再贴住给定坐标,超出视口时收回到边界内
+function positionQuickMenu(x, y) {
+    if (!quickMenu) return;
+    quickMenu.hidden = false;            // 先解除 hidden,使测量尺寸可用
+    quickMenu.classList.add('is-open');
+    const menuRect = quickMenu.getBoundingClientRect();
+    let px = Math.min(x, window.innerWidth - menuRect.width - 8);
+    let py = Math.min(y, window.innerHeight - menuRect.height - 8);
+    px = Math.max(8, px);
+    py = Math.max(8, py);
+    quickMenu.style.left = px + 'px';
+    quickMenu.style.top = py + 'px';
+}
+
+// 隐藏句柄右键快捷菜单
+function hideQuickMenu() {
+    if (!quickMenu) return;
+    quickMenu.classList.remove('is-open');
+    quickMenu.hidden = true;
+}
+
 function collectForm() {
     // 数组字段:表单为空时回退到当前生效配置,避免保存时用空值覆盖已有数据。
     // 用户可能在设置页修改单个字段后保存,此时未触碰的 textarea 若为空不能清空原配置。
@@ -1146,6 +1432,8 @@ function collectForm() {
         alwaysOnTop: topToggle.checked,
         startCompact: !!startCompactToggle?.checked,
         hotkey: hotkeyInput.value.trim() || FALLBACK_SETTINGS.hotkey,
+        quickHotkey: quickHotkeyInput ? (quickHotkeyInput.value.trim() || FALLBACK_SETTINGS.quickHotkey) : FALLBACK_SETTINGS.quickHotkey,
+        proxyHotkey: proxyHotkeyInput ? proxyHotkeyInput.value.trim() : '', // 代理热键:留空=不设热键
         tabOrder: collectTabOrder(),
         stockCodes,
         links: parsePipeLines(fallbackArr(linksText, 'links'), 'name', 'url').filter(l => l.name && l.url),
@@ -1154,6 +1442,14 @@ function collectForm() {
         githubRepos: parsePipeLines3(fallbackArr(githubReposText, 'githubRepos'), 'url', 'desc', 'version').filter(r => r.url),
         customTabs: parsePipeLines3(fallbackArr(customTabsText, 'customTabs'), 'name', 'url', 'desc').filter(t => t.name && t.url),
         localTools: parsePipeLines3(fallbackArr(localToolsText, 'localTools'), 'title', 'cmd', 'desc').filter(t => t.title && t.cmd),
+        // 「快捷」页:缩进分层解析(组名 + 名称|路径|说明 条目),表单为空时回退已有配置
+        quickGroups: (() => {
+            const v = quickToolsText.value.trim();
+            if (v) return parseQuickText(v);
+            const cur = currentSettings.quickGroups;
+            if (Array.isArray(cur) && cur.length) return cur;
+            return [];
+        })(),
         // 控制页按键:前 5 键固定(顺序 上/下/左/右/休眠),第 6 键起为额外按键;
         // 固定键图标空回填默认、命令可空;额外键图标空 = 跳过该行,命令可空
         controlKeys: (() => {
@@ -1184,12 +1480,7 @@ function collectForm() {
         recordDBPath: recordDBPathInput.value.trim(),
         backupDir: backupDirInput.value.trim(),
         browserPath: browserPathInput.value.trim(), // 指定浏览器 exe 路径(空=系统默认)
-        gitLab: {  // 私有 GitLab 自动升级配置
-            baseUrl: gitlabUrlInput.value.trim(),
-            projectPath: gitlabProjectInput.value.trim(),
-            privateToken: gitlabTokenInput.value.trim(),
-            branch: gitlabBranchInput.value.trim(),
-        },
+        gitLab: currentSettings.gitLab || {}, // 升级源配置仅存于配置文件(设置界面已移除该行),此处透传保留,需修改时手动编辑 settings.json
         stockUpColor: fallbackColor(stockUpColorInput, currentSettings.stockUpColor, FALLBACK_SETTINGS.stockUpColor),
         stockDownColor: fallbackColor(stockDownColorInput, currentSettings.stockDownColor, FALLBACK_SETTINGS.stockDownColor),
         stockRefreshSecs: parseInt(stockRefreshSecsInput.value, 10) || FALLBACK_SETTINGS.stockRefreshSecs,
@@ -1909,11 +2200,13 @@ function setFeedbackStatus(text, ok) {
 
 // 推送到 ntfy:POST https://ntfy.sh/ease,带标题与优先级
 async function sendFeedback(text) {
+    // HTTP Header 值仅允许 ISO-8859-1 字节,中文标题必须 URL 编码为 ASCII;
+    // ntfy 会解码 `Title=...` 形式的编码(如 %E8%85%BE...)后显示
     const title = `腾图工具箱反馈 ${new Date().toLocaleString('zh-CN', { hour12: false })}`;
     const res = await fetch(`https://ntfy.sh/${FEEDBACK_TOPIC}`, {
         method: 'POST',
         headers: {
-            'Title': title,
+            'Title': encodeURIComponent(title),
             'Priority': 'default',
             'Tags': 'mega', // 大写字母标签,便于手机端识别
             'Content-Type': 'text/plain; charset=utf-8',
@@ -5683,6 +5976,17 @@ Events.On('windowCompact', (event) => {
     setCompactUI(!!event.data);
 });
 
+// 「快捷」菜单全局热键:后端已在鼠标位置弹出原生菜单,前端无需定位。
+// (原生 TrackPopupMenu 由后端直接显示在屏幕坐标处,不受 Webview 裁剪)
+Events.On('showQuickMenuAt', (event) => {
+    showNativeQuick();
+});
+
+// 「代理开关」全局热键:后端已切换系统代理,同步刷新工具页「网络代理」卡片状态
+Events.On('proxyChanged', (event) => {
+    renderProxyStatus(event?.data || null);
+});
+
 // 托盘菜单点击某个 Tab 同名项:切换到对应页面(后端已先显示窗口)
 Events.On('switchTab', (event) => {
     const tabId = event?.data;
@@ -5697,6 +6001,46 @@ tabDragHandle?.addEventListener('dblclick', () => {
     }
 });
 
+// 句柄右键:弹出快捷启动菜单(类似 Biniware Run),条目来自 设置→快捷。
+// 句柄已设为 --wails-draggable: no-drag(style.css),contextmenu 可正常触发;
+// 窗口拖动由父级 .tab-buttons / .win-spacer 承担,不受影响。
+// 注意:句柄仅在「全尺寸」窗口可见(收拢态被 #compact-restore 圆点覆盖),
+// 此时 Webview 足够大,HTML 菜单不会被裁剪,故直接走可靠的 HTML 菜单;
+// 原生 TrackPopupMenu 留给收拢态圆点/全局热键(Webview 太小、HTML 会被裁剪)。
+tabDragHandle?.addEventListener('contextmenu', (e) => {
+    e.preventDefault(); // 屏蔽系统默认右键菜单
+    e.stopPropagation();
+    showQuickMenu(tabDragHandle);
+});
+
+// 兜底:句柄/圆点区域的系统默认右键菜单一律屏蔽,避免弹出无关的 Webview 默认菜单。
+document.addEventListener('contextmenu', (e) => {
+    if (e.target === tabDragHandle || e.target === document.getElementById('compact-restore') ||
+        tabDragHandle?.contains(e.target)) {
+        e.preventDefault();
+    }
+});
+
+// 调用后端原生快捷菜单:Wails 环境走后端 TrackPopupMenu(支持分组子菜单 + 程序图标);
+// 浏览器预览无后端或后端调用失败时回退 HTML 菜单(定位到锚点)。
+function showNativeQuick(anchor) {
+    if (typeof QuickService?.ShowQuickMenu === 'function') {
+        QuickService.ShowQuickMenu()
+            .catch(() => { if (anchor) showQuickMenu(anchor); }); // 后端失败回退 HTML 菜单,保证右键有反馈
+    } else if (anchor) {
+        showQuickMenu(anchor);
+    }
+}
+
+// 点击/滚动/按 Esc 关闭句柄右键菜单;点击菜单内不关闭(由条目自身处理)
+document.addEventListener('mousedown', (e) => {
+    if (quickMenu?.classList.contains('is-open') && !quickMenu.contains(e.target) && e.target !== tabDragHandle && e.target !== compactRestore) {
+        hideQuickMenu();
+    }
+});
+document.addEventListener('wheel', () => hideQuickMenu(), {passive: true});
+document.addEventListener('keydown', (e) => { if (e.key === 'Escape') hideQuickMenu(); });
+
 // 居中还原圆点:双击还原窗口大小(紧凑状态下手柄不可见,用此兜底)
 const compactRestore = document.getElementById('compact-restore');
 compactRestore?.addEventListener('dblclick', () => {
@@ -5706,6 +6050,13 @@ compactRestore?.addEventListener('dblclick', () => {
     }
 });
 
+// 圆点右键:与句柄一致,弹出快捷启动菜单(收拢后句柄不可见,圆点即交互区)
+compactRestore?.addEventListener('contextmenu', (e) => {
+    e.preventDefault(); // 屏蔽系统默认右键菜单
+    e.stopPropagation();
+    showNativeQuick(compactRestore);
+});
+
 // ------------------------------------------------------------------------
 // 拖动手柄圆点闪烁:API POST /api/handle/flash 触发,颜色+大小变化动画
 // 后端广播 handleFlash 事件(payload 为闪烁次数),前端播放 keyframes 动画

+ 190 - 31
main.go

@@ -42,6 +42,11 @@ var trayIcon []byte // 嵌入系统托盘图标(PNG 格式)
 var (
 	app        *application.App           // 应用实例
 	mainWindow *application.WebviewWindow // 主窗口
+	tray       *application.SystemTray    // 系统托盘(导入快捷配置后需重建菜单)
+
+	// 快捷启动 ContextMenu:右键收拢圆点/句柄时弹出,用主窗口句柄作宿主,
+	// 在光标位置显示(OpenContextMenu),不受收拢后 32x32 小窗口尺寸限制。
+	quickContextMenu *application.ContextMenu
 
 	// 窗口隐藏前的位置,恢复显示时还原
 	savedX, savedY int
@@ -73,6 +78,50 @@ func showMainWindow() {
 	}
 }
 
+// showQuickMenuAtCursor 「快捷」菜单全局热键回调:显示窗口(若收拢先还原),
+// 获取当前鼠标位置,向前端发射 showQuickMenuAt 事件(带屏幕坐标),前端据此在鼠标位置弹出快捷菜单。
+func showQuickMenuAtCursor() {
+	if mainWindow == nil {
+		return
+	}
+	// 若窗口收拢为圆点,先还原到收拢前尺寸(菜单需要完整的可视区域)
+	compactMu.Lock()
+	wasCompact := compactActive
+	compactMu.Unlock()
+	if wasCompact {
+		(&SettingsService{}).ToggleWindowCompact()
+		if app != nil {
+			app.Event.Emit("windowCompact", false)
+		}
+	}
+	mainWindow.Show()
+	mainWindow.Focus()
+
+	// 读取鼠标屏幕坐标,通知前端在鼠标处弹菜单
+	x, y := cursorScreenPos()
+	if app != nil {
+		app.Event.Emit("showQuickMenuAt", map[string]int{"x": x, "y": y})
+	}
+}
+
+// toggleProxyByHotkey 「网络代理」开关全局热键回调:切换系统代理启用/禁用,
+// 并向前端发射 proxyChanged 事件刷新工具页「网络代理」卡片状态。
+func toggleProxyByHotkey() {
+	if app == nil {
+		return
+	}
+	st, err := NewProxyService().ToggleProxy()
+	if err != nil {
+		log.Printf("toggle proxy by hotkey failed: %v", err)
+		return
+	}
+	app.Event.Emit("proxyChanged", map[string]any{
+		"enabled":    st.Enabled,
+		"server":     st.Server,
+		"configured": st.Configured,
+	})
+}
+
 var (
 	windowSizeSaveMu    sync.Mutex
 	windowSizeSaveTimer *time.Timer
@@ -239,6 +288,144 @@ func iconExit() []byte {
 	})
 }
 
+// hasQuickItems 判断是否配置了任何快捷启动项(任一分组含非空条目)。
+// 托盘菜单据此决定是否显示「快捷」子菜单:未配置任何快捷项则不显示。
+func hasQuickItems() bool {
+	for _, g := range loadSettings().QuickGroups {
+		if len(g.Items) > 0 {
+			return true
+		}
+	}
+	return false
+}
+
+// buildQuickTrayMenu 把「快捷」启动分组构建为托盘子菜单。
+// 复用 buildQuickMenu 的通用构建逻辑(分组子菜单 + 条目图标 + 点击启动)。
+func buildQuickTrayMenu(menu *application.Menu) {
+	buildQuickMenu(menu)
+}
+
+// buildQuickMenu 把「快捷」启动分组构建为指定 Menu 的项:
+// 每个命名分组生成一个子菜单,未分组条目直接放在顶层;条目点击即启动应用,
+// 并尽量挂上 16x16 程序图标(quickIconCachedPNG 缓存)。托盘菜单与
+// 快捷 ContextMenu 共用此构建逻辑,保证两处菜单项一致。
+func buildQuickMenu(menu *application.Menu) {
+	groups := loadSettings().QuickGroups
+	added := false
+	for _, g := range groups {
+		if len(g.Items) == 0 {
+			continue
+		}
+		if g.Name != "" {
+			// 有分组名:生成一个子菜单,组内条目作为菜单项
+			sub := menu.AddSubmenu(g.Name)
+			for _, it := range g.Items {
+				item := it // 闭包捕获当前条目
+				mi := sub.Add(item.Title)
+				if item.Desc != "" {
+					mi.SetTooltip(item.Desc)
+				}
+				if icon, ok := quickIconCachedPNG(item.Path); ok {
+					mi.SetBitmap(icon) // 缓存 16x16 PNG,显示程序图标
+				}
+				mi.OnClick(func(_ *application.Context) {
+					if _, err := (&LocalService{}).Launch(item.Title, item.Path); err != nil {
+						log.Printf("quick launch %q failed: %v", item.Title, err)
+					}
+				})
+			}
+			added = true
+		} else {
+			// 未分组条目:直接放在菜单顶层
+			for _, it := range g.Items {
+				item := it // 闭包捕获当前条目
+				mi := menu.Add(item.Title)
+				if item.Desc != "" {
+					mi.SetTooltip(item.Desc)
+				}
+				if icon, ok := quickIconCachedPNG(item.Path); ok {
+					mi.SetBitmap(icon) // 缓存 16x16 PNG,显示程序图标
+				}
+				mi.OnClick(func(_ *application.Context) {
+					if _, err := (&LocalService{}).Launch(item.Title, item.Path); err != nil {
+						log.Printf("quick launch %q failed: %v", item.Title, err)
+					}
+				})
+				added = true
+			}
+		}
+	}
+	if !added {
+		// 无任何快捷项时给出提示(禁用项),避免空白菜单
+		menu.Add("(未配置快捷项,请在 设置-快捷 中添加)").SetEnabled(false)
+	}
+}
+
+// buildTrayMenu 构建托盘右键菜单:
+// 显示主窗口 → 「快捷」子菜单(仅配置了快捷项时显示)→ Tab 列表 → 设置/退出。
+// 每次调用都会重建 ContextMenu 与托盘菜单,保证「快捷」项与最新设置一致
+// (导入 Biniware Run 配置后调用 refreshQuickMenus 刷新)。
+func buildTrayMenu() {
+	if tray == nil {
+		return
+	}
+	trayMenu := application.NewMenu()
+	// 菜单项图标:运行时程序化生成 16×16 PNG(SetBitmap 支持,官方系统托盘文档标注 Windows/macOS/Linux 均支持)
+	trayMenu.Add("显示主窗口").SetBitmap(iconWindow()).OnClick(func(_ *application.Context) {
+		showMainWindow() // 显示窗口到隐藏前的位置并聚焦
+	})
+	trayMenu.AddSeparator() // 「显示主窗口」与「快捷」之间的分隔线
+
+	// 「快捷」子菜单(第二个位置):直接列出各个应用的快捷启动项(点击即启动),
+	// 按设置的快捷分组组织;未分组条目放在「快捷」菜单顶层。
+	// 仅当配置了快捷项时才显示该子菜单(未配置则不出现)。
+	if hasQuickItems() {
+		buildQuickTrayMenu(trayMenu.AddSubmenu("快捷"))
+	}
+
+	// 为每个 Tab 生成同名菜单项:点击后显示窗口并切到对应页面
+	for _, tab := range trayTabItems() {
+		id := tab.id // 闭包捕获当前 Tab id
+		trayMenu.Add(tab.name).OnClick(func(_ *application.Context) {
+			showMainWindow()
+			if app != nil {
+				app.Event.Emit("switchTab", id) // 前端收到后切换到该 Tab
+			}
+		})
+	}
+
+	// 快捷启动 ContextMenu(右键收拢圆点/句柄时弹出):
+	// 与托盘菜单共用 buildQuickMenu 构建逻辑。OpenContextMenu 用主窗口句柄作宿主,
+	// 在光标位置弹出,不受收拢后 32x32 小窗口尺寸限制(修复收拢态右键不弹菜单)。
+	quickContextMenu = application.NewContextMenu("quickmenu")
+	buildQuickMenu(quickContextMenu.Menu)
+
+	trayMenu.AddSeparator() // Tab 列表与「设置 / 退出」之间的分隔线
+	trayMenu.Add("设置").SetBitmap(iconGear()).OnClick(func(_ *application.Context) {
+		showMainWindow()
+		if app != nil {
+			app.Event.Emit("switchTab", "settings")
+		}
+	})
+	trayMenu.Add("退出").SetBitmap(iconExit()).OnClick(func(_ *application.Context) {
+		app.Quit() // 彻底退出应用
+	})
+	tray.SetMenu(trayMenu) // 设置托盘右键菜单
+}
+
+// refreshQuickMenus 在快捷配置变更后重建托盘菜单与快捷 ContextMenu,
+// 使「快捷」子菜单(第二个位置)与右键菜单立即反映最新配置。
+func refreshQuickMenus() {
+	if tray != nil {
+		buildTrayMenu() // 重建托盘菜单(含「快捷」子菜单显隐与条目)
+	}
+	if quickContextMenu != nil {
+		quickContextMenu.Menu.Clear()
+		buildQuickMenu(quickContextMenu.Menu)
+		quickContextMenu.Update()
+	}
+}
+
 // main 是应用程序的入口,整体流程如下:
 //  1. 创建 Wails 应用实例(注册服务、配置资源服务器)
 //  2. 创建主窗口
@@ -298,6 +485,7 @@ func main() {
 			application.NewService(NewMemosService()),      // 注册 MemosService,供 Memos 速记工具调用 REST API
 			application.NewService(NewBrightnessService()), // 注册 BrightnessService,供显示器亮度工具调光
 			application.NewService(&LocalService{}),        // 注册 LocalService,供「本地」页启动配置的程序/脚本
+			application.NewService(&QuickService{}),        // 注册 QuickService,供「快捷」页启动程序并提取图标
 			application.NewService(NewUDPService()),        // 注册 UDPService,供工具页 UDP 键值服务器启停/发送
 			application.NewService(NewProxyService()),      // 注册 ProxyService,供工具页「网络代理」设置/启用/禁用系统代理
 			application.NewService(dockService),            // 注册 dockService,前端可通过 bindings 直接调用其 SetBadge 方法
@@ -385,41 +573,12 @@ func main() {
 	// ------------------------------------------------------------------------
 	// 关闭窗口时隐藏到托盘;双击托盘图标恢复窗口显示
 	// 托盘菜单提供「显示 / 退出」两个入口
-	tray := app.SystemTray.New()
+	tray = app.SystemTray.New()
 	tray.SetIcon(trayIcon)   // 设置托盘图标(嵌入的 wails.png)
 	tray.SetTooltip("腾图工具箱") // 设置鼠标悬停提示
 	tray.AttachWindow(win)   // 绑定窗口:点击托盘图标自动切换窗口显隐
 
-	// 构建托盘右键菜单
-	trayMenu := application.NewMenu()
-	// 菜单项图标:运行时程序化生成 16×16 PNG(SetBitmap 支持,官方系统托盘文档标注 Windows/macOS/Linux 均支持)
-	trayMenu.Add("显示主窗口").SetBitmap(iconWindow()).OnClick(func(_ *application.Context) {
-		showMainWindow() // 显示窗口到隐藏前的位置并聚焦
-	})
-	trayMenu.AddSeparator() // 「显示主窗口」与 Tab 列表之间的分隔线
-
-	// 为每个 Tab 生成同名菜单项:点击后显示窗口并切到对应页面
-	for _, tab := range trayTabItems() {
-		id := tab.id // 闭包捕获当前 Tab id
-		trayMenu.Add(tab.name).OnClick(func(_ *application.Context) {
-			showMainWindow()
-			if app != nil {
-				app.Event.Emit("switchTab", id) // 前端收到后切换到该 Tab
-			}
-		})
-	}
-
-	trayMenu.AddSeparator() // Tab 列表与「设置 / 退出」之间的分隔线
-	trayMenu.Add("设置").SetBitmap(iconGear()).OnClick(func(_ *application.Context) {
-		showMainWindow()
-		if app != nil {
-			app.Event.Emit("switchTab", "settings")
-		}
-	})
-	trayMenu.Add("退出").SetBitmap(iconExit()).OnClick(func(_ *application.Context) {
-		app.Quit() // 彻底退出应用
-	})
-	tray.SetMenu(trayMenu) // 设置托盘右键菜单
+	buildTrayMenu() // 构建托盘右键菜单(含「快捷」子菜单与各 Tab 入口)
 
 	// ------------------------------------------------------------------------
 	// 第 5 步:注册窗口事件处理

+ 217 - 0
quickservice.go

@@ -0,0 +1,217 @@
+// ============================================================================
+// quickservice.go — 快捷启动服务(「快捷」Tab,类似 Biniware Run)
+//
+// 在设置中以缩进分层文本维护:顶层无缩进行为分组名,其下缩进的
+// 「名称|程序路径|说明」条目归入该组(说明可省略)。「快捷」页按分组
+// 展示条目(自动识别程序图标),点击即启动。
+// ============================================================================
+package main
+
+import (
+	"encoding/xml"
+	"fmt"
+	"os"
+	"strings"
+
+	"github.com/wailsapp/wails/v3/pkg/application"
+)
+
+// binwareShortcut 对应 Biniware Run 配置文件(brun.cfg)里的一个 <Shortcut> 节点。
+// 既可以是分组(含子 <Shortcuts>),也可以是单条快捷项(含 <Path>)。
+type binwareShortcut struct {
+	Name     string             `xml:"Name"`
+	Path     string             `xml:"Path"`
+	StartIn  string             `xml:"StartIn"`
+	Icon     string             `xml:"Icon"`
+	Shortcuts []binwareShortcut `xml:"Shortcuts>Shortcut"`
+}
+
+// binwareConfig 对应 brun.cfg 的根节点 <brun>。
+type binwareConfig struct {
+	Shortcuts []binwareShortcut `xml:"Shortcuts>Shortcut"`
+}
+
+// QuickService 快捷启动服务,前端通过 bindings 调用。
+type QuickService struct{}
+
+// GetQuickGroups 返回「快捷」页分组配置(含未分组条目)。
+func (s *QuickService) GetQuickGroups() []QuickGroup {
+	return loadSettings().QuickGroups
+}
+
+// ImportBiniwareRun 弹出文件选择对话框,让用户选择 Biniware Run 的配置文件
+// (brun.cfg),解析其中的快捷分组与条目并导入到当前程序的「快捷」设置中,
+// 随后保存设置并重建托盘/右键菜单(含「快捷」子菜单)。
+// 返回导入后的分组列表(用户取消时返回空切片,err 为 nil)。
+func (s *QuickService) ImportBiniwareRun() ([]QuickGroup, error) {
+	if app == nil {
+		return nil, fmt.Errorf("应用未初始化")
+	}
+	// 弹出文件选择框,默认定位到 Biniware Run 的配置目录(若存在)
+	cfgPath, err := app.Dialog.OpenFile().
+		CanChooseDirectories(false).
+		CanChooseFiles(true).
+		AddFilter("Biniware Run 配置文件", "*.cfg;*.xml;*").
+		SetTitle("选择 Biniware Run 配置文件(brun.cfg)").
+		PromptForSingleSelection()
+	if err != nil {
+		return nil, err
+	}
+	if cfgPath == "" {
+		return nil, nil // 用户取消
+	}
+
+	groups, err := parseBiniwareRun(cfgPath)
+	if err != nil {
+		return nil, fmt.Errorf("解析配置文件失败: %w", err)
+	}
+	if len(groups) == 0 {
+		return nil, fmt.Errorf("配置文件中未找到任何快捷项")
+	}
+
+	// 保存到设置并刷新运行时(托盘「快捷」子菜单、右键菜单)
+	settings := loadSettings()
+	settings.QuickGroups = groups
+	if err := saveSettings(settings); err != nil {
+		return nil, fmt.Errorf("保存设置失败: %w", err)
+	}
+	refreshQuickMenus()
+
+	return groups, nil
+}
+
+// parseBiniwareRun 解析 Biniware Run 的 brun.cfg,转换为「快捷」分组结构。
+// 顶层 <Shortcut> 若含子 <Shortcuts> 则作为分组(子项为组内条目);
+// 否则作为未分组条目(放在 name 为空的组里)。条目 Path 为空时跳过。
+func parseBiniwareRun(path string) ([]QuickGroup, error) {
+	data, err := os.ReadFile(path)
+	if err != nil {
+		return nil, err
+	}
+	var cfg binwareConfig
+	if err := xml.Unmarshal(data, &cfg); err != nil {
+		return nil, err
+	}
+
+	groups := make([]QuickGroup, 0, len(cfg.Shortcuts))
+	ungrouped := make([]QuickItem, 0)
+	for _, sc := range cfg.Shortcuts {
+		name := strings.TrimSpace(sc.Name)
+		if len(sc.Shortcuts) > 0 {
+			// 分组:递归收集其子条目(Biniware 只一层嵌套,这里防御性递归)
+			items := flattenBiniware(sc.Shortcuts)
+			if len(items) > 0 {
+				groups = append(groups, QuickGroup{Name: name, Items: items})
+			}
+		} else {
+			// 单条:未分组条目
+			if it, ok := binwareToItem(sc); ok {
+				ungrouped = append(ungrouped, it)
+			}
+		}
+	}
+	if len(ungrouped) > 0 {
+		groups = append(groups, QuickGroup{Name: "", Items: ungrouped})
+	}
+	return groups, nil
+}
+
+// flattenBiniware 递归收集 Biniware 快捷条目(有子级则继续下钻,否则作为条目)。
+func flattenBiniware(scs []binwareShortcut) []QuickItem {
+	items := make([]QuickItem, 0)
+	for _, sc := range scs {
+		if len(sc.Shortcuts) > 0 {
+			items = append(items, flattenBiniware(sc.Shortcuts)...)
+			continue
+		}
+		if it, ok := binwareToItem(sc); ok {
+			items = append(items, it)
+		}
+	}
+	return items
+}
+
+// binwareToItem 把一条 Biniware 快捷项转换为 QuickItem。
+// Path 为空视为无效(返回 ok=false);说明缺省为空。
+func binwareToItem(sc binwareShortcut) (QuickItem, bool) {
+	title := strings.TrimSpace(sc.Name)
+	path := strings.TrimSpace(sc.Path)
+	if title == "" || path == "" {
+		return QuickItem{}, false
+	}
+	return QuickItem{Title: title, Path: path, Desc: strings.TrimSpace(sc.StartIn)}, true
+}
+
+// GetIcon 提取程序路径关联的图标,返回 PNG data URI(供 <img src> 展示)。
+// 无法提取(文件不存在 / 非 exe 等)时返回空串,前端回退到通用图标。
+func (s *QuickService) GetIcon(path string) (string, error) {
+	icon, err := extractFileIcon(path)
+	if err != nil {
+		return "", err
+	}
+	return icon, nil
+}
+
+// ShowQuickMenu 在鼠标当前位置弹出快捷菜单(分组子菜单 + 程序图标),
+// 点击条目即启动。用于句柄/圆点右键与全局热键。
+//
+// 用 Wails 官方 OpenContextMenu(quickContextMenu)实现:以主窗口句柄作宿主、
+// 在光标位置弹出(ShowAtCursor -> GetCursorPos + TrackPopupMenuEx),因此
+// 不受收拢后 32x32 小窗口尺寸限制(修复「收拢态右键不弹菜单」)。
+func (s *QuickService) ShowQuickMenu() (string, error) {
+	// 每次弹出前重建菜单树:快捷配置可能已变更,保证菜单与设置一致
+	if quickContextMenu != nil {
+		quickContextMenu.Menu.Clear()
+		buildQuickMenu(quickContextMenu.Menu)
+		quickContextMenu.Update()
+		if mainWindow != nil {
+			mainWindow.OpenContextMenu(&application.ContextMenuData{Id: "quickmenu"})
+		}
+	}
+	return "ok", nil
+}
+
+// Launch 启动一个快捷条目(分离启动,立即返回)。
+// title 仅用于提示;path 为完整程序路径(可带参数与环境变量)。
+func (s *QuickService) Launch(title, path string) (string, error) {
+	if title == "" {
+		return "", fmt.Errorf("条目名称为空")
+	}
+	if path == "" {
+		return "", fmt.Errorf("程序路径为空")
+	}
+	// 复用「本地」页启动逻辑:处理 .html 自动起服务、.ps1 显式调用、
+	// 环境变量展开、工作目录定位与 ShellExecute 分离启动。
+	// 路径含空格时(如 C:\Program Files\App.exe)先按 Windows 规则引号包住,
+	// 避免 splitCmdLine 在首个空格处截断程序路径导致启动失败。
+	return (&LocalService{}).Launch(title, quoteSpacedProgPath(path))
+}
+
+// quoteSpacedProgPath 若命令行的程序路径含空格且未引号包裹,则用引号包住。
+// 环境变量先展开(%VAR% 可能解析出含空格的路径),再判断:
+//   - 整段是存在的文件 → 纯程序路径,整体加引号;
+//   - 否则取「最长到空格为止且存在的文件」作为程序路径加引号,其余为参数;
+//   - 找不到可确认的路径则原样返回(交给 splitCmdLine 兜底)。
+func quoteSpacedProgPath(cmdLine string) string {
+	s := strings.TrimSpace(expandWinEnv(cmdLine))
+	if s == "" || !strings.ContainsAny(s, " \t") {
+		return s // 无空格,无需处理
+	}
+	if strings.HasPrefix(s, `"`) {
+		return s // 已引号包裹,保持原样
+	}
+	if fileExists(s) {
+		return `"` + s + `"` // 整段是存在的文件(纯程序路径)
+	}
+	// 从后往前找最长「到空格为止且存在的文件」前缀:程序路径 + 参数
+	for i := len(s) - 1; i >= 0; i-- {
+		if s[i] != ' ' && s[i] != '\t' {
+			continue
+		}
+		prefix := strings.TrimSpace(s[:i])
+		if prefix != "" && fileExists(prefix) {
+			return `"` + prefix + `"` + s[i:]
+		}
+	}
+	return s
+}

+ 19 - 0
quickservice_other.go

@@ -0,0 +1,19 @@
+//go:build !windows
+
+// ============================================================================
+// quickservice_other.go — 非 Windows 平台的快捷菜单实现
+//
+// 原生 TrackPopupMenu 仅在 Windows 可用,其余平台弹出 HTML 菜单(前端兜底),
+// 故 showNativeQuickMenu 为空操作(ShowQuickMenu 在前端仍返回 ok)。
+// ============================================================================
+package main
+
+// showNativeQuickMenu 非 Windows 平台:无原生菜单,空操作(前端走 HTML 菜单)。
+func showNativeQuickMenu(groups []QuickGroup, x, y int, owner uintptr) {
+}
+
+// quickIconCachedPNG 非 Windows 平台:无 SHGetFileInfo 图标提取,返回 (nil,false),
+// 托盘菜单项不显示图标(前端「快捷」页仍有 HTML 图标展示)。
+func quickIconCachedPNG(path string) ([]byte, bool) {
+	return nil, false
+}

+ 511 - 0
quickservice_windows.go

@@ -0,0 +1,511 @@
+//go:build windows
+
+// ============================================================================
+// quickservice_windows.go — 「快捷」页程序图标提取(Windows)
+//
+// x/sys/windows 未封装 SHGetFileInfo/GetIconInfo/GetDIBits 等 Win32 图标符号,
+// 故通过 syscall.NewLazyDLL 动态调用 shell32/user32/gdi32 提取 exe 图标为 PNG
+// data URI(含 alpha),供前端 <img> 展示;提取失败返回空串由前端回退。
+// ============================================================================
+package main
+
+import (
+	"bytes"
+	"crypto/sha256"
+	"encoding/base64"
+	"encoding/hex"
+	"image"
+	"image/color"
+	"image/png"
+	"log"
+	"os"
+	"path/filepath"
+	"syscall"
+	"unsafe"
+)
+
+// SHGetFileInfo 标志
+const (
+	shgfiIcon      = 0x000000100 // SHGFI_ICON:返回 hIcon
+	shgfiLargeicon = 0x000000000 // SHGFI_LARGEICON:32x32
+)
+
+const (
+	dibRgbColors = 0 // DIB_RGB_COLORS
+	biRgb        = 0 // BI_RGB
+)
+
+// gdi32 过程变量(DeleteObject/CreateCompatibleDC/DeleteDC/SelectObject 与
+// mousealert_windows.go 共用同名全局,此处不再重复声明,直接复用)。
+var (
+	shell32DLL = syscall.NewLazyDLL("shell32.dll")
+	user32DLL  = syscall.NewLazyDLL("user32.dll")
+
+	procSHGetFileInfoW = shell32DLL.NewProc("SHGetFileInfoW")
+	procDestroyIcon    = user32DLL.NewProc("DestroyIcon")
+	procGetIconInfo    = user32DLL.NewProc("GetIconInfo")
+	procGetObjectW     = gdi32.NewProc("GetObjectW")
+	procGetDIBits      = gdi32.NewProc("GetDIBits")
+	procCreateBitmap   = gdi32.NewProc("CreateBitmap")
+	procSetDIBits      = gdi32.NewProc("SetDIBits")
+)
+
+// 原生弹出菜单(收拢后 Webview 太小,HTML 菜单被裁剪,改用 TrackPopupMenu 显示在屏幕上)
+var (
+	procCreatePopupMenu    = user32DLL.NewProc("CreatePopupMenu")
+	procAppendMenuW        = user32DLL.NewProc("AppendMenuW")
+	procTrackPopupMenu     = user32DLL.NewProc("TrackPopupMenu")
+	procDestroyMenu        = user32DLL.NewProc("DestroyMenu")
+	procSetMenuItemBitmaps = user32DLL.NewProc("SetMenuItemBitmaps")
+	procCopyImage          = user32DLL.NewProc("CopyImage")
+	procGetSystemMetrics   = user32DLL.NewProc("GetSystemMetrics")
+	procSetForegroundWindow = user32DLL.NewProc("SetForegroundWindow")
+)
+
+// AppendMenuW 标志
+const (
+	mfString      = 0x00000000 // MF_STRING
+	mfPopup       = 0x00000010 // MF_POPUP
+	mfBitmap      = 0x00000004 // MF_BITMAP
+	mfSeparator   = 0x00000800 // MF_SEPARATOR
+	tpmRightButto = 0x00000002 // TPM_RIGHTBUTTON
+	tpmReturnCmd  = 0x00000100 // TPM_RETURNCMD:同步返回被选命令 ID
+	smCxsmicon    = 49         // SM_CXSMICON
+	smCysmicon    = 50         // SM_CYSMICON
+	imageBitmap   = 0         // IMAGE_BITMAP
+	lrCopyfromRgba = 0x00001000 // LR_COPYFROMRGBA
+)
+
+// quickMenuItem 原生菜单命令 ID -> 启动条目的映射(命令 ID 从 1 起)
+type quickMenuItem struct {
+	title string
+	path  string
+}
+
+// showNativeQuickMenu 在屏幕坐标 (x,y) 处弹出原生快捷菜单(分组子菜单 + 条目图标)。
+// owner 为宿主窗口句柄(可用 0);非 0 时先前台化该窗口,避免收拢态小窗口失活导致
+// TrackPopupMenu 不显示。TrackPopupMenu 用 TPM_RETURNCMD 同步返回被选条目的命令 ID。
+func showNativeQuickMenu(groups []QuickGroup, x, y int, owner uintptr) {
+	menu, _, _ := procCreatePopupMenu.Call()
+	if menu == 0 {
+		return
+	}
+	defer procDestroyMenu.Call(menu)
+
+	var items []quickMenuItem
+	cmdID := uintptr(1)
+
+	for _, g := range groups {
+		if g.Name != "" {
+			// 命名分组:子菜单
+			sub, _, _ := procCreatePopupMenu.Call()
+			if sub == 0 {
+				continue
+			}
+			for _, it := range g.Items {
+				procAppendMenuW.Call(sub, mfString, cmdID, strPtr(it.Title))
+				attachMenuIcon(sub, cmdID, it.Path)
+				items = append(items, quickMenuItem{title: it.Title, path: it.Path})
+				cmdID++
+			}
+			procAppendMenuW.Call(menu, mfPopup|mfString, sub, strPtr(g.Name))
+		} else {
+			// 未分组条目:直接平铺在顶层
+			for _, it := range g.Items {
+				procAppendMenuW.Call(menu, mfString, cmdID, strPtr(it.Title))
+				attachMenuIcon(menu, cmdID, it.Path)
+				items = append(items, quickMenuItem{title: it.Title, path: it.Path})
+				cmdID++
+			}
+		}
+	}
+
+	if len(items) == 0 {
+		return // 无条目:不弹空菜单
+	}
+
+	// 前台化宿主窗口:收拢态小窗口可能失去激活,TrackPopupMenu 需要前台窗口才可靠显示
+	if owner != 0 {
+		procSetForegroundWindow.Call(owner)
+	}
+
+	// TPM_RETURNCMD:TrackPopupMenu 阻塞直到菜单关闭,返回被选命令 ID(0=未选)
+	selected, _, _ := procTrackPopupMenu.Call(
+		menu,
+		tpmRightButto|tpmReturnCmd,
+		uintptr(int32(x)),
+		uintptr(int32(y)),
+		owner, // 宿主窗口(TPM_RETURNCMD 依赖其消息循环)
+		0,
+		0,
+	)
+	if selected < 1 || int(selected-1) >= len(items) {
+		return
+	}
+	it := items[selected-1]
+	if it.path != "" {
+		if _, err := (&LocalService{}).Launch(it.title, it.path); err != nil {
+			log.Printf("快捷菜单启动失败 [%s]: %v", it.title, err)
+		}
+	}
+}
+
+// strPtr 返回 UTF-16 指针(AppendMenuW 的 lpNewItem 参数;空串返回 nil)
+func strPtr(s string) uintptr {
+	u, err := syscall.UTF16PtrFromString(s)
+	if err != nil || u == nil {
+		return 0
+	}
+	return uintptr(unsafe.Pointer(u))
+}
+
+// attachMenuIcon 提取 exe 图标并挂到菜单项(16x16 位图)。
+// 图标提取失败或非文件时静默跳过(菜单仍显示文字)。
+func attachMenuIcon(menu uintptr, cmdID uintptr, path string) {
+	bgra, w, h, ok := iconBGRA(path)
+	if !ok || w <= 0 || h <= 0 {
+		return
+	}
+	// 缩放到菜单图标尺寸(16x16),并转为带 alpha 的 32bpp 位图
+	cx, _, _ := procGetSystemMetrics.Call(smCxsmicon)
+	cy, _, _ := procGetSystemMetrics.Call(smCysmicon)
+	if cx == 0 || cy == 0 {
+		cx, cy = 16, 16
+	}
+	hbm := bgraToBitmap(bgra, w, h, int(cx), int(cy))
+	if hbm == 0 {
+		return
+	}
+	// 菜单项挂位图;菜单关闭后由 DestroyMenu 释放挂载的位图资源
+	procSetMenuItemBitmaps.Call(menu, cmdID, mfBitmap, hbm, 0)
+}
+
+// bgraToBitmap 把 BGRA 像素缩放为 (dw x dh) 的 32bpp 设备无关位图(顶向下、含 alpha)。
+// 源为全透明 alpha(旧式图标无 alpha 通道)时按不透明处理。返回 HBITMAP,失败为 0。
+func bgraToBitmap(bgra []byte, sw, sh, dw, dh int) uintptr {
+	if sw <= 0 || sh <= 0 || dw <= 0 || dh <= 0 || len(bgra) < sw*sh*4 {
+		return 0
+	}
+	allAlphaZero := true
+	for i := 0; i < sw*sh; i++ {
+		if bgra[i*4+3] != 0 {
+			allAlphaZero = false
+			break
+		}
+	}
+
+	bi := bitmapInfo{}
+	bi.bmiHeader.biSize = uint32(unsafe.Sizeof(bitmapInfoHeader{}))
+	bi.bmiHeader.biWidth = int32(dw)
+	bi.bmiHeader.biHeight = -int32(dh) // 负值:自顶向下
+	bi.bmiHeader.biPlanes = 1
+	bi.bmiHeader.biBitCount = 32
+	bi.bmiHeader.biCompression = biRgb
+
+	hdc, _, _ := procCreateCompatibleDC.Call(0)
+	if hdc == 0 {
+		return 0
+	}
+	defer procDeleteDC.Call(hdc)
+	// CreateDIBSection 不存在于过程表,用 CreateBitmap + SetDIBits 兜底
+	hbm, _, _ := procCreateBitmap.Call(uintptr(dw), uintptr(dh), 1, 32, 0)
+	if hbm == 0 {
+		return 0
+	}
+	procSelectObject.Call(hdc, hbm)
+
+	// 最近邻缩放写入像素缓冲
+	buf := make([]byte, dw*dh*4)
+	for y := 0; y < dh; y++ {
+		sy := y * sh / dh
+		if sy >= sh {
+			sy = sh - 1
+		}
+		for x := 0; x < dw; x++ {
+			sx := x * sw / dw
+			if sx >= sw {
+				sx = sw - 1
+			}
+			si := (sy*sw + sx) * 4
+			di := (y*dw + x) * 4
+			a := bgra[si+3]
+			if allAlphaZero {
+				a = 255
+			}
+			buf[di+0] = bgra[si+0] // B
+			buf[di+1] = bgra[si+1] // G
+			buf[di+2] = bgra[si+2] // R
+			buf[di+3] = a          // A
+		}
+	}
+	procSetDIBits.Call(hdc, hbm, 0, uintptr(dh),
+		uintptr(unsafe.Pointer(&buf[0])), uintptr(unsafe.Pointer(&bi)), dibRgbColors)
+	return hbm
+}
+
+// SHFILEINFOW:SHGetFileInfoW 输出结构(hIcon 为首字段)
+type shfileinfow struct {
+	hIcon         uintptr
+	iIcon         int32
+	dwAttributes  uint32
+	szDisplayName [260]uint16
+	szTypeName    [80]uint16
+}
+
+// ICONINFO:GetIconInfo 输出结构
+type iconinfo struct {
+	fIcon    int32
+	xHotspot int32
+	yHotspot int32
+	hbmMask  uintptr // HBITMAP 掩码
+	hbmColor uintptr // HBITMAP 颜色
+}
+
+// BITMAP:GetObjectW 对位图返回的结构
+type bitmap struct {
+	bmType       int32
+	bmWidth      int32
+	bmHeight     int32
+	bmWidthBytes int32
+	bmPlanes     uint16
+	bmBitsPixel  uint16
+	bmBits       uintptr
+}
+
+// BITMAPINFOHEADER:位图信息头
+type bitmapInfoHeader struct {
+	biSize          uint32
+	biWidth         int32
+	biHeight        int32
+	biPlanes        uint16
+	biBitCount      uint16
+	biCompression   uint32
+	biSizeImage     uint32
+	biXPelsPerMeter int32
+	biYPelsPerMeter int32
+	biClrUsed       uint32
+	biClrImportant  uint32
+}
+
+// BITMAPINFO:位图信息(32bpp 无调色板,bmiColors 足够大即可)
+type bitmapInfo struct {
+	bmiHeader bitmapInfoHeader
+	bmiColors [4]uint32
+}
+
+// extractFileIcon 提取文件关联图标为 PNG data URI。
+// 路径不存在、非文件或无图标时返回空串(不报错,前端回退通用图标)。
+func extractFileIcon(path string) (string, error) {
+	bgra, w, h, ok := iconBGRA(path)
+	if !ok {
+		return "", nil
+	}
+	return encodeIconPNG(bgra, w, h), nil
+}
+
+// iconBGRA 提取文件关联图标像素(强制 32bpp 自顶向下 BGRA)。
+// 返回 (bgra, 宽, 高, ok);失败或路径无效时 ok=false。
+// 与 attachMenuIcon 共用,保证原生菜单与 HTML 图标一致(都能处理无 alpha 旧图标)。
+func iconBGRA(path string) ([]byte, int, int, bool) {
+	if path == "" {
+		return nil, 0, 0, false
+	}
+	u16, err := syscall.UTF16PtrFromString(path)
+	if err != nil {
+		return nil, 0, 0, false
+	}
+
+	var sfi shfileinfow
+	ret, _, _ := procSHGetFileInfoW.Call(
+		uintptr(unsafe.Pointer(u16)),
+		0,
+		uintptr(unsafe.Pointer(&sfi)),
+		uintptr(unsafe.Sizeof(sfi)),
+		uintptr(shgfiIcon|shgfiLargeicon),
+	)
+	if ret == 0 || sfi.hIcon == 0 {
+		return nil, 0, 0, false // 无图标(如目录占位),交给前端回退
+	}
+	defer procDestroyIcon.Call(sfi.hIcon) // 用完即销毁 HICON
+
+	// 从 HICON 取位图句柄
+	var ii iconinfo
+	if r, _, _ := procGetIconInfo.Call(sfi.hIcon, uintptr(unsafe.Pointer(&ii))); r == 0 {
+		return nil, 0, 0, false
+	}
+	defer procDeleteObject.Call(ii.hbmMask)
+	defer procDeleteObject.Call(ii.hbmColor)
+
+	hbm := ii.hbmColor
+	if hbm == 0 {
+		hbm = ii.hbmMask // 无颜色位图(单色图标)时用掩码
+	}
+	if hbm == 0 {
+		return nil, 0, 0, false
+	}
+
+	// 查询位图尺寸与位深
+	var bmp bitmap
+	if r, _, _ := procGetObjectW.Call(hbm, uintptr(unsafe.Sizeof(bmp)), uintptr(unsafe.Pointer(&bmp))); r == 0 {
+		return nil, 0, 0, false
+	}
+	w, h := int(bmp.bmWidth), int(bmp.bmHeight)
+	if w <= 0 || h <= 0 {
+		return nil, 0, 0, false
+	}
+
+	// 32bpp 顶下行(负高度),逐像素 BGRA
+	bi := bitmapInfo{}
+	bi.bmiHeader.biSize = uint32(unsafe.Sizeof(bitmapInfoHeader{}))
+	bi.bmiHeader.biWidth = int32(w)
+	bi.bmiHeader.biHeight = -int32(h) // 负值:自顶向下
+	bi.bmiHeader.biPlanes = 1
+	bi.bmiHeader.biBitCount = 32
+	bi.bmiHeader.biCompression = biRgb
+
+	hdc, _, _ := procCreateCompatibleDC.Call(0)
+	if hdc == 0 {
+		return nil, 0, 0, false
+	}
+	defer procDeleteDC.Call(hdc)
+	procSelectObject.Call(hdc, hbm) // 选择到位图,GetDIBits 需要兼容 DC
+
+	// 分配像素缓冲(每像素 4 字节)
+	buf := make([]byte, w*h*4)
+	if r, _, _ := procGetDIBits.Call(hdc, hbm, 0, uintptr(h),
+		uintptr(unsafe.Pointer(&buf[0])), uintptr(unsafe.Pointer(&bi)), dibRgbColors); r == 0 {
+		return nil, 0, 0, false
+	}
+
+	return buf, w, h, true
+}
+
+// encodeIconPNG 把 BGRA 像素编码为 PNG data URI。
+// 全透明 alpha(旧式 32bpp 图标无 alpha 通道)时按不透明处理,避免图标隐形。
+func encodeIconPNG(bgra []byte, w, h int) string {
+	img := image.NewNRGBA(image.Rect(0, 0, w, h))
+	allAlphaZero := true
+	for i := 0; i < w*h; i++ {
+		if bgra[i*4+3] != 0 {
+			allAlphaZero = false
+			break
+		}
+	}
+	for y := 0; y < h; y++ {
+		for x := 0; x < w; x++ {
+			i := (y*w + x) * 4
+			a := bgra[i+3]
+			if allAlphaZero {
+				a = 255 // 无 alpha 信息:视为不透明
+			}
+			img.SetNRGBA(x, y, color.NRGBA{
+				R: bgra[i+2], G: bgra[i+1], B: bgra[i+0], A: a,
+			})
+		}
+	}
+
+	var buf bytes.Buffer
+	if err := png.Encode(&buf, img); err != nil {
+		return ""
+	}
+	return "data:image/png;base64," + base64.StdEncoding.EncodeToString(buf.Bytes())
+}
+
+// ============================================================================
+// 快捷项图标缓存:供系统托盘「快捷」菜单项显示程序图标。
+//
+// 建立快捷(设置保存 / 托盘菜单构建)时,把各程序路径的关联图标提取为
+// 16x16 PNG 字节,缓存到 <用户配置目录>/TengTuToolbox/quickicons/ 子目录,
+// 之后直接读取缓存给托盘菜单项 SetBitmap 使用,避免每次启动重复走
+// SHGetFileInfo/GetDIBits。缓存文件名为路径 SHA-256 前 32 位 + .png,
+// 不依赖路径中的非法文件名字符,路径变化(文件移动)自动重新生成。
+// ============================================================================
+
+// iconCacheDir 返回图标缓存子目录:<配置目录>/quickicons
+func iconCacheDir() (string, error) {
+	dir, err := os.UserConfigDir()
+	if err != nil {
+		return "", err
+	}
+	return filepath.Join(dir, "TengTuToolbox", "quickicons"), nil
+}
+
+// quickIconCachePath 计算程序路径对应的缓存 PNG 文件路径。
+// 返回 (路径, 是否可用);路径为空表示无法定位缓存目录。
+func quickIconCachePath(path string) (string, bool) {
+	if path == "" {
+		return "", false
+	}
+	dir, err := iconCacheDir()
+	if err != nil {
+		return "", false
+	}
+	sum := sha256.Sum256([]byte(path))
+	name := hex.EncodeToString(sum[:16]) + ".png" // 前 16 字节(32 位十六进制)足够区分
+	return filepath.Join(dir, name), true
+}
+
+// quickIconCachedPNG 返回程序路径的 16x16 PNG 字节(供托盘菜单项 SetBitmap)。
+// 优先读磁盘缓存;缓存缺失/损坏时重新提取并写回缓存。提取失败返回 (nil,false)。
+func quickIconCachedPNG(path string) ([]byte, bool) {
+	cachePath, ok := quickIconCachePath(path)
+	if !ok {
+		return fileIconPNG16(path) // 无法定位缓存目录:直接提取,不缓存
+	}
+	if data, err := os.ReadFile(cachePath); err == nil && len(data) > 0 {
+		// 校验是合法 PNG,损坏则回退重新提取
+		if _, err := png.Decode(bytes.NewReader(data)); err == nil {
+			return data, true
+		}
+	}
+	pngBytes, ok := fileIconPNG16(path)
+	if !ok {
+		return nil, false
+	}
+	// 写回缓存(目录不存在时自动创建;失败不影响本次使用)
+	if err := os.MkdirAll(filepath.Dir(cachePath), 0o755); err == nil {
+		_ = os.WriteFile(cachePath, pngBytes, 0o644)
+	}
+	return pngBytes, true
+}
+
+// fileIconPNG16 提取程序关联图标为 16x16 PNG 原始字节(顶向下、含 alpha)。
+// 复用 iconBGRA 提取原尺寸(32x32),最近邻缩放到 16x16 后编码 PNG。
+func fileIconPNG16(path string) ([]byte, bool) {
+	bgra, w, h, ok := iconBGRA(path)
+	if !ok || w <= 0 || h <= 0 {
+		return nil, false
+	}
+	const size = 16
+	img := image.NewNRGBA(image.Rect(0, 0, size, size))
+	allAlphaZero := true
+	for i := 0; i < w*h; i++ {
+		if bgra[i*4+3] != 0 {
+			allAlphaZero = false
+			break
+		}
+	}
+	for y := 0; y < size; y++ {
+		sy := y * h / size
+		if sy >= h {
+			sy = h - 1
+		}
+		for x := 0; x < size; x++ {
+			sx := x * w / size
+			if sx >= w {
+				sx = w - 1
+			}
+			si := (sy*w + sx) * 4
+			a := bgra[si+3]
+			if allAlphaZero {
+				a = 255
+			}
+			img.SetNRGBA(x, y, color.NRGBA{R: bgra[si+2], G: bgra[si+1], B: bgra[si+0], A: a})
+		}
+	}
+	var buf bytes.Buffer
+	if err := png.Encode(&buf, img); err != nil {
+		return nil, false
+	}
+	return buf.Bytes(), true
+}

+ 139 - 64
settings.go

@@ -21,6 +21,8 @@ import (
 // 默认配置:首次运行或字段为空时使用
 const (
 	DefaultHotkey                 = "CmdOrCtrl+Shift+G" // 默认呼出窗口热键
+	DefaultQuickHotkey            = "Ctrl+Shift+H"      // 默认「快捷」菜单全局热键(在鼠标位置弹出)
+	DefaultProxyHotkey            = "Ctrl+Shift+J"      // 默认「网络代理」开关全局热键(留空则不设热键)
 	DefaultWindowWidth            = 1000                // 主窗口默认宽度
 	DefaultWindowHeight           = 618                 // 主窗口默认高度
 	DefaultAPIAddr                = "127.0.0.1:17890"   // 内置 Gin API 服务默认监听地址(仅本机)
@@ -33,7 +35,7 @@ const (
 	DefaultNewsRefreshMinutes     = 120                 // 新闻自动刷新间隔(分钟)
 	DefaultNewsCount              = 30                  // 新闻页显示条数
 	DefaultGithubRefreshMinutes   = 120                 // Github 自动刷新间隔(分钟)
-	AppVersion                    = "0.1.6"             // 应用自身版本(与 build/windows/info.json 的 ProductVersion 一致),用于仓库更新提示
+	AppVersion                    = "0.1.7"             // 应用自身版本(与 build/windows/info.json 的 ProductVersion 一致),用于仓库更新提示
 
 	// 鼠标提醒默认配置
 	DefaultMouseAlertFontSize     = 20        // 字号(px)
@@ -110,41 +112,60 @@ type ProxyConfig struct {
 	Server string `json:"server"` // 代理服务器地址,如 127.0.0.1:7890
 }
 
+// QuickItem 快捷启动项(「快捷」页,设置中以缩进分层编辑)。
+// 与 Biniware Run 类似:每项为「名称|程序路径|说明」,说明可省略。
+type QuickItem struct {
+	Title string `json:"title"` // 显示名称
+	Path  string `json:"path"`  // 程序路径(可执行文件,可带参数与 %VAR% 环境变量)
+	Desc  string `json:"desc"`  // 说明文字(可空)
+}
+
+// QuickGroup 快捷启动分组(「快捷」页)。
+// 设置文本中顶层无缩进行为分组名,其下缩进的「名称|路径|说明」条目归入该组;
+// 未缩进但在某分组之前直接出现的条目归入「未分组」。
+type QuickGroup struct {
+	Name  string      `json:"name"`  // 分组名(顶层无缩进行;空表示未分组)
+	Items []QuickItem `json:"items"` // 分组内快捷项(缩进条目)
+}
+
 // AppSettings 保存全部可自定义配置,序列化为 JSON 存于用户配置目录
 type AppSettings struct {
-	Theme          string           `json:"theme"`          // 界面主题:dark / light
-	Autostart      bool             `json:"autostart"`      // 系统启动时运行
-	AlwaysOnTop    bool             `json:"alwaysOnTop"`    // 窗口置顶
-	StartCompact   bool             `json:"startCompact"`   // 启动时自动收拢为圆点(窗口缩小)
-	WindowWidth    int              `json:"windowWidth"`    // 主窗口宽度(px),随窗口调整自动保存
-	WindowHeight   int              `json:"windowHeight"`   // 主窗口高度(px),随窗口调整自动保存
-	Hotkey         string           `json:"hotkey"`         // 呼出(显示)窗口的全局热键
-	TabOrder       []string         `json:"tabOrder"`       // Tab 显示顺序(tabId 列表,未列出的追加到末尾)
-	StockCodes     []string         `json:"stockCodes"`     // 股市页展示的股票代码列表
-	Links          []LinkItem       `json:"links"`          // 常用网址列表
-	NewsKeywords   string           `json:"newsKeywords"`   // 新闻关注关键词,逗号分隔
-	BiliCookie     string           `json:"biliCookie"`     // B站登录 cookie(含 SESSDATA),用于抓取「关注的人最新动态」
-	GithubRepos    []RepoItem       `json:"githubRepos"`    // 关注的 GitHub 仓库列表
-	CustomTabs     []CustomTab      `json:"customTabs"`     // 用户自定义 Tab 页面(名字 + 网址)
-	LocalTools     []LocalTool      `json:"localTools"`     // 「本地」页资源(标题|启动命令|说明,在设置中维护)
-	ControlKeys    []ControlKeyConfig `json:"controlKeys"`  // 控制页按键配置(前 5 键固定 上/下/左/右/休眠,第 6 键起为额外按键)
-	ControlRepeatSecs float64         `json:"controlRepeatSecs"` // 控制页长按连发频率(秒,0.0-10.0,默认 1.0)
-	APIAddr        string           `json:"apiAddr"`        // 内置 API 服务监听地址
-	ServiceAddr    string           `json:"serviceAddr"`    // Windows 服务模式(--service)监听地址,仅电源类接口
-	APIAutoStart   bool             `json:"apiAutoStart"`   // 应用启动时自动启动内置 API 服务(默认开启)
-	UploadPassword string           `json:"uploadPassword"` // 文件上传密码(空=不启用上传/下载接口)
-	UploadDir      string           `json:"uploadDir"`      // 文件上传保存目录(空=用户配置目录/uploads)
-	UploadMaxSize  int              `json:"uploadMaxSize"`  // 单个上传文件大小上限(MB),<=0 用默认 512
-	TodoPath       string           `json:"todoPath"`       // 待办(TODO)文件路径
-	RecordPath     string           `json:"recordPath"`     // 记录(Record)文件路径:每行「姓名|名称|值」(保留兼容)
-	RecordDBPath   string           `json:"recordDBPath"`   // 记录数据库路径:SQLite3 数据库文件(记录 Tab 实际存储)
-	BackupDir      string           `json:"backupDir"`      // 文本文件备份目录(文件类自定义 Tab「备份」按钮使用)
-	StockTicker    TickerConfig     `json:"stockTicker"`    // 股票滚动条配置
-	NewsTicker     TickerConfig     `json:"newsTicker"`     // 新闻滚动条配置
-	Poem           PoemConfig       `json:"poem"`           // 随机古诗显示配置
-	MouseAlert     MouseAlertConfig `json:"mouseAlert"`     // 系统级鼠标提醒气泡配置
-	BrowserPath    string           `json:"browserPath"`    // 指定浏览器 exe 路径(空=系统默认浏览器)
-	LEDColor       string           `json:"ledColor"`       // LED 滚动文字点阵颜色(如 #ff4d4d)
+	Theme             string             `json:"theme"`             // 界面主题:dark / light
+	Autostart         bool               `json:"autostart"`         // 系统启动时运行
+	AlwaysOnTop       bool               `json:"alwaysOnTop"`       // 窗口置顶
+	StartCompact      bool               `json:"startCompact"`      // 启动时自动收拢为圆点(窗口缩小)
+	WindowWidth       int                `json:"windowWidth"`       // 主窗口宽度(px),随窗口调整自动保存
+	WindowHeight      int                `json:"windowHeight"`      // 主窗口高度(px),随窗口调整自动保存
+	Hotkey            string             `json:"hotkey"`            // 呼出(显示)窗口的全局热键
+	QuickHotkey       string             `json:"quickHotkey"`       // 在鼠标位置弹出「快捷」菜单的全局热键
+	ProxyHotkey       string             `json:"proxyHotkey"`       // 开关「网络代理」的全局热键(空=不设热键)
+	TabOrder          []string           `json:"tabOrder"`          // Tab 显示顺序(tabId 列表,未列出的追加到末尾)
+	StockCodes        []string           `json:"stockCodes"`        // 股市页展示的股票代码列表
+	Links             []LinkItem         `json:"links"`             // 常用网址列表
+	NewsKeywords      string             `json:"newsKeywords"`      // 新闻关注关键词,逗号分隔
+	BiliCookie        string             `json:"biliCookie"`        // B站登录 cookie(含 SESSDATA),用于抓取「关注的人最新动态」
+	GithubRepos       []RepoItem         `json:"githubRepos"`       // 关注的 GitHub 仓库列表
+	CustomTabs        []CustomTab        `json:"customTabs"`        // 用户自定义 Tab 页面(名字 + 网址)
+	LocalTools        []LocalTool        `json:"localTools"`        // 「本地」页资源(标题|启动命令|说明,在设置中维护)
+	QuickGroups       []QuickGroup       `json:"quickGroups"`       // 「快捷」页分组(缩进分层,名称|路径|说明 条目)
+	ControlKeys       []ControlKeyConfig `json:"controlKeys"`       // 控制页按键配置(前 5 键固定 上/下/左/右/休眠,第 6 键起为额外按键)
+	ControlRepeatSecs float64            `json:"controlRepeatSecs"` // 控制页长按连发频率(秒,0.0-10.0,默认 1.0)
+	APIAddr           string             `json:"apiAddr"`           // 内置 API 服务监听地址
+	ServiceAddr       string             `json:"serviceAddr"`       // Windows 服务模式(--service)监听地址,仅电源类接口
+	APIAutoStart      bool               `json:"apiAutoStart"`      // 应用启动时自动启动内置 API 服务(默认开启)
+	UploadPassword    string             `json:"uploadPassword"`    // 文件上传密码(空=不启用上传/下载接口)
+	UploadDir         string             `json:"uploadDir"`         // 文件上传保存目录(空=用户配置目录/uploads)
+	UploadMaxSize     int                `json:"uploadMaxSize"`     // 单个上传文件大小上限(MB),<=0 用默认 512
+	TodoPath          string             `json:"todoPath"`          // 待办(TODO)文件路径
+	RecordPath        string             `json:"recordPath"`        // 记录(Record)文件路径:每行「姓名|名称|值」(保留兼容)
+	RecordDBPath      string             `json:"recordDBPath"`      // 记录数据库路径:SQLite3 数据库文件(记录 Tab 实际存储)
+	BackupDir         string             `json:"backupDir"`         // 文本文件备份目录(文件类自定义 Tab「备份」按钮使用)
+	StockTicker       TickerConfig       `json:"stockTicker"`       // 股票滚动条配置
+	NewsTicker        TickerConfig       `json:"newsTicker"`        // 新闻滚动条配置
+	Poem              PoemConfig         `json:"poem"`              // 随机古诗显示配置
+	MouseAlert        MouseAlertConfig   `json:"mouseAlert"`        // 系统级鼠标提醒气泡配置
+	BrowserPath       string             `json:"browserPath"`       // 指定浏览器 exe 路径(空=系统默认浏览器)
+	LEDColor          string             `json:"ledColor"`          // LED 滚动文字点阵颜色(如 #ff4d4d)
 
 	StockUpColor           string `json:"stockUpColor"`           // 股票上涨颜色
 	StockDownColor         string `json:"stockDownColor"`         // 股票下跌颜色
@@ -155,21 +176,23 @@ type AppSettings struct {
 	GithubRefreshMinutes   int    `json:"githubRefreshMinutes"`   // Github 自动刷新间隔(分钟)
 	FontDelta              int    `json:"fontDelta"`              // 全局字号偏移(px),+-3 范围内调整
 
-	LocalSend  LocalSendConfig  `json:"localSend"`  // LocalSend 文件互传配置(本机名/接收目录/接收模式等)
-	Croc       CrocConfig       `json:"croc"`       // Croc 传送配置(发送/接收共用密码)
-	YTDLP      YTDLPConfig      `json:"ytdlp"`      // 视频下载配置(yt-dlp 保存目录)
-	Memos      MemosConfig      `json:"memos"`      // Memos 速记配置(地址/访问令牌)
-	Brightness BrightnessConfig `json:"brightness"` // 显示器亮度配置(记住亮度、启动恢复)
-	ToolOrder  []string         `json:"toolOrder"`  // 工具页卡片显示顺序(工具 id 列表,未列出的追加到末尾)
-	GitLab     GitLabConfig     `json:"gitLab"`     // 私有 GitLab 自动升级配置
-	SkippedUpdateVersion string `json:"skippedUpdateVersion"` // 已跳过的版本(启动检查时视为无更新)
-	Proxy      ProxyConfig     `json:"proxy"`       // 网络代理配置(工具页「网络代理」卡片)
+	LocalSend            LocalSendConfig  `json:"localSend"`            // LocalSend 文件互传配置(本机名/接收目录/接收模式等)
+	Croc                 CrocConfig       `json:"croc"`                 // Croc 传送配置(发送/接收共用密码)
+	YTDLP                YTDLPConfig      `json:"ytdlp"`                // 视频下载配置(yt-dlp 保存目录)
+	Memos                MemosConfig      `json:"memos"`                // Memos 速记配置(地址/访问令牌)
+	Brightness           BrightnessConfig `json:"brightness"`           // 显示器亮度配置(记住亮度、启动恢复)
+	ToolOrder            []string         `json:"toolOrder"`            // 工具页卡片显示顺序(工具 id 列表,未列出的追加到末尾)
+	GitLab               GitLabConfig     `json:"gitLab"`               // 私有 GitLab 自动升级配置
+	SkippedUpdateVersion string           `json:"skippedUpdateVersion"` // 已跳过的版本(启动检查时视为无更新)
+	Proxy                ProxyConfig      `json:"proxy"`                // 网络代理配置(工具页「网络代理」卡片)
 }
 
 // 当前已注册的热键(用于保存设置时先注销旧热键)
 var (
-	hotkeyMu     sync.Mutex
-	activeHotkey string
+	hotkeyMu          sync.Mutex
+	activeHotkey      string
+	activeQuickHotkey string
+	activeProxyHotkey string
 )
 
 // defaultSettings 返回默认配置:开机启动默认开启,热键与页面地址使用内置值
@@ -181,8 +204,10 @@ func defaultSettings() AppSettings {
 		WindowWidth:  DefaultWindowWidth,
 		WindowHeight: DefaultWindowHeight,
 		Hotkey:       DefaultHotkey,
+		QuickHotkey:  DefaultQuickHotkey,
+		ProxyHotkey:  DefaultProxyHotkey,
 		TabOrder:     []string{"links", "news", "github", "stock", "todo", "record", "tools", "locals", "control", "host", "settings"}, // 默认 Tab 顺序(「控制」为遥控小车页)
-		ToolOrder:    DefaultToolOrder(),                                                                                    // 工具页卡片默认显示顺序
+		ToolOrder:    DefaultToolOrder(),                                                                                               // 工具页卡片默认显示顺序
 		StockCodes:   []string{"sh000001", "sh600519", "sz000001"},
 		Links: []LinkItem{
 			{Name: "煎蛋", URL: "https://jandan.net/"},
@@ -193,24 +218,24 @@ func defaultSettings() AppSettings {
 		GithubRepos: []RepoItem{
 			{URL: "https://github.com/wailsapp/wails", Desc: "Wails:Go + Web 桌面应用框架"},
 		},
-		APIAddr:        DefaultAPIAddr,
-		ServiceAddr:    DefaultServiceAddr,
-		APIAutoStart:   true, // 内置 API 服务随应用启动(默认开启)
-		UploadPassword: "",   // 上传密码:默认空(不启用上传/下载)
-		UploadDir:      "",   // 上传保存目录:默认空(回退到用户配置目录/uploads)
-		UploadMaxSize:  512,  // 上传大小上限:默认 512MB
-		ControlKeys:    DefaultControlKeys(), // 控制页 5 键默认配置(图标↑↓←→休眠,命令空回退指令信箱)
-		ControlRepeatSecs: 1.0,               // 长按连发频率默认 1 秒
-		TodoPath:       "",   // 待办路径:无默认值,用户须在设置中配置(空值时强制进入设置)
-		RecordPath:     "",   // 记录路径:无默认值,用户须在设置中配置(空值时强制进入设置)
-		RecordDBPath:   "",   // 记录数据库路径:无默认值,用户须在设置中配置(空值时强制进入设置)
-		BackupDir:      "",   // 备份目录:无默认值,用户须在设置中配置(空值时强制进入设置)
-		StockTicker:    TickerConfig{Enabled: false, Width: 1400, FontSize: 14, Color: "#ff4d4d", Speed: 80, Transparent: true, X: -1, Y: -1},
-		NewsTicker:     TickerConfig{Enabled: false, Width: 1400, FontSize: 14, Color: "#3ddc84", Speed: 60, Transparent: true, X: -1, Y: -1},
-		Poem:           PoemConfig{Enabled: false, Color: DefaultPoemColor, FontSize: DefaultPoemFontSize, TTS: false, Interval: DefaultPoemInterval, Speed: DefaultPoemSpeed},
-		MouseAlert:     MouseAlertConfig{FontSize: DefaultMouseAlertFontSize, Width: DefaultMouseAlertWidth, Speed: DefaultMouseAlertSpeed, Color: DefaultMouseAlertColor, Duration: DefaultMouseAlertDuration, OutlineColor: DefaultMouseAlertOutlineColor, OutlineWidth: DefaultMouseAlertOutlineWidth},
-		BrowserPath:    "",        // 指定浏览器路径:默认空(使用系统默认浏览器)
-		LEDColor:       "#ff4d4d", // LED 滚动文字点阵颜色:默认红色
+		APIAddr:           DefaultAPIAddr,
+		ServiceAddr:       DefaultServiceAddr,
+		APIAutoStart:      true,                 // 内置 API 服务随应用启动(默认开启)
+		UploadPassword:    "",                   // 上传密码:默认空(不启用上传/下载)
+		UploadDir:         "",                   // 上传保存目录:默认空(回退到用户配置目录/uploads)
+		UploadMaxSize:     512,                  // 上传大小上限:默认 512MB
+		ControlKeys:       DefaultControlKeys(), // 控制页 5 键默认配置(图标↑↓←→休眠,命令空回退指令信箱)
+		ControlRepeatSecs: 1.0,                  // 长按连发频率默认 1 秒
+		TodoPath:          "",                   // 待办路径:无默认值,用户须在设置中配置(空值时强制进入设置)
+		RecordPath:        "",                   // 记录路径:无默认值,用户须在设置中配置(空值时强制进入设置)
+		RecordDBPath:      "",                   // 记录数据库路径:无默认值,用户须在设置中配置(空值时强制进入设置)
+		BackupDir:         "",                   // 备份目录:无默认值,用户须在设置中配置(空值时强制进入设置)
+		StockTicker:       TickerConfig{Enabled: false, Width: 1400, FontSize: 14, Color: "#ff4d4d", Speed: 80, Transparent: true, X: -1, Y: -1},
+		NewsTicker:        TickerConfig{Enabled: false, Width: 1400, FontSize: 14, Color: "#3ddc84", Speed: 60, Transparent: true, X: -1, Y: -1},
+		Poem:              PoemConfig{Enabled: false, Color: DefaultPoemColor, FontSize: DefaultPoemFontSize, TTS: false, Interval: DefaultPoemInterval, Speed: DefaultPoemSpeed},
+		MouseAlert:        MouseAlertConfig{FontSize: DefaultMouseAlertFontSize, Width: DefaultMouseAlertWidth, Speed: DefaultMouseAlertSpeed, Color: DefaultMouseAlertColor, Duration: DefaultMouseAlertDuration, OutlineColor: DefaultMouseAlertOutlineColor, OutlineWidth: DefaultMouseAlertOutlineWidth},
+		BrowserPath:       "",        // 指定浏览器路径:默认空(使用系统默认浏览器)
+		LEDColor:          "#ff4d4d", // LED 滚动文字点阵颜色:默认红色
 
 		StockUpColor:           DefaultStockUpColor,
 		StockDownColor:         DefaultStockDownColor,
@@ -351,6 +376,9 @@ func normalizeSettings(settings AppSettings) AppSettings {
 	if strings.TrimSpace(settings.Hotkey) == "" {
 		settings.Hotkey = DefaultHotkey
 	}
+	if strings.TrimSpace(settings.QuickHotkey) == "" {
+		settings.QuickHotkey = DefaultQuickHotkey
+	}
 	if settings.WindowWidth <= 0 {
 		settings.WindowWidth = DefaultWindowWidth // 旧配置没有该字段时使用默认尺寸
 	}
@@ -381,6 +409,28 @@ func normalizeSettings(settings AppSettings) AppSettings {
 	}
 	settings.LocalTools = tools
 
+	// 清洗「快捷」页分组:组名与条目标题/路径非空才保留(说明可空),
+	// 保证结构稳定(不产生空组、空条目),供前端按组渲染
+	groups := make([]QuickGroup, 0, len(settings.QuickGroups))
+	for _, g := range settings.QuickGroups {
+		g.Name = strings.TrimSpace(g.Name)
+		items := make([]QuickItem, 0, len(g.Items))
+		for _, it := range g.Items {
+			it.Title = strings.TrimSpace(it.Title)
+			it.Path = strings.TrimSpace(it.Path)
+			it.Desc = strings.TrimSpace(it.Desc)
+			if it.Title != "" && it.Path != "" {
+				items = append(items, it)
+			}
+		}
+		if len(items) == 0 {
+			continue // 无有效条目则丢弃该组(含未分组空壳)
+		}
+		g.Items = items
+		groups = append(groups, g)
+	}
+	settings.QuickGroups = groups
+
 	// 清洗控制页按键:恒为 5 个(上/下/左/右/休眠),图标空回填默认,命令仅 trim(允许空=回退指令信箱)
 	settings.ControlKeys = normalizeControlKeys(settings.ControlKeys)
 
@@ -719,6 +769,31 @@ func applySettings(settings AppSettings) {
 			activeHotkey = settings.Hotkey // 记录当前生效的热键
 		}
 	}
+	// 「快捷」菜单热键:独立注册,触发时在鼠标位置弹出快捷启动菜单
+	if settings.QuickHotkey != activeQuickHotkey {
+		if activeQuickHotkey != "" {
+			_ = app.GlobalShortcut.Unregister(activeQuickHotkey)
+		}
+		if err := app.GlobalShortcut.Register(settings.QuickHotkey, showQuickMenuAtCursor); err != nil {
+			log.Printf("register quick hotkey %q failed: %v", settings.QuickHotkey, err)
+		} else {
+			activeQuickHotkey = settings.QuickHotkey
+		}
+	}
+	// 「网络代理」开关热键:留空则不设热键(注销旧热键并跳过注册)
+	if settings.ProxyHotkey != activeProxyHotkey {
+		if activeProxyHotkey != "" {
+			_ = app.GlobalShortcut.Unregister(activeProxyHotkey)
+		}
+		if strings.TrimSpace(settings.ProxyHotkey) == "" {
+			activeProxyHotkey = "" // 用户清空热键:不注册,仅记录空值
+		} else if err := app.GlobalShortcut.Register(settings.ProxyHotkey, toggleProxyByHotkey); err != nil {
+			log.Printf("register proxy hotkey %q failed: %v", settings.ProxyHotkey, err)
+			activeProxyHotkey = "" // 注册失败:视为未设,避免下次比较时误判
+		} else {
+			activeProxyHotkey = settings.ProxyHotkey
+		}
+	}
 	hotkeyMu.Unlock()
 
 	if mainWindow != nil {

+ 5 - 0
windowcompact.go

@@ -46,6 +46,8 @@ func (s *SettingsService) ToggleWindowCompact() bool {
 		// 调用 SetSize 可能同步触发 resize 事件,必须在锁外执行,避免事件回调死锁。
 		// 收拢期间禁止拖拽边缘改变窗口大小(Wails 的 JS 与 Win32 命中测试都受此开关控制)
 		mainWindow.SetResizable(false)
+		// 收拢为圆点后强制置顶:圆点始终浮在其他窗口之上,便于随时发现/呼出
+		mainWindow.SetAlwaysOnTop(true)
 		compactEnterCompact(mainWindow, compactWinWidth, compactWinHeight)
 		return true
 	}
@@ -56,6 +58,9 @@ func (s *SettingsService) ToggleWindowCompact() bool {
 	compactMu.Unlock()
 	compactExitCompact(mainWindow, width, height)
 	mainWindow.SetResizable(true) // 还原后恢复可调整大小
+	// 置顶恢复为「设置中的置顶开关」:用户设置保持置顶则继续置顶,否则取消置顶。
+	// (收拢时临时强制置顶,还原后回到用户偏好,避免圆点置顶残留)
+	mainWindow.SetAlwaysOnTop(loadSettings().AlwaysOnTop)
 	return false
 }
 

+ 10 - 0
windowcompact_other.go

@@ -21,3 +21,13 @@ func compactExitCompact(win *application.WebviewWindow, width, height int) {
 	win.SetSize(width, height)
 	win.SetMinSize(0, 0)
 }
+
+// cursorScreenPos 非 Windows 平台无全局鼠标坐标:返回 0,0(调用方忽略)
+func cursorScreenPos() (x, y int) {
+	return 0, 0
+}
+
+// mainWindowHwnd 非 Windows 平台无原生窗口句柄概念:返回 0(调用方忽略)
+func mainWindowHwnd() uintptr {
+	return 0
+}

+ 16 - 0
windowcompact_windows.go

@@ -50,6 +50,11 @@ func compactWindowHwnd(win *application.WebviewWindow) uintptr {
 	return uintptr(unsafe.Pointer(win.NativeWindow()))
 }
 
+// mainWindowHwnd 返回主窗口的原生 HWND(供原生菜单 owner 使用;无主窗口时返回 0)。
+func mainWindowHwnd() uintptr {
+	return compactWindowHwnd(mainWindow)
+}
+
 // compactEnterCompact 进入收拢状态:剥离 DWM 强制最小宽度的样式位后缩小窗口。
 func compactEnterCompact(win *application.WebviewWindow, width, height int) {
 	if win.IsMaximised() {
@@ -83,3 +88,14 @@ func compactExitCompact(win *application.WebviewWindow, width, height int) {
 	win.SetSize(width, height)
 	win.SetMinSize(0, 0)
 }
+
+// cursorScreenPos 返回当前鼠标指针的屏幕坐标(物理像素,多显示器负坐标有效)。
+// 供「快捷」菜单全局热键定位使用:热键触发时在鼠标处弹出菜单。
+func cursorScreenPos() (x, y int) {
+	var pt point
+	ret, _, _ := procGetCursorPos.Call(uintptr(unsafe.Pointer(&pt)))
+	if ret == 0 {
+		return 0, 0
+	}
+	return int(pt.X), int(pt.Y)
+}