mirror of
https://github.com/Baipyrus/dotfiles.git
synced 2024-12-27 03:41:45 +00:00
Compare commits
No commits in common. "fb056c3505c7b823d2baf63df7857bda1b6a512e" and "644908d856f320cb342e2ffcd97056113969d6a5" have entirely different histories.
fb056c3505
...
644908d856
48
README.md
48
README.md
@ -11,54 +11,6 @@ directory. Below is a brief overview of the programs and configurations included
|
||||
- **nerd-fonts**: [Nerd Fonts installation](./nerd-fonts)
|
||||
- **nvim**: [Neovim configuration](./nvim)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
While the installation of these dotfiles may not require the use of any external
|
||||
tools, it is still necessary to install all the main applications that are being
|
||||
configured, as seen in [Structure](#structure), and other tools needed for development.
|
||||
These tools include the following for Windows Installs (Recommended using [Chocolatey](https://chocolatey.org/)):
|
||||
|
||||
- [Neovim](https://neovim.io/)
|
||||
- [Neovide](https://neovide.dev/)
|
||||
- [Alacritty](https://alacritty.org/)
|
||||
- [PowerShell 7](https://github.com/PowerShell/PowerShell)
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
- [Make/CMake](https://cmake.org/)
|
||||
- [Unzip](https://community.chocolatey.org/packages/unzip)
|
||||
- [Build Tools](https://github.com/bycloudai/InstallVSBuildToolsWindows)/[MinGW](https://www.mingw-w64.org/downloads/)
|
||||
- [Rustup](https://www.rust-lang.org/tools/install)
|
||||
- [Golang](https://go.dev/dl/)
|
||||
- [NodeJS](https://nodejs.org/en)
|
||||
- [Dotnet](https://dotnet.microsoft.com/en-us/)
|
||||
- [Python](https://www.python.org/)
|
||||
- [Composer](https://getcomposer.org/)
|
||||
|
||||
<details><summary>Windows Subsystem for Linux</summary>
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
curl -fsSL https://deb.nodesource.com/setup_lts.x -o nodesource_setup.sh
|
||||
sudo -E bash nodesource_setup.sh
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||
sudo apt install make gcc ripgrep unzip git xclip neovim nodejs python3-venv
|
||||
curl https://sh.rustup.rs -sSf | sh
|
||||
curl -LO https://go.dev/dl/go1.23.2.linux-amd64.tar.gz
|
||||
sudo rm -rf /usr/local/go
|
||||
sudo tar -C /usr/local -xzf go1.23.2.linux-amd64.tar.gz
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Winget and Chocolatey</summary>
|
||||
|
||||
```pwsh
|
||||
winget install chocolatey.chocolatey Neovide.Neovide Alacritty.Alacritty Git.Git GoLang.Go Microsoft.DotNet.SDK.8 OpenJS.NodeJS.LTS Python.Python.3.12 Rustlang.Rustup
|
||||
choco install neovim ripgrep curl wget fd unzip gzip mingw make
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Installation
|
||||
|
||||
To use these configurations, clone this repository and copy or symlink the necessary
|
||||
|
@ -117,7 +117,7 @@ function ProcessUrlFiles
|
||||
}
|
||||
|
||||
Write-Host "Downloading $fileName from $url$conditional..." -ForegroundColor Cyan
|
||||
Invoke-RestMethod $url -OutFile $fileName$extension
|
||||
curl -LO $url
|
||||
$tmpDestination = "$tmpApp\$fileName$extension"
|
||||
|
||||
# Copy only if destination is provided
|
||||
@ -126,12 +126,6 @@ function ProcessUrlFiles
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
# Use $tmpApp as destination in case of git repo
|
||||
if (-not $destinationDir)
|
||||
{ $destinationPath = "$tmpApp\$fileName"
|
||||
}
|
||||
|
||||
# If the URL is a git repository, pull it
|
||||
if (IsGitRepository -dir $destinationPath -url $url)
|
||||
{
|
||||
@ -155,36 +149,24 @@ CopyFileWithPrompt "$dotfilesRepo\alacritty\alacritty.toml" "$alacrittyConfigDir
|
||||
|
||||
# Setting up Neovim Configuration
|
||||
Write-Host "Setting up Neovim configuration..." -ForegroundColor Cyan
|
||||
$ubuntu = wsl.exe -l --all | Where-Object { $_.Replace("`0", "") -match '^Ubuntu' }
|
||||
if ($null -eq $ubuntu)
|
||||
{ ProcessUrlFiles -sourceDir "$dotfilesRepo\nvim" -destinationDir "$env:LOCALAPPDATA"
|
||||
} else
|
||||
{
|
||||
# TODO: Expand into generic WSL setup while installing required dev tools
|
||||
ProcessUrlFiles -sourceDir "$dotfilesRepo\nvim"
|
||||
Set-Location "$env:TMP\nvim-config"
|
||||
Write-Host "Copying (forcably) configuration to WSL..." -ForegroundColor Yellow
|
||||
wsl.exe cp -rf . ~/.config/ 2>$null | Out-Null
|
||||
Set-Location -
|
||||
}
|
||||
ProcessUrlFiles -sourceDir "$dotfilesRepo\nvim" -destinationDir "$env:LOCALAPPDATA"
|
||||
|
||||
# Setting up PowerShell Profile
|
||||
Write-Host "Setting up PowerShell profile..." -ForegroundColor Cyan
|
||||
CopyFileWithPrompt "$dotfilesRepo\PowerShell\Microsoft.PowerShell_profile.ps1" $psProfile
|
||||
|
||||
# Setting up self-made ProxySwitcher
|
||||
Write-Host "============================================" -ForegroundColor DarkGray
|
||||
Write-Host "Setting up ProxySwitcher via subscript..." -ForegroundColor Cyan
|
||||
Write-Host "Setting up ProxySwitcher..." -ForegroundColor Cyan
|
||||
Invoke-RestMethod 'https://raw.githubusercontent.com/Baipyrus/ProxySwitcher/main/install.ps1' | Invoke-Expression
|
||||
Write-Host "============================================" -ForegroundColor DarkGray
|
||||
|
||||
function UnzipAndInstall
|
||||
{
|
||||
param (
|
||||
[string]$source
|
||||
[string]$source,
|
||||
[string]$path
|
||||
)
|
||||
|
||||
# Create temporary directory for unzip
|
||||
# Create temporary directory for curl
|
||||
$appname = $source.Split('\')[-1]
|
||||
$tmpApp = "$env:TMP\$appname-config"
|
||||
if (-not (Test-Path $tmpApp))
|
||||
@ -208,7 +190,7 @@ function UnzipAndInstall
|
||||
# Installing Nerd Fonts
|
||||
Write-Host "Installing Nerd Fonts..." -ForegroundColor Cyan
|
||||
ProcessUrlFiles -sourceDir "$dotfilesRepo\nerd-fonts" -fileExt ".zip"
|
||||
UnzipAndInstall -source "$dotfilesRepo\nerd-fonts"
|
||||
UnzipAndInstall -source "$dotfilesRepo\nerd-fonts" -path "$env:TMP\nerd-fonts-config"
|
||||
|
||||
# Final message
|
||||
Write-Host "Windows setup complete!" -ForegroundColor Green
|
||||
|
Loading…
Reference in New Issue
Block a user