@stephen-lord/other 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,5 @@
1
+ # NOTE: If you are using PowerShell 7+, please run
2
+ # Import-Module Appx -UseWindowsPowerShell
3
+ # before using Add-AppxPackage.
4
+
5
+ Add-AppxPackage Microsoft.WindowsTerminal_<versionNumber>.msixbundle
Binary file
Binary file
@@ -0,0 +1,126 @@
1
+ {
2
+ "$help": "https://aka.ms/terminal-documentation",
3
+ "$schema": "https://aka.ms/terminal-profiles-schema",
4
+ "actions": [
5
+ {
6
+ "command": {
7
+ "action": "copy",
8
+ "singleLine": false
9
+ },
10
+ "id": "User.copy.644BA8F2"
11
+ },
12
+ {
13
+ "command": "paste",
14
+ "id": "User.paste"
15
+ },
16
+ {
17
+ "command": "find",
18
+ "id": "User.find"
19
+ },
20
+ {
21
+ "command": {
22
+ "action": "splitPane",
23
+ "split": "auto",
24
+ "splitMode": "duplicate"
25
+ },
26
+ "id": "User.splitPane.A6751878"
27
+ }
28
+ ],
29
+ "copyFormatting": "none",
30
+ "copyOnSelect": false,
31
+ "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
32
+ "keybindings": [
33
+ {
34
+ "id": "User.copy.644BA8F2",
35
+ "keys": "ctrl+c"
36
+ },
37
+ {
38
+ "id": "User.paste",
39
+ "keys": "ctrl+v"
40
+ },
41
+ {
42
+ "id": "User.find",
43
+ "keys": "ctrl+shift+f"
44
+ },
45
+ {
46
+ "id": "User.splitPane.A6751878",
47
+ "keys": "alt+shift+d"
48
+ }
49
+ ],
50
+ "newTabMenu": [
51
+ {
52
+ "type": "remainingProfiles"
53
+ }
54
+ ],
55
+ "profiles": {
56
+ "defaults": {
57
+ "colorScheme": "Ottosson"
58
+ },
59
+ "list": [
60
+ {
61
+ "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
62
+ "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
63
+ "hidden": false,
64
+ "name": "Windows PowerShell",
65
+ "colorScheme": "Aurelia",
66
+ "backgroundImage": "ms-appdata:///local/better-code-S.png",
67
+ "backgroundImageAlignment": "bottomRight",
68
+ "backgroundImageOpacity": 0.9,
69
+ "startingDirectory": "d:/",
70
+ "fontFace": "Cascadia Code",
71
+ "experimental.retroTerminalEffect": false
72
+ },
73
+ {
74
+ "commandline": "%SystemRoot%\\System32\\cmd.exe",
75
+ "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
76
+ "hidden": false,
77
+ "name": "\u547d\u4ee4\u63d0\u793a\u7b26",
78
+ "colorScheme": "Aurelia"
79
+ },
80
+ {
81
+ "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
82
+ "hidden": false,
83
+ "name": "Azure Cloud Shell",
84
+ "source": "Windows.Terminal.Azure"
85
+ },
86
+ {
87
+ "guid": "{552bada2-20a8-5fdf-a36f-a88fbc3bd11d}",
88
+ "hidden": false,
89
+ "name": "Ubuntu",
90
+ "source": "Microsoft.WSL",
91
+ "colorScheme": "Aurelia"
92
+ },
93
+ {
94
+ "guid": "{78b4b215-5722-447b-8b7e-093f96493df2}",
95
+ "hidden": false,
96
+ "name": "Git Bash",
97
+ "colorScheme": "Aurelia"
98
+ }
99
+ ]
100
+ },
101
+ "schemes": [
102
+ {
103
+ "name": "Aurelia",
104
+ "background": "#1a1a1a",
105
+ "black": "#000000",
106
+ "blue": "#579BD5",
107
+ "brightBlack": "#797979",
108
+ "brightBlue": "#9CDCFE",
109
+ "brightCyan": "#2BC4E2",
110
+ "brightGreen": "#1AD69C",
111
+ "brightPurple": "#975EAB",
112
+ "brightRed": "#EB2A88",
113
+ "brightWhite": "#EAEAEA",
114
+ "brightYellow": "#e9ad95",
115
+ "cyan": "#00B6D6",
116
+ "foreground": "#d97757", //"#EA549F",
117
+ "green": "#4EC9B0",
118
+ "purple": "#714896",
119
+ "red": "#E92888",
120
+ "white": "#EAEAEA",
121
+ "yellow": "#CE9178"
122
+ }
123
+ ],
124
+ "themes": [],
125
+ "useAcrylicInTabRow": true
126
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "3024 Night",
3
+ "black": "#090300",
4
+ "red": "#db2d20",
5
+ "green": "#01a252",
6
+ "yellow": "#fded02",
7
+ "blue": "#01a0e4",
8
+ "purple": "#a16a94",
9
+ "cyan": "#b5e4f4",
10
+ "white": "#a5a2a2",
11
+ "brightBlack": "#5c5855",
12
+ "brightRed": "#e8bbd0",
13
+ "brightGreen": "#3a3432",
14
+ "brightYellow": "#4a4543",
15
+ "brightBlue": "#807d7c",
16
+ "brightPurple": "#d6d5d4",
17
+ "brightCyan": "#cdab53",
18
+ "brightWhite": "#f7f7f7",
19
+ "background": "#090300",
20
+ "foreground": "#a5a2a2",
21
+ "selectionBackground": "#4a4543",
22
+ "cursorColor": "#a5a2a2"
23
+ }
Binary file
@@ -0,0 +1,70 @@
1
+ C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps\wt.exe
2
+
3
+ wt -p "PowerShell" `; split-pane -V -p "PowerShell" `; split-pane -H -p "PowerShell" `; split-pane -H -p "PowerShell"
4
+
5
+ wt -p "PowerShell" `; split-pane -V -p "PowerShell" `; split-pane -H -p "PowerShell" `; focus-pane -t 0 `; split-pane -H -p "PowerShell"
6
+
7
+
8
+
9
+ # 创建四窗格布局的函数
10
+ function Start-P4Layout {
11
+ param(
12
+ [string]$Directory = (Get-Location).Path
13
+ )
14
+ wt -d $Directory -p "PowerShell" `; split-pane -d $Directory -V -p "PowerShell" `; split-pane -d $Directory -H -p "PowerShell" `; focus-pane -t 0 `; split-pane -d $Directory -H -p "PowerShell"
15
+ }
16
+ # 设置别名
17
+ Set-Alias p4 Start-P4Layout
18
+
19
+ # 创建三窗格布局的函数
20
+ function Start-P3Layout {
21
+ param(
22
+ [string]$Directory = (Get-Location).Path
23
+ )
24
+ wt -d $Directory -p "PowerShell" `; split-pane -d $Directory -V -p "PowerShell" `; split-pane -d $Directory -H -p "PowerShell"
25
+ }
26
+ # 设置别名
27
+ Set-Alias p3 Start-P3Layout
28
+
29
+ # 创建二窗格布局的函数
30
+ function Start-P2Layout {
31
+ param(
32
+ [string]$Directory = (Get-Location).Path
33
+ )
34
+ wt -d $Directory -p "PowerShell" `; split-pane -d $Directory -V -p "PowerShell"
35
+ }
36
+ # 设置别名
37
+ Set-Alias p2 Start-P2Layout
38
+
39
+
40
+
41
+ 你提供的命令 wt -p "PowerShell"; split-pane -V -p "PowerShell" ; split-pane -H -p "PowerShell"; split-pane -H -p "PowerShell"` 是用来在 Windows Terminal 中创建特定多窗格布局的。下面这个流程图可以帮你直观地理解整个窗格的创建过程:
42
+ flowchart TD
43
+ Start[命令开始] --> First[第一个窗格<br>主窗格]
44
+ First --> Split1[第一次拆分 split-pane -V]
45
+ Split1 --> Second[第二个窗格<br>右侧列(顶部)]
46
+ Split1 --> LeftCol[左侧列]
47
+
48
+ Second --> Split2[第二次拆分 split-pane -H]
49
+ Split2 --> Third[第三个窗格<br>右侧列(中部)]
50
+ Split2 --> Split3[第三次拆分 split-pane -H]
51
+
52
+ Split3 --> Fourth[第四个窗格<br>右侧列(底部)]
53
+
54
+ subgraph "最终布局"
55
+ LeftCol
56
+ Third
57
+ Fourth
58
+ end
59
+ 下面我们来详细解读命令中的每个部分。
60
+ ⚙️ 命令参数详解
61
+ wt: 这是 Windows Terminal 的执行命令,用于启动终端。
62
+ -p "PowerShell": 这个参数指定了新标签页或窗格要使用的配置文件。-p是 --profile的缩写,后面的 "PowerShell"是你在 Windows Terminal 设置中给 PowerShell 配置文件的名称。这会确保每个新窗格都运行 PowerShell。
63
+ `;: 在 PowerShell 中,分号 ;是命令分隔符。为了让 PowerShell 将 ;传递给 wt命令而不是自己解释,需要使用反引号 `进行转义。所以 `;的作用是告诉 wt执行下一个命令(如 split-pane)。
64
+ split-pane: 这是用于在当前窗格中拆分出新窗格的核心命令。
65
+ -V: 这是 --vertical的缩写,表示垂直拆分,新窗格会出现在当前窗格的右侧。
66
+ -H: 这是 --horizontal的缩写,表示水平拆分,新窗格会出现在当前窗格的下方。
67
+ 💡 使用技巧与变通方案
68
+ 调整窗格大小:窗格创建后,你可以使用快捷键 Alt+Shift+方向键来调整它们的大小。
69
+ 命令变体:如果你想先垂直拆分再水平拆分,或者创建其他布局(比如一个大的主窗格旁边有多个小窗格),只需调整 split-pane的顺序和 -V/-H参数即可。例如,wt -p "PowerShell"; split-pane -H -p "PowerShell" ; split-pane -V -p "PowerShell"; split-pane -V -p "PowerShell"` 会创建一个顶部一行、底部一行且底部行内有三个垂直排列窗格的布局。
70
+ 从其他环境调用:如果你在 CMD​ 中运行,转义符是 \`,命令应写为:wt -p "PowerShell" ;split-pane -V -p "Power;split-pane -H -p "PowerShell" ;split-pane -H -p "PowerShell"[2,3](@ref)。如果从 **WSL** 调用,通常需要写成cmd.exe /c "wt.exe" ...` 的形式。
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@stephen-lord/other",
3
+ "version": "1.0.3",
4
+ "description": "Your package description",
5
+ "main": "dist/index.js",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "scripts": {
10
+ "publish": "npm publish --access=public",
11
+ "build": "tsc",
12
+ "test": "jest"
13
+ },
14
+ "keywords": [
15
+ "utils",
16
+ "tool"
17
+ ],
18
+ "author": "YourName <your@email.com>",
19
+ "license": "MIT",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/your-username/your-repo.git"
23
+ },
24
+ "bugs": {
25
+ "url": "https://github.com/your-username/your-repo/issues"
26
+ },
27
+ "homepage": "https://github.com/your-username/your-repo#readme",
28
+ "private": false
29
+ }