WorkFlow

本文最后更新于:2025年5月31日 下午

Upgrade PowerShell

Execute the following command in PowerShell

1
winget search Microsoft.PowerShell

get the output like this

1
2
3
4
Name               Id                           Version Source
---------------------------------------------------------------
PowerShell Microsoft.PowerShell 7.5.1.0 winget
PowerShell Preview Microsoft.PowerShell.Preview 7.6.0.4 winget

then execute the following command

1
winget install --id Microsoft.PowerShell --source winget

or just goto official website to get the latest version

Scoop

Execute the following commands in PowerShell as Administrator

1
2
3
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

then install git with scoop

1
scoop install git

setup git user.name and user.email

1
2
git config --global user.name "your name"
git config --global user.email test@youremail.com

Yazi

1
scoop install ffmpeg 7zip jq poppler fd ripgrep fzf zoxide resvg imagemagick ghostscript yazi

goto C:\Users\<Username>\Documents\PowerShell\Microsoft.PowerShell_profile.ps1, if it doesn’t exist, create it

append the following lines to the file

1
2
3
4
5
6
7
8
9
function y {
$tmp = [System.IO.Path]::GetTempFileName()
yazi $args --cwd-file="$tmp"
$cwd = Get-Content -Path $tmp -Encoding UTF8
if (-not [String]::IsNullOrEmpty($cwd) -and $cwd -ne $PWD.Path) {
Set-Location -LiteralPath ([System.IO.Path]::GetFullPath($cwd))
}
Remove-Item -Path $tmp
}

goto C:\Users\<Username>\AppData\Roaming\yazi\config\yazi.toml, if it doesn’t exist, create it

append the following lines to the file

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[manager]
show_hidden = true

[opener]
edit = [
{run = 'nvim %*', block = true, desc = "nvim", for = "windows" },
]

[open]
prepend_rules = [
{ name = "*.json", use = [ "edit", "open" ] },
{ name = "*.toml", use = [ "edit", "open" ] },
{ name = "*.html", use = [ "edit", "open" ] },
{ name = "*.c", use = [ "edit", "open" ] },
{ name = "*.cpp", use = [ "edit", "open" ] },
{ name = "*.h", use = [ "edit", "open" ] },
{ name = "*.cs", use = [ "edit", "open" ] },
{ name = "*.md", use = [ "edit", "open" ] },
{ name = "*.lua", use = [ "edit", "open" ] },
]
append_rules = [
{ name = "*", use = [ "open", "reveal" ] },
]

Yazi relies on file(1) to detect the mime-type of the file, and the easiest and most reliable way to get it on Windows
is to install Git for Windows and use the file.exe that comes with it.

  1. Install Git for Windows by running the official installer, or through your package manager of choice.
  2. To allow Yazi to use file(1), add <Git_Installed_Directory>\usr\bin\file.exe to your YAZI_FILE_ONE environment variable,
    which differs depending on how you installed Git:
  • If you installed Git with the installer, it would be C:\Program Files\Git\usr\bin\file.exe.
  • If you installed Git with Scoop, it would be C:\Users\<Username>\scoop\apps\git\current\usr\bin\file.exe.
  1. Restart your terminal.

Neovim

1
2
3
scoop bucket add nerd-fonts
scoop install Hack-NF-Mono
scoop install make unzip gcc recycle-bin

Goto C:\Users\<Username>\AppData\Local, clone the repo here

1
git clone https://github.com/JiLingXiaoBai/nvim.git

Windows Terminal

Modify settings.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
},
"id": "User.copy.644BA8F2"
},
{
"command": "paste",
"id": "User.paste"
},
{
"command": "find",
"id": "User.find"
},
{
"command":
{
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
},
"id": "User.splitPane.A6751878"
}
],
"alwaysShowTabs": false,
"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{<your default profile>}",
"keybindings":
[
{
"id": "User.copy.644BA8F2",
"keys": "ctrl+c"
},
{
"id": "User.find",
"keys": "ctrl+shift+f"
},
{
"id": "User.paste",
"keys": "ctrl+v"
},
{
"id": "User.splitPane.A6751878",
"keys": "alt+shift+d"
}
],
"newTabMenu":
[
{
"type": "remainingProfiles"
}
],
"profiles":
{
"defaults":
{
"colorScheme": "arcoiris",
"cursorShape": "filledBox",
"font":
{
"face": "Hack Nerd Font Mono"
},
"opacity": 37,
"padding": "0",
"scrollbarState": "hidden",
"useAcrylic": true
},
"list":
[
{<your profile lists>},
]
},
"schemes":
[
{
"background": "#201F1E",
"black": "#333333",
"blue": "#518BFC",
"brightBlack": "#777777",
"brightBlue": "#B3E8F3",
"brightCyan": "#BCFFC7",
"brightGreen": "#E3F6AA",
"brightPurple": "#CBBAF9",
"brightRed": "#FFB9B9",
"brightWhite": "#EFEFEF",
"brightYellow": "#FFDDAA",
"cursorColor": "#4FBD04",
"cyan": "#63FAD5",
"foreground": "#EEE4D9",
"green": "#12C258",
"name": "arcoiris",
"purple": "#E37BD9",
"red": "#DA2700",
"selectionBackground": "#25524A",
"white": "#BAB2B2",
"yellow": "#FFC656"
}
],
"showTabsInTitlebar": false,
"theme": "dark",
"themes": [],
"useAcrylicInTabRow": true
}

WorkFlow
http://example.com/posts/WorkFlow/
作者
祭零小白
发布于
2025年5月30日
许可协议