Window-Switcher:提升你的 Windows 多窗口操作体验 作者: Shine 时间: 2025-04-28 分类: Windows 评论 最近发现的小工具 —— [Window-Switcher](https://github.com/sigoden/window-switcher "Window-Switcher"),它彻底改变了我在 Windows 上切换窗口的方式。如果你像我一样经常同时打开多个窗口,尤其是同一应用的多个窗口(比如多个浏览器窗口、多个文档等),那么这个工具绝对值得一试! ## 它能做什么? Window-Switcher 提供了两个超实用的快捷键功能: 1. 使用 **Alt+`(反引号)** 在同一应用程序的多个窗口之间快速切换 - 这个功能太赞了!比如我打开了五个 Chrome 窗口,不用再去任务栏点来点去,只需按 Alt+` 就能快速切换 2. 使用 **Alt+Tab** 在不同应用之间切换(默认是禁用的,需要在配置中开启) - 这个替代了 Windows 自带的 Alt+Tab,但体验更好更流畅 使用方法超简单:按住 Alt 键,然后点击 `(反引号) 键循环切换窗口,松开两个键就会切换到你想要的窗口。同样的方式也适用于 Alt+Tab。 ## 为什么我喜欢它? 1. **提高工作效率**:不再需要使用鼠标点击任务栏或者在一堆窗口中寻找 2. **操作简单直观**:很快就能形成肌肉记忆 3. **完全可定制**:可以根据个人喜好修改快捷键和其他设置 4. **轻量级**:占用资源极少,不会拖慢电脑 5. **开源免费**:在 GitHub 上完全开源 ## 安装方法 安装非常简单: 1. 去 [GitHub Release 页面](https://github.com/sigoden/window-switcher/releases) 下载最新的 `window-switcher.zip` 2. 解压后得到 `window-switcher.exe`,可以放在任何你喜欢的位置 3. 双击运行即可,无需安装 如果你懂一点技术,也可以用 PowerShell 一键安装: ```powershell iwr -useb https://raw.githubusercontent.com/sigoden/window-switcher/main/install.ps1 | iex ``` ## 个性化配置 Window-Switcher 提供了丰富的自定义选项。你可以创建一个名为 `window-switcher.ini` 的配置文件(放在与 exe 相同的目录下),内容如下: ```ini # 是否显示托盘图标,yes/no trayicon = yes [switch-windows] # 切换窗口的快捷键 hotkey = alt+` # 忽略的应用程序列表 blacklist = # 是否忽略最小化的窗口 ignore_minimal = no # 是否只在当前虚拟桌面切换:yes/no/auto only_current_desktop = auto [switch-apps] # 是否启用应用切换功能 enable = no # 切换应用的快捷键 hotkey = alt+tab # 是否忽略最小化的窗口 ignore_minimal = no # 是否只在当前虚拟桌面切换应用:yes/no/auto only_current_desktop = auto ``` 修改后需要重启 Window-Switcher 才能生效。 ## 管理员权限问题 正常情况下,Window-Switcher 在普通用户模式下工作得很好,但是如果你想要它能管理以管理员模式运行的应用程序,你需要以管理员模式运行 Window-Switcher。 > 提示:如果你设置了开机启动,而且想要它以管理员模式启动,记得先以管理员模式运行它,然后再启用开机启动功能。 ## 总结 自从用上 Window-Switcher,我的工作效率提高了不少,特别是在处理大量窗口的时候。对于像我这样经常需要在多个窗口之间切换的人来说,这个小工具简直是救星!强烈推荐大家试试! 如果你也想尝试,可以前往 [GitHub 页面](https://github.com/sigoden/window-switcher) 了解更多信息。 --- 你们试过类似的工具吗?有什么使用心得可以分享?欢迎在评论区交流!
Android 手机卸载 App 但保留应用数据 作者: Shine 时间: 2025-04-20 分类: Android 评论 比如微信,我是通过国内应用商店安装的,我现在想要安装 Play store 版本的,按照往常可能就需要卸载再安装。 但是我从一些论坛得知其实可以使用 `adb uninstall -k` 命令来卸载 App 但是保留应用数据和缓存。 比如你要卸载微信但是保留应用数据和缓存你就可以这样操作: ```shell adb uninstall -k com.tencent.mm # 如果执行上述命令提示如下内容: # The -k option uninstalls the application while retaining the data/cache. #At the moment, there is no way to remove the remaining data. # You will have to reinstall the application with the same signature, and fully uninstall it. # If you truly wish to continue, execute 'adb shell cmd package uninstall -k'. # 你就执行这个命令: adb shell cmd package uninstall -k com.tencent.mm ```  --- **下面的内容通过 LLM 生成** # 使用 `adb uninstall -k` 命令卸载 Android 应用并保留数据 `adb uninstall -k` 是 Android Debug Bridge(ADB)提供的一个命令选项,允许你在卸载应用时保留其本地数据和缓存。本文将详细介绍该命令的作用、适用场景、注意事项及常见问题处理方式。 --- ## 📌 命令格式 ```bash adb uninstall -k <包名> ``` - `-k`:表示在卸载 APK 时 **保留应用的用户数据和缓存目录**,如: - `/data/data/<包名>` - `/sdcard/Android/data/<包名>` --- ## ✅ 使用示例 以微信(WeChat)为例,其包名为 `com.tencent.mm`,执行以下命令可卸载微信 APK 但保留用户数据: ```bash adb uninstall -k com.tencent.mm ``` 卸载后,再次安装相同包名和签名的应用时,原有数据将会被保留和恢复。 --- ## 🧠 应用场景 - 在调试或测试应用时,希望**保留登录信息、配置文件或缓存数据**; - 想通过重新安装 App 来修复某些问题,但又不想让用户数据丢失; - 在自动化测试或 CI/CD 脚本中清除 APK,但保留状态。 --- ## ⚠️ 注意事项 ### 1. 无法删除保留的数据 当使用 `-k` 参数时,系统保留了 `/data/data/<包名>` 等目录。如果你之后无法重新安装具有**相同签名**的应用,可能会导致这些数据**变成系统残留垃圾**,也**无法通过 ADB 再次删除**。 ### 2. 签名不一致将无法复用数据 你需要使用**相同签名的 APK**重新安装,才能正常访问旧数据。不同签名的版本(如 debug 签名与 release 签名)无法读取原有数据。 ### 3. 系统提示信息 执行 `adb uninstall -k` 后,可能会看到如下提示: ``` The -k option uninstalls the application while retaining the data/cache. At the moment, there is no way to remove the remaining data. You will have to reinstall the application with the same signature, and fully uninstall it. If you truly wish to continue, execute 'adb shell cmd package uninstall -k'. ``` > 这是在提醒你:一旦卸载后签名不同,保留的数据将无法删除或复用。 --- ## 🛠️ 替代命令(推荐) 官方推荐使用更底层的 `cmd package` 命令来保留数据: ```bash adb shell cmd package uninstall -k <包名> ``` 示例: ```bash adb shell cmd package uninstall -k com.tencent.mm ``` 该命令作用与 `adb uninstall -k` 相同,但更加直接调用了系统的 `PackageManagerService`。 --- ## 🧹 完全清除数据的卸载方式 如果你想彻底卸载应用及其所有数据: ```bash adb uninstall <包名> ``` 示例: ```bash adb uninstall com.tencent.mm ``` 此操作将删除 APK 文件以及所有相关数据。 --- ## 📂 检查残留数据 可通过以下命令检查某个应用是否还有保留数据: ```bash adb shell ls /data/data/<包名> adb shell ls /sdcard/Android/data/<包名> ``` --- ## 📝 总结 | 目标 | 命令 | |---------------------------|-----------------------------------------------------------| | 卸载 APK 并保留数据 | `adb uninstall -k <包名>` 或 `adb shell cmd package uninstall -k <包名>` | | 卸载 APK 并清除所有数据 | `adb uninstall <包名>` | | 检查是否有数据残留 | `adb shell ls /data/data/<包名>` | --- ## 🙋 常见问题解答 ### Q: 使用 `-k` 卸载后,无法再次安装应用,提示签名冲突? A: 请确保你使用的 APK 与原版本签名一致,或者先使用 `adb uninstall <包名>` 清除数据后再安装。 ### Q: 使用 `-k` 卸载后,怎么彻底删除保留的数据? A: 只能重新安装相同签名的 APK 后,使用 `adb uninstall` 来完整卸载清除所有数据。
Linux WARP CLI 一直连接不上原因 作者: Shine 时间: 2025-04-15 分类: 谈天说地 评论 Warp CLI 连接需要使用代理如 Clash 并开启 TUN 模式,就会劫持相应的的流量,从而连接上 WARP 节点 最近可能是修改过相关规则,导致一直无法连接很郁闷,然后经过不断排查,终于发现问题,原来是 `cloudflareclient.com` 走了直连导致一直连接不上服务器 最终添加 Clash 规则解决: ```yaml rules: - 'DOMAIN-SUFFIX,cloudflareclient.com,Proxy' ``` 
Cursor 配置 MCP Server 并自动运行不需要手动点击 “Run” 作者: Shine 时间: 2025-04-03 分类: 编程工具 2 条评论 找到 `mcp.json` 配置文件  找到需要自动运行的 MCP Server,添加这个配置 `"autoRun": true` 参数,如图 
JetBrains AI Assistant 生成提交消息 (Commit message) 提示语(Prompt) 作者: Shine 时间: 2025-02-12 分类: 神奇技巧 评论 ### 2025-02-25 > 基于此进行改造:https://andrewian.dev/blog/ai-git-commits ```text Generate a git commit message following this structure: 1. First line: conventional commit format (type: concise description) (remember to use semantic types like feat, fix, docs, style, refactor, perf, test, chore, etc.) 2. Optional bullet points if more context helps: - Keep the second line blank - Keep them short and direct - Focus on what changed - Always be terse - Don't overly explain - Drop any fluffy or formal language 3. Please provide a response in the following format: (): Return ONLY the commit message - no introduction, no explanation, no quotes around it. Examples: feat(auth): add user auth system - Add JWT tokens for API auth - Handle token refresh for long sessions fix(worker/pool): resolve memory leak in worker pool - Clean up idle connections - Add timeout for stale workers Simple change example: fix: typo in README.md Very important: Do not respond with any of the examples. Your message must be based off the diff that is about to be provided, with a little bit of styling informed by the recent commits you're about to see. And must use Chinese ``` ### 2025-02-12 > 基于此项目进行相关改造:https://github.com/guanguans/ai-commit/blob/main/config/ai-commit.php#L238-L263 ```text IMPORTANT: Your response MUST be in Simplified Chinese (简体中文) only. Additional formatting requirement: - Add a space between Chinese characters and English/numbers/symbols (在中文字符和英文、数字、符号之间添加空格) Here are some best practices for writing commit messages: - Write clear, concise, and descriptive messages that explain the changes made in the commit. - Use the present tense and active voice in the message, for example, "Fix bug" instead of "Fixed bug." - Use the imperative mood, which gives the message a sense of command, e.g. "Add feature" instead of "Added feature" - Limit the subject line to 72 characters or less. - Capitalize the subject line. - Do not end the subject line with a period. - Limit the body of the message to 256 characters or less. - Use a blank line between the subject and the body of the message. - Use the body of the message to provide additional context or explain the reasoning behind the changes. - Avoid using general terms like "update" or "change" in the subject line, be specific about what was updated or changed. - Explain, What was done at a glance in the subject line, and provide additional context in the body of the message. - Why the change was necessary in the body of the message. - The details about what was done in the body of the message. - Any useful details concerning the change in the body of the message. - Use a hyphen (-) for the bullet points in the body of the message. Remember: 1. The commit message must be written in Simplified Chinese (简体中文) 2. Always add a space between Chinese and English/numbers/symbols (在中文和英文、数字、符号之间需要添加空格) Please provide a response in the following format: (): Example: feat(tracking): 添加 TrackingInfoService 数据处理逻辑 feat(login): 添加 OAuth2 认证支持 feat(route): 添加 /test 路由 fix(order): 修复订单可以 0 元购的问题 ```