From 382e05ea764570267a91eafea3c6ac39aa57d4f1 Mon Sep 17 00:00:00 2001 From: dichgrem Date: Mon, 5 Jan 2026 10:42:39 +0800 Subject: [PATCH] update:blog --- .github/workflows/build.yml | 2 +- content/about-blog.md | 54 ++++++ ...{about-shortcut-key.md => about-vscode.md} | 178 ++++++++++-------- content/awesome-arch-linux.md | 29 ++- ...dows-1-install.md => windows-0-install.md} | 4 +- .../{windows-2-set.md => windows-1-set.md} | 2 +- content/{windows-3-jh.md => windows-2-jh.md} | 2 +- .../{windows-4-auto.md => windows-3-auto.md} | 4 +- content/windows-4-use.md | 177 +++++++++++++++++ content/windows-5-py.md | 2 +- content/windows-6-c.md | 2 +- 11 files changed, 348 insertions(+), 108 deletions(-) rename content/{about-shortcut-key.md => about-vscode.md} (81%) rename content/{windows-1-install.md => windows-0-install.md} (99%) rename content/{windows-2-set.md => windows-1-set.md} (99%) rename content/{windows-3-jh.md => windows-2-jh.md} (99%) rename content/{windows-4-auto.md => windows-3-auto.md} (97%) create mode 100644 content/windows-4-use.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b616fa..75b6585 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: - name: Install Zola uses: taiki-e/install-action@v2 with: - tool: zola + tool: zola@0.21.0 - name: Install Pagefind run: | diff --git a/content/about-blog.md b/content/about-blog.md index 6c3bbf8..d511a36 100644 --- a/content/about-blog.md +++ b/content/about-blog.md @@ -146,6 +146,60 @@ git gc --aggressive --prune=now # 重新推送到github git push --force --mirror ``` +当然这样还是不够智能,因此现在的方法是写一个GitHub Actions: + +```bash +name: Blog CI (Zola) + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install Zola + uses: taiki-e/install-action@v2 + with: + tool: zola + + - name: Install Pagefind + run: | + wget https://github.com/Pagefind/pagefind/releases/download/v1.4.0/pagefind-v1.4.0-x86_64-unknown-linux-musl.tar.gz + tar xvf pagefind-v1.4.0-x86_64-unknown-linux-musl.tar.gz + sudo mv pagefind /usr/local/bin/ + + - name: Build Zola + run: zola build + + - name: Build Pagefind + run: pagefind --site public --root-selector body + + - name: Push public to dist + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public + publish_branch: dist + force_orphan: true + +``` + +这个action会自动在每次commit之后运行,下载zola并使用zola对仓库进行构建,随后构建出public文件夹在dist分支中,并且dist分支只保留一次commit,这样做的好处有: + +- 自动云端构建,无须本地再安装zola; +- 构建Public在dist分支,git仓库大小不会膨胀; +- 灵活可修改,支持各种框架包括Hugo/Hexo等等. + +> 注意需要在GitHub的仓库设置中的``Actions-General-Workflow permissions``中打开``Read and write permissions``,否则actions无法对仓库进行读写. ## 🔗 diff --git a/content/about-shortcut-key.md b/content/about-vscode.md similarity index 81% rename from content/about-shortcut-key.md rename to content/about-vscode.md index d13ddcc..e220853 100644 --- a/content/about-shortcut-key.md +++ b/content/about-vscode.md @@ -1,95 +1,29 @@ +++ -title = "乱七八糟:常用实用快捷键" +title = "乱七八糟:VScode那些事" date = 2024-05-23 [taxonomies] tags = ["乱七八糟"] +++ -前言 在日常使用浏览器时,掌握一些快捷键和技巧可以节省大量时间,提高工作和学习效率。通过学习和实践,能够更加轻松地应对各种网页浏览场景,让浏览器成为工作和学习的得力助手。 +前言 VScode 素有世界最强IDE之称,有着丰富的插件系统,优秀的图形界面和极快的响应速度,本文介绍VSCode的一些使用技巧。 -## 浏览器快捷键 +## AI 插件 -### 常用 - -| 快捷键 | 描述 | -|----------------------|------------------| -| Ctrl + A | 全选 | -| Ctrl + C | 复制 | -| Ctrl + X | 剪切 | -| Ctrl + V | 粘贴 | -| Ctrl + F | 查找 | -| Ctrl + Q | 退出 | -| Ctrl + T | 新建标签页 | -| Ctrl + W | 关闭标签页 | -| Ctrl + N | 新建窗口 | -| Ctrl + Shift + P | 新建隐私浏览窗口 | - -### 历史 - -| 快捷键 | 描述 | -|-------------------------|----------------------------| -| Ctrl + H | 历史侧栏 | -| Ctrl + Shift + H | 我的足迹窗口(历史) | -| Ctrl + Shift + Del | 清除最近历史记录 | - -### 书签 - -| 快捷键 | 描述 | -|-------------------------------|------------------------------------| -| Ctrl + D | 将此页加为书签 | -| Ctrl + I | 页面信息 | -| Ctrl + Shift + O | 显示全部书签(我的足迹窗口) | -| Ctrl + B / Ctrl + Shift + B | 书签侧栏 / 顶栏 | - -### 下载与插件 - -| 快捷键 | 描述 | -|----------------------|----------------| -| Ctrl + Shift + Y | 下载 | -| Ctrl + Shift + A | 附加组件 / 插件 | - -### 控制台与开发 - -| 快捷键 | 描述 | -|----------------------|------------------| -| Ctrl + Shift + K | Web 控制台 | -| Ctrl + Shift + C | 查看器 | -| Shift + F7 | 样式编辑器 | -| Shift + F5 | 分析器 | -| Ctrl + Shift + E | 网络 | -| Ctrl + U | 页面源码 | -| Ctrl + Shift + J | 浏览器控制台 | - -### 标签页与界面 - -| 快捷键 | 描述 | -|-------------------------------|--------------------------| -| Ctrl + S | 界面保存 | -| Ctrl + + | 放大 | -| Ctrl + - | 缩小 | -| Ctrl + 0 | 重置缩放 | -| Ctrl + K / J | 搜索 | -| Ctrl + Home / End | 到文件头 / 尾 | -| Ctrl + Page Up | 切换到左边标签页 | -| Ctrl + Page Down | 切换到右边标签页 | -| Ctrl + Shift + Page Up | 当前标签页左移 | -| Ctrl + Shift + Page Down | 当前标签页右移 | - -### 其他操作 - -| 快捷键 | 描述 | -|--------------------|------------------| -| Alt + Space | KDE 搜索栏 | -| Alt + → / ← | 前进 / 后退 | -| Alt + 数字键 | 选择标签页(1–8)| -| Alt + M | 静音 | -| End | 到达页尾 | -| Home | 到达页首 | -| F6 | 地址栏 | +| 插件名 | 免费 | 付费 | 单模型 | 多模型 | 说明 | +| ---------------------------------------------------------------------------------------- | :-----------: | :--------: | :-: | :-: | ------------------------------------------------------- | +| **[GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot)** | ✔️(试用 / 学生优惠) | ✔️ | ❌ | ✔️ | 主流 AI 编码助手,支持代码补全和聊天建议。([Visual Studio Marketplace][1]) | +| **[GPT (ChatGPT)](https://open-vsx.org/extension/openai/chatgpt)** | ✔️ | ✔️(API 模型) | ❌ | ✔️ | 基于 OpenAI 的 ChatGPT,可做代码解释/对话生成 | +| **[Gemini Code Assist](https://open-vsx.org/extension/Google/geminicodeassist)** | ✔️ | ❌ | ❌ | ✔️ | Google Gemini 驱动的智能编码助手 | +| **[Claude Code](https://open-vsx.org/extension/Anthropic/claude-code)** | ❓(账户权限) | ✔️ | ❌ | ✔️ | Anthropic Claude 驱动的编码助手 | +| **[Cline (claude-dev)](https://open-vsx.org/extension/saoudrizwan/claude-dev)** | ✔️ | ❌ | ❌ | ✔️ | 社区版 Claude 型 AI 编码插件 | +| **[CodeGeeX](https://open-vsx.org/extension/AMiner/codegeex)** | ✔️ | ❌ | ❌ | ✔️ | 开源多模型 AI код助手 | +| **[OpenCode](https://open-vsx.org/extension/sst-dev/opencode)** | ✔️ | ❌ | ❌ | ✔️ | 多模型聚合,可接多种后端 | +| **[Windsurf (Codeium)](https://open-vsx.org/extension/Codeium/codeium)** | ✔️ | ❌ | ❌ | ✔️ | 轻量级 AI 代码补全助手(Codeium 改名) | +[1]: https://marketplace.visualstudio.com/items?itemName=GitHub.copilot&utm_source=chatgpt.com "GitHub Copilot" ## VS Code 快捷键 @@ -302,5 +236,87 @@ tags = ["乱七八糟"] - **函数提示**: - 在悬停窗口上按下 `cmd`:提示函数的实现 + +## 浏览器快捷键 + +### 常用 + +| 快捷键 | 描述 | +|----------------------|------------------| +| Ctrl + A | 全选 | +| Ctrl + C | 复制 | +| Ctrl + X | 剪切 | +| Ctrl + V | 粘贴 | +| Ctrl + F | 查找 | +| Ctrl + Q | 退出 | +| Ctrl + T | 新建标签页 | +| Ctrl + W | 关闭标签页 | +| Ctrl + N | 新建窗口 | +| Ctrl + Shift + P | 新建隐私浏览窗口 | + +### 历史 + +| 快捷键 | 描述 | +|-------------------------|----------------------------| +| Ctrl + H | 历史侧栏 | +| Ctrl + Shift + H | 我的足迹窗口(历史) | +| Ctrl + Shift + Del | 清除最近历史记录 | + +### 书签 + +| 快捷键 | 描述 | +|-------------------------------|------------------------------------| +| Ctrl + D | 将此页加为书签 | +| Ctrl + I | 页面信息 | +| Ctrl + Shift + O | 显示全部书签(我的足迹窗口) | +| Ctrl + B / Ctrl + Shift + B | 书签侧栏 / 顶栏 | + +### 下载与插件 + +| 快捷键 | 描述 | +|----------------------|----------------| +| Ctrl + Shift + Y | 下载 | +| Ctrl + Shift + A | 附加组件 / 插件 | + +### 控制台与开发 + +| 快捷键 | 描述 | +|----------------------|------------------| +| Ctrl + Shift + K | Web 控制台 | +| Ctrl + Shift + C | 查看器 | +| Shift + F7 | 样式编辑器 | +| Shift + F5 | 分析器 | +| Ctrl + Shift + E | 网络 | +| Ctrl + U | 页面源码 | +| Ctrl + Shift + J | 浏览器控制台 | + +### 标签页与界面 + +| 快捷键 | 描述 | +|-------------------------------|--------------------------| +| Ctrl + S | 界面保存 | +| Ctrl + + | 放大 | +| Ctrl + - | 缩小 | +| Ctrl + 0 | 重置缩放 | +| Ctrl + K / J | 搜索 | +| Ctrl + Home / End | 到文件头 / 尾 | +| Ctrl + Page Up | 切换到左边标签页 | +| Ctrl + Page Down | 切换到右边标签页 | +| Ctrl + Shift + Page Up | 当前标签页左移 | +| Ctrl + Shift + Page Down | 当前标签页右移 | + +### 其他操作 + +| 快捷键 | 描述 | +|--------------------|------------------| +| Alt + Space | KDE 搜索栏 | +| Alt + → / ← | 前进 / 后退 | +| Alt + 数字键 | 选择标签页(1–8)| +| Alt + M | 静音 | +| End | 到达页尾 | +| Home | 到达页首 | +| F6 | 地址栏 | + + --- -**Done.** \ No newline at end of file +**Done.** diff --git a/content/awesome-arch-linux.md b/content/awesome-arch-linux.md index 427c651..f8f2411 100644 --- a/content/awesome-arch-linux.md +++ b/content/awesome-arch-linux.md @@ -29,47 +29,40 @@ tags = ["综合工程"] ## 安装软件 -随后安装常用开源软件(KDE环境省略file和wayland) +随后安装常用开源软件,KDE环境和Wayland+WM环境安装的包不同: ```bash # gui - -paru -S floorp-bin keepassxc qemu-full virt-manager materialgram-bin legcord-bin onlyoffice-bin localsend-bin kazumi-bin foliate vlc krita qtscrcpy strawberry oculante obs-studio scx-manager daed +paru -S floorp-bin keepassxc qemu-full virt-manager materialgram-bin legcord-bin onlyoffice-bin localsend-bin kazumi-bin foliate vlc krita qtscrcpy strawberry oculante obs-studio scx-manager # tui - paru -S neovim yazi lazygit btop zellij termshark # cli +paru -S alacritty fastfetch onefetch starship atuin bat fzf fd ripgrep eza tree android-tools payload-dumper-go-bin nexttrace-bin syncthing aria2 -paru -S alacritty fish fastfetch tealdeer expac fish-autopair fish-pure-prompt fisher onefetch starship atuin bat fzf fd ripgrep eza tree android-tools payload-dumper-go-bin nexttrace-bin syncthing aria2 - - -# file - -paru -S gvfs gvfs-mtp gvfs-afc gvfs-nfs nemo +# fish +fish tealdeer expac fish-autopair fish-pure-prompt fisher # zip - paru -S peazip # Type - paru -S fcitx5-configtool fcitx5-skin-material fcitx5-rime fcitx5-gtk -# Blog - -paru -S zola npm pnpm just go - # ttf - paru -S ttf-jetbrains-mono-nerd ttf-sarasa-gothic-sc +``` +如果使用Wayland+WM方案,需要额外安装以下这些: +```bash # Wayland - paru -S hyprland waybar network-manager-applet swww wl-gammarelay-rs brightnessctl easyeffects wireplumber pipewire blueman bluez-utils wl-clipboard-rs wl-clip-persist swaync swayosd swappy grim wlogout hyprlock hyprpolkitagent +# file +paru -S gvfs gvfs-mtp gvfs-afc gvfs-nfs nemo ``` + | 分类 | 软件列表 | | ------------ | ------------------------------------------------ | | **窗口管理器** | hyprland | diff --git a/content/windows-1-install.md b/content/windows-0-install.md similarity index 99% rename from content/windows-1-install.md rename to content/windows-0-install.md index 23c5f95..5e3c098 100644 --- a/content/windows-1-install.md +++ b/content/windows-0-install.md @@ -1,5 +1,5 @@ +++ -title = "Windows系列(1):系统安装与设置" +title = "Windows系列(0):系统安装与设置" date = 2024-05-24 [taxonomies] @@ -12,7 +12,7 @@ tags = ["Windows"] ## 总纲 -安装Windows有两种情况:1.在一台全新的电脑上安装;2.想为现有的系统更换版本。本文主要介绍这两种情况。如果只想对现有的系统进行优化,推荐看下一篇的``"Windows系列(2):常用操作与配置"``. +安装Windows有两种情况:1.在一台全新的电脑上安装;2.想为现有的系统更换版本。本文主要介绍这两种情况。如果只想对现有的系统进行优化,推荐看下一篇的``"Windows系列(1):常用操作与配置"``. **全新安装** - 获得一个Windows的ISO镜像; diff --git a/content/windows-2-set.md b/content/windows-1-set.md similarity index 99% rename from content/windows-2-set.md rename to content/windows-1-set.md index b653c45..236cf79 100644 --- a/content/windows-2-set.md +++ b/content/windows-1-set.md @@ -1,5 +1,5 @@ +++ -title = "Windows系列(2):常用操作与配置" +title = "Windows系列(1):常用操作与配置" date = 2024-05-25 [taxonomies] diff --git a/content/windows-3-jh.md b/content/windows-2-jh.md similarity index 99% rename from content/windows-3-jh.md rename to content/windows-2-jh.md index bf47ecc..6170748 100644 --- a/content/windows-3-jh.md +++ b/content/windows-2-jh.md @@ -1,5 +1,5 @@ +++ -title = "Windows系列(3):分类与激活" +title = "Windows系列(2):分类与激活" date = 2024-05-26 [taxonomies] diff --git a/content/windows-4-auto.md b/content/windows-3-auto.md similarity index 97% rename from content/windows-4-auto.md rename to content/windows-3-auto.md index 0af00c6..3e827c0 100644 --- a/content/windows-4-auto.md +++ b/content/windows-3-auto.md @@ -1,6 +1,6 @@ +++ -title = "Windows系列(4):封装与全自动安装" -date = 2024-05-29 +title = "Windows系列(3):封装与全自动安装" +date = 2024-05-27 [taxonomies] tags = ["Windows"] diff --git a/content/windows-4-use.md b/content/windows-4-use.md new file mode 100644 index 0000000..82147b7 --- /dev/null +++ b/content/windows-4-use.md @@ -0,0 +1,177 @@ ++++ +title = "Windows系列(4):高效操作与强化" +date = 2024-05-28 + +[taxonomies] +tags = ["Windows"] ++++ + +前言 本文记载windows下的常用快捷键与PowerShell强化配置. + + +## 快捷键 + +高效使用 Windows 的第一步,就是**减少鼠标依赖**。 +Windows 自身已经内置了大量非常实用的快捷键,只是很多人并没有系统地使用过。 + +- **Alt + Tab** + 在**已打开的窗口之间切换**(经典快捷键) + +- **Win + Tab** + 打开**任务视图**,可查看所有窗口与虚拟桌面 + +- **Alt + F4** + 关闭当前窗口 + +> 在桌面下使用时可弹出关机 / 重启菜单 + +- **Win + D** + 显示桌面 / 恢复窗口 + +- **Win + ↑ / ↓ / ← / →** + 窗口最大化 / 最小化 / 左右分屏 + +- **Win + Shift + ← / →** + 将当前窗口移动到另一个显示器 + +--- + +### 虚拟桌面 + +- **Win + Ctrl + D** + 新建虚拟桌面 + +- **Win + Ctrl + ← / →** + 在虚拟桌面之间切换 + +- **Win + Ctrl + F4** + 关闭当前虚拟桌面 + +--- + +### 应用启动与系统 + +- **Win** + 打开开始菜单,直接输入搜索应用 + +- **Win + R** + 打开“运行”窗口 + +- **Win + E** + 打开资源管理器 + +- **Win + I** + 打开系统设置 + +- **Win + L** + 锁屏 + +--- + +### 截图与录屏 + +- **Win + Shift + S** + 截图(区域 / 窗口 / 全屏) + +- **Win + PrtSc** + 全屏截图并自动保存 + +- **Win + G** + 打开 Xbox Game Bar,可用于屏幕录制 + +--- + +### 常用编辑操作 + +- **Ctrl + C / V / X** + 复制 / 粘贴 / 剪切 + +- **Ctrl + Z / Y** + 撤销 / 重做 + +- **Ctrl + A** + 全选 + +- **Ctrl + S** + 保存 + +- **Ctrl + F** + 查找 + +- **Ctrl + Shift + Esc** + 直接打开任务管理器 + + +## 启动器 + +有了窗口切换和关闭,还需要打开,这里推荐这两个: +- [Flow.Launcher](https://github.com/Flow-Launcher/Flow.Launcher) +- [ZeroLaunch-rs](https://github.com/ghost-him/ZeroLaunch-rs) + +现在我们就可以使用``Win+Tab``切换窗口,使用``Alt+F4``关闭窗口,使用``Alt+Space``启动软件. + +## Powershell强化 + +要达到类似Linux下``oh-myzsh+atuin+fzf+zoxide+starship``的效果,可以使用以下方法增强: + +- 安装模块 +```bash +winget install junegunn.fzf +fzf --version +winget install JanDeDobbeleer.OhMyPosh +oh-my-posh version +winget install ajeetdsouza.zoxide +zoxide --version +``` + +- 导入模块 +```bash +Install-Module PSReadLine -Scope CurrentUser -Force +Install-Module posh-git -Scope CurrentUser -Force +Install-Module PSFzf -Scope CurrentUser -Force +``` + +- 写入配置 + +首先执行这个命令: +```bash +notepad $PROFILE +``` + +在打开的窗口中写入: + +```bash +# ---------- PSReadLine ---------- +Import-Module PSReadLine +Set-PSReadLineOption -PredictionSource History +Set-PSReadLineOption -PredictionViewStyle InlineView + +# ---------- Git ---------- +Import-Module posh-git + +# ---------- fzf ---------- +Import-Module PSFzf +Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r' + +# ---------- zoxide ---------- +Invoke-Expression (& { (zoxide init powershell | Out-String) }) + +# ---------- oh-my-posh ---------- + +oh-my-posh init pwsh | Invoke-Expression + +# ---------- Bash-style line editing ---------- + +# Ctrl+A → 行首 +Set-PSReadLineKeyHandler -Key Ctrl+a -Function BeginningOfLine +# Ctrl+E → 行尾 +Set-PSReadLineKeyHandler -Key Ctrl+e -Function EndOfLine +# Ctrl+U → 删除从光标到行首 +Set-PSReadLineKeyHandler -Key Ctrl+u -Function BackwardDeleteLine +# Ctrl+K → 删除从光标到行尾 +Set-PSReadLineKeyHandler -Key Ctrl+k -Function ForwardDeleteLine +``` +随后新开启一个PowerShell,可以看到有Git提示,ctrl+R唤起历史,右方向键透明补全的效果. + +--- +**Done.** diff --git a/content/windows-5-py.md b/content/windows-5-py.md index 48b3be1..38c4437 100644 --- a/content/windows-5-py.md +++ b/content/windows-5-py.md @@ -1,6 +1,6 @@ +++ title = "Windows系列(5):Python开发配置" -date = 2024-05-31 +date = 2024-05-30 [taxonomies] tags = ["Windows"] diff --git a/content/windows-6-c.md b/content/windows-6-c.md index 2fbf1c4..efbb004 100644 --- a/content/windows-6-c.md +++ b/content/windows-6-c.md @@ -1,6 +1,6 @@ +++ title = "Windows系列(6):C/C++开发配置" -date = 2024-05-30 +date = 2024-05-31 [taxonomies] tags = ["Windows"]