第 9 章 設定檔說明
第 9 章 設定檔說明
wxeditor 的全部使用者資料集中在一個目錄,與 wxterm 完全分離:
| 平台 | 設定目錄 |
|---|---|
| Linux / FreeBSD | ~/.wxeditor/ |
| macOS | ~/Library/Application Support/wxeditor/ |
| Windows | %APPDATA%\wxeditor\ |
9.1 檔案一覽
| 檔案 | 用途 |
|---|---|
settings.json |
全部設定:options(主題/語言/UI 字體/主題切換)+ editor(編輯器字體/換行/閱讀器) |
history.json |
最近專案清單(上限 20 條) |
remote.json |
遠端伺服器清單;密碼 AES-GCM 加密,主金鑰隨檔案儲存 |
execute.json |
安裝位置指標 {"exec": "<路徑>"},供 wxterm 啟動;啟動時自動偵測寫入 |
keymap.json |
使用者鍵位覆蓋(系統預設在安裝目錄 share/wxeditor/config/keymap.json) |
themes.json |
使用者自訂主題 |
wxeditor_debug.json |
偵錯中斷點與執行設定 |
ai/ |
AI 引擎資料:provider.json(模型配置)、wxeditor.dat(金鑰)、task/(任務庫)、skills/(技能) |
logs/ |
執行日誌(按日期輪替,疑難排解時可查看) |
9.2 settings.json 結構
{
"editor": {
"fontFamily": "微軟雅黑",
"fontSize": 14,
"monoFontFamily": "Source Code Pro",
"autoWrap": true,
"reader": {
"viewMode": 0,
"lineHeight": 0.0,
"paraSpacing": 0.0,
"invert": false,
"brightness": 1.0,
"textColor": "#1a1a1a",
"bgColor": "#ffffff",
"autoScroll": false,
"scrollInterval": 4
}
},
"options": {
"themeFontFamily": "微軟雅黑",
"themeFontSize": 12,
"themeSwitchMode": "follow-system",
"uiDarkTheme": "Dark",
"uiLightTheme": "Light",
"darkThemeStartTime": "18:00",
"lightThemeStartTime": "06:00"
}
}
themeSwitchMode:follow-system(跟隨系統)或by-time(按時間,用darkThemeStartTime/lightThemeStartTime兩個時刻)。options.language:介面語言代碼;預設情況下跟隨系統地區設定。- 檔案由應用程式讀寫(經互斥鎖序列化),手動編輯後需重新啟動 應用程式。
9.3 主題自動切換
- 跟隨系統:監聽系統深淺色變化,即時切換
uiDarkTheme/uiLightTheme對應的主題。 - 按時間:每分鐘檢查一次目前時刻,落在深色時段(如 18:00–06:00) 用深色主題,否則淺色。
9.4 解除安裝殘留
解除安裝應用程式不會刪除設定目錄。如需徹底清理,刪除整個
~/.wxeditor/ 即可(注意先備份 remote.json 中的伺服器資訊與
ai/ 中的對話資料)。