mirror of
https://github.com/Baipyrus/dotfiles.git
synced 2024-12-25 10:51:46 +00:00
Compare commits
12 Commits
644908d856
...
fb056c3505
Author | SHA1 | Date | |
---|---|---|---|
fb056c3505 | |||
4383f46e56 | |||
d84cd62673 | |||
f4f24ce525 | |||
8e24843856 | |||
1e01a70182 | |||
c90d46ef6c | |||
7d8872d70d | |||
7378dacaa5 | |||
4598bfe8d0 | |||
2429e27e43 | |||
8e590c7f29 |
48
README.md
48
README.md
@ -11,6 +11,54 @@ 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
|
||||
curl -LO $url
|
||||
Invoke-RestMethod $url -OutFile $fileName$extension
|
||||
$tmpDestination = "$tmpApp\$fileName$extension"
|
||||
|
||||
# Copy only if destination is provided
|
||||
@ -126,6 +126,12 @@ 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)
|
||||
{
|
||||
@ -149,24 +155,36 @@ CopyFileWithPrompt "$dotfilesRepo\alacritty\alacritty.toml" "$alacrittyConfigDir
|
||||
|
||||
# Setting up Neovim Configuration
|
||||
Write-Host "Setting up Neovim configuration..." -ForegroundColor Cyan
|
||||
ProcessUrlFiles -sourceDir "$dotfilesRepo\nvim" -destinationDir "$env:LOCALAPPDATA"
|
||||
$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 -
|
||||
}
|
||||
|
||||
# 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 "Setting up ProxySwitcher..." -ForegroundColor Cyan
|
||||
Write-Host "============================================" -ForegroundColor DarkGray
|
||||
Write-Host "Setting up ProxySwitcher via subscript..." -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]$path
|
||||
[string]$source
|
||||
)
|
||||
|
||||
# Create temporary directory for curl
|
||||
# Create temporary directory for unzip
|
||||
$appname = $source.Split('\')[-1]
|
||||
$tmpApp = "$env:TMP\$appname-config"
|
||||
if (-not (Test-Path $tmpApp))
|
||||
@ -190,7 +208,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" -path "$env:TMP\nerd-fonts-config"
|
||||
UnzipAndInstall -source "$dotfilesRepo\nerd-fonts"
|
||||
|
||||
# Final message
|
||||
Write-Host "Windows setup complete!" -ForegroundColor Green
|
||||
|
Loading…
Reference in New Issue
Block a user