mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
minor fix
This commit is contained in:
parent
6a84917074
commit
e7e193d41b
1 changed files with 26 additions and 6 deletions
|
|
@ -27,11 +27,24 @@ IS_WSL=0
|
|||
WINDOWS_USER=""
|
||||
PACKAGE_MANAGER=""
|
||||
|
||||
# WSL detection
|
||||
# NOTE: This is NOT a POSIX-compliant way, for POSIX-compliant way, use case/esac
|
||||
if [[ "$(uname -r)" = *Microsoft* ]]; then
|
||||
echo "[INFO] Running on WSL1 Skipping GUI setup"
|
||||
IS_WSL=1
|
||||
if [[ "$(uname -r)" = *icrosoft* ]]; then
|
||||
echo "[INFO] Running on WSL"
|
||||
WINDOWS_USER="$(cmd.exe /c "echo %USERNAME%" | tr -d '\r')"
|
||||
IS_WSL=1
|
||||
fi
|
||||
|
||||
if [ "$IS_WSL" -eq 1 ]; then
|
||||
if [[ "$(uname -r)" = *Microsoft* ]]; then
|
||||
IS_WSL=1
|
||||
elif [[ "$(uname -r)" = *microsoft* ]]; then
|
||||
IS_WSL=2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$IS_WSL" -eq 1 ]; then
|
||||
echo "[INFO] Running on WSL1 Skipping GUI setup"
|
||||
else
|
||||
read -p "[ACTION] Do you want to setup Linux GUI? (y/N) " -r choice
|
||||
case "$choice" in
|
||||
|
|
@ -60,7 +73,16 @@ if [ "$WHEEL" -eq 1 ]; then
|
|||
PACKAGE_MANAGER="pacman"
|
||||
else
|
||||
echo "[ERROR] Unsupported package manager"
|
||||
exit 1
|
||||
read -p "[ACTION] Do you still want to continue? (y/N) " -r choice
|
||||
case "$choice" in
|
||||
y | Y)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
echo "[ERROR] Exiting"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -135,7 +157,6 @@ echo "[INFO] Installing Doom Emacs"
|
|||
|
||||
source "$DOTFILES"/bootstrap/components/emacs.sh
|
||||
|
||||
# TODO: Untestest
|
||||
if [ "$IS_WSL" -eq 1 ]; then
|
||||
ln -sf "/mnt/c/Users/$WINDOWS_USER" "$HOME/winhome"
|
||||
ln -sf "/mnt/c/Users/$WINDOWS_USER/Downloads" "$HOME/Downloads"
|
||||
|
|
@ -159,7 +180,6 @@ source "$DOTFILES"/bootstrap/linux/chromium-flags.bash
|
|||
|
||||
source "$DOTFILES"/bootstrap/components/rime.sh
|
||||
|
||||
# TODO: Rewrite the script(mocha_port.fish) in bash/zsh or POSIX-compliant shell
|
||||
echo "[INFO] Installing Color Scheme (Catppuccin Mocha)"
|
||||
|
||||
# fish $DOTFILES/bootstrap/temp/mocha_port.fish
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue