Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 0689504

Browse files
committed
fix: user account creation message position
1 parent abf4db1 commit 0689504

File tree

3 files changed

+50
-31
lines changed

3 files changed

+50
-31
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ distribution.
1212
## Requirements
1313

1414
You need [WSL release 2.4.4 or higher](https://github.com/microsoft/WSL/releases)
15-
to use this installation method. To install a pre-release version of WSL, run
16-
the following command:
15+
to use this installation method. To update WSL, run the following command:
1716

1817
```powershell
19-
wsl --update --pre-release
18+
wsl --update
2019
```
2120

2221
To build the distribution, you need the following tools:

root/usr/lib/wsl/oobe.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@
44

55
set -ue
66

7-
DEFAULT_UID='1000'
8-
9-
echo 'Please create a default UNIX user account. The username does not need to match your Windows username.'
10-
echo 'For more information visit: https://aka.ms/wslusers'
11-
12-
if getent passwd "${DEFAULT_UID}" >/dev/null; then
13-
echo 'User account already exists, skipping creation'
14-
exit 0
15-
fi
16-
177
# https://man.archlinux.org/man/machine-id.5
188
systemd-machine-id-setup --commit
199
# https://wiki.archlinux.org/title/Reflector
@@ -27,6 +17,16 @@ pacman-key --init
2717
pacman-key --populate archlinux
2818
pacman -S --noconfirm --needed archlinux-keyring
2919

20+
DEFAULT_UID='1000'
21+
22+
echo 'Please create a default UNIX user account. The username does not need to match your Windows username.'
23+
echo 'For more information visit: https://aka.ms/wslusers'
24+
25+
if getent passwd "${DEFAULT_UID}" >/dev/null; then
26+
echo 'User account already exists, skipping creation'
27+
exit 0
28+
fi
29+
3030
while true; do
3131
# Prompt for the username
3232
read -rp 'Enter new UNIX username: ' username

terminal-profile/index.js

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,28 @@ const ColorName = {
2323
foreground: 'foreground',
2424
}
2525

26+
/** @enum {number} */
27+
const XtermColors = {
28+
// Colors taken from xterm.
29+
// https://github.com/xterm-x11/xterm-snapshots/blob/5b7a08a3482b425c97610190228e58b51ac6c39b/vttests/88colors2.pl#L160-L175
30+
black: argbFromHex("#000000"),
31+
red: argbFromHex("#CD0000"),
32+
green: argbFromHex("#00CD00"),
33+
yellow: argbFromHex("#CDCD00"),
34+
blue: argbFromHex("#0000EE"),
35+
purple: argbFromHex("#CD00CD"),
36+
cyan: argbFromHex("#00CDCD"),
37+
white: argbFromHex("#E5E5E5"),
38+
brightBlack: argbFromHex("#7F7F7F"),
39+
brightRed: argbFromHex("#FF0000"),
40+
brightGreen: argbFromHex("#00FF00"),
41+
brightYellow: argbFromHex("#FFFF00"),
42+
brightBlue: argbFromHex("#5C5CFF"),
43+
brightPurple: argbFromHex("#FF00FF"),
44+
brightCyan: argbFromHex("#00FFFF"),
45+
brightWhite: argbFromHex("#FFFFFF"),
46+
}
47+
2648
class Profile {
2749
/**
2850
* @param {string} colorScheme
@@ -106,87 +128,85 @@ function main() {
106128

107129
// Get the theme from a hex color.
108130
const theme = themeFromSourceColor(sourceColor,
109-
// Colors taken from xterm.
110-
// https://github.com/xterm-x11/xterm-snapshots/blob/5b7a08a3482b425c97610190228e58b51ac6c39b/vttests/88colors2.pl#L160-L175
111131
[
112132
{
113133
name: ColorName.black,
114-
value: argbFromHex("#000000"),
134+
value: XtermColors.black,
115135
blend: true,
116136
},
117137
{
118138
name: ColorName.red,
119-
value: argbFromHex("#CD0000"),
139+
value: XtermColors.red,
120140
blend: true,
121141
},
122142
{
123143
name: ColorName.green,
124-
value: argbFromHex("#00CD00"),
144+
value: XtermColors.green,
125145
blend: true,
126146
},
127147
{
128148
name: ColorName.yellow,
129-
value: argbFromHex("#CDCD00"),
149+
value: XtermColors.yellow,
130150
blend: true,
131151
},
132152
{
133153
name: ColorName.blue,
134-
value: argbFromHex("#0000EE"),
154+
value: XtermColors.blue,
135155
blend: true,
136156
},
137157
{
138158
name: ColorName.purple,
139-
value: argbFromHex("#CD00CD"),
159+
value: XtermColors.purple,
140160
blend: true,
141161
},
142162
{
143163
name: ColorName.cyan,
144-
value: argbFromHex("#00CDCD"),
164+
value: XtermColors.cyan,
145165
blend: true,
146166
},
147167
{
148168
name: ColorName.white,
149-
value: argbFromHex("#E5E5E5"),
169+
value: XtermColors.white,
150170
blend: true,
151171
},
152172
{
153173
name: ColorName.brightBlack,
154-
value: argbFromHex("#7F7F7F"),
174+
value: XtermColors.brightBlack,
155175
blend: true,
156176
},
157177
{
158178
name: ColorName.brightRed,
159-
value: argbFromHex("#FF0000"),
179+
value: XtermColors.brightRed,
160180
blend: true,
161181
},
162182
{
163183
name: ColorName.brightGreen,
164-
value: argbFromHex("#00FF00"),
184+
value: XtermColors.brightGreen,
165185
blend: true,
166186
},
167187
{
168188
name: ColorName.brightYellow,
169-
value: argbFromHex("#FFFF00"),
189+
value: XtermColors.brightYellow,
170190
blend: true,
171191
},
172192
{
173193
name: ColorName.brightBlue,
174-
value: argbFromHex("#5C5CFF"),
194+
value: XtermColors.brightBlue,
175195
blend: true,
176196
},
177197
{
178198
name: ColorName.brightPurple,
179-
value: argbFromHex("#FF00FF"),
199+
value: XtermColors.brightPurple,
180200
blend: true,
181201
},
182202
{
183203
name: ColorName.brightCyan,
184-
value: argbFromHex("#00FFFF"),
204+
value: XtermColors.brightCyan,
185205
blend: true,
186206
},
187207
{
188208
name: ColorName.brightWhite,
189-
value: argbFromHex("#FFFFFF"),
209+
value: XtermColors.brightWhite,
190210
blend: true,
191211
},
192212
]);

0 commit comments

Comments
 (0)