refactor: remove hardcoded personal identifiers from tracked files
This commit is contained in:
@@ -16,7 +16,7 @@ Required software:
|
|||||||
`git`; `fzf`; `zoxide`; `python`; `starship`
|
`git`; `fzf`; `zoxide`; `python`; `starship`
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git clone https://gitea.meip.work/gwbeip/TerminalPolyjuice.git $HOME/.TerminalPolyjuice
|
git clone <repository-url> $HOME/.TerminalPolyjuice
|
||||||
cd $HOME/.TerminalPolyjuice/zsh
|
cd $HOME/.TerminalPolyjuice/zsh
|
||||||
zsh polyjuice.sh install_ohmyzsh config_starship check
|
zsh polyjuice.sh install_ohmyzsh config_starship check
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
# Configure New Archlinux in WSL
|
# Configure New Archlinux in WSL
|
||||||
|
|
||||||
## Add user `gwb`
|
## Add user `<username>`
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd
|
cd
|
||||||
pacman -Syu
|
pacman -Syu
|
||||||
useradd -m gwb
|
useradd -m <username>
|
||||||
```
|
```
|
||||||
|
|
||||||
run
|
run
|
||||||
@@ -16,11 +16,11 @@ to set a password for `root`
|
|||||||
|
|
||||||
run
|
run
|
||||||
```shell
|
```shell
|
||||||
passwd gwb
|
passwd <username>
|
||||||
```
|
```
|
||||||
to set a password for user `gwb`
|
to set a password for user `<username>`
|
||||||
|
|
||||||
## Add user `gwb` into group `sudo`
|
## Add user `<username>` into group `sudo`
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pacman -S sudo
|
pacman -S sudo
|
||||||
@@ -29,7 +29,7 @@ pacman -S vim
|
|||||||
edit `/etc/sudoers`
|
edit `/etc/sudoers`
|
||||||
uncomment `%wheel ALL=(ALL:ALL) ALL`
|
uncomment `%wheel ALL=(ALL:ALL) ALL`
|
||||||
```shell
|
```shell
|
||||||
usermod -aG wheel gwb
|
usermod -aG wheel <username>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install and configure `ZSH`
|
## Install and configure `ZSH`
|
||||||
@@ -41,12 +41,12 @@ pacman -S fzf
|
|||||||
pacman -S zoxide
|
pacman -S zoxide
|
||||||
pacman -S starship
|
pacman -S starship
|
||||||
pacman -S python
|
pacman -S python
|
||||||
su gwb
|
su <username>
|
||||||
cd
|
cd
|
||||||
git clone https://gitea.meip.work/gwbeip/TerminalPolyjuice.git $HOME/.TerminalPolyjuice
|
git clone <repository-url> $HOME/.TerminalPolyjuice
|
||||||
chsh -s /bin/zsh
|
chsh -s /bin/zsh
|
||||||
exit
|
exit
|
||||||
su gwb
|
su <username>
|
||||||
cd
|
cd
|
||||||
mkdir .config
|
mkdir .config
|
||||||
cd $HOME/.TerminalPolyjuice/zsh
|
cd $HOME/.TerminalPolyjuice/zsh
|
||||||
@@ -55,7 +55,7 @@ zsh polyjuice.sh install_ohmyzsh config_starship check
|
|||||||
|
|
||||||
add the contents in `$HOME/.TerminalPolyjuice/zsh/zshenv` into `$HOME/.zshenv`
|
add the contents in `$HOME/.TerminalPolyjuice/zsh/zshenv` into `$HOME/.zshenv`
|
||||||
|
|
||||||
# Set `gwb` as default user
|
# Set `<username>` as default user
|
||||||
```shell
|
```shell
|
||||||
wsl --manage archlinux --set-default-user gwb
|
wsl --manage archlinux --set-default-user <username>
|
||||||
```
|
```
|
||||||
|
|||||||
+12
-3
@@ -1,7 +1,16 @@
|
|||||||
# "[interop] appendWindowsPath=false" in /etc/wsl.conf is setted
|
# "[interop] appendWindowsPath=false" in /etc/wsl.conf is setted
|
||||||
# Append VSCode on Windows into PATH so that vscode can be used in WSL
|
# Dynamically resolve Windows-side program paths (avoids hardcoding usernames)
|
||||||
export PATH=$PATH:'/mnt/c/Users/gwbei/AppData/Local/Programs/Microsoft VS Code/bin/'
|
if [[ -n "$WSLENV" ]]; then
|
||||||
export PATH=$PATH:'/mnt/c/Users/gwbei/AppData/Local/Programs/Zed/bin/zed'
|
_win_user=$(cmd.exe /c "echo %USERNAME%" 2>/dev/null | tr -d '\r\n')
|
||||||
|
if [[ -n "$_win_user" ]]; then
|
||||||
|
_win_home="/mnt/c/Users/$_win_user"
|
||||||
|
_vscode_bin="$_win_home/AppData/Local/Programs/Microsoft VS Code/bin"
|
||||||
|
_zed_bin="$_win_home/AppData/Local/Programs/Zed/bin"
|
||||||
|
[[ -d "$_vscode_bin" ]] && export PATH="$PATH:$_vscode_bin"
|
||||||
|
[[ -d "$_zed_bin" ]] && export PATH="$PATH:$_zed_bin"
|
||||||
|
fi
|
||||||
|
unset _win_user _win_home _vscode_bin _zed_bin
|
||||||
|
fi
|
||||||
|
|
||||||
# Language and encoding related
|
# Language and encoding related
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
|
|||||||
Reference in New Issue
Block a user