update:win_2

This commit is contained in:
dichgrem
2026-01-12 11:08:59 +08:00
parent 3331e2f3b1
commit 30e48b01c1
4 changed files with 180 additions and 62 deletions

View File

@@ -1,5 +1,5 @@
+++ +++
title = "Windows系列(1):系统安装与设置" title = "Windows系列(0):系统安装与设置"
date = 2024-05-24 date = 2024-05-24
[taxonomies] [taxonomies]

View File

@@ -1,5 +1,5 @@
+++ +++
title = "Windows系列(2):常用操作与配置" title = "Windows系列(1):常用操作与配置"
date = 2024-05-25 date = 2024-05-25
[taxonomies] [taxonomies]
@@ -244,64 +244,5 @@ Windows Registry Editor Version 5.00
"SoftwareOnly"=dword:00000001 "SoftwareOnly"=dword:00000001
``` ```
## powershell强化
- 安装模块
```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
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
```
--- ---
**Done.** **Done.**

177
content/windows-2-use.md Normal file
View File

@@ -0,0 +1,177 @@
+++
title = "Windows系列(2):高效操作与强化"
date = 2024-05-26
[taxonomies]
tags = ["Windows"]
+++
前言 本文记载windows下的常用快捷键与PowerShell强化配置.
<!-- more -->
## 快捷键
高效使用 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.**

View File

@@ -1,6 +1,6 @@
+++ +++
title = "Windows系列(3):分类与激活" title = "Windows系列(3):分类与激活"
date = 2024-05-26 date = 2024-05-27
[taxonomies] [taxonomies]
tags = ["Windows"] tags = ["Windows"]