-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.ps1
More file actions
39 lines (32 loc) · 1.58 KB
/
setup.ps1
File metadata and controls
39 lines (32 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Ensure the script can run with elevated privileges - Code from CTT
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "Please run this script as an Administrator!"
break
}
## Install Chris Titus' profile first
irm "https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1" | iex
## Install other programs
# Scoop install
if (-not (Get-Command scoop -ErrorAction SilentlyContinue)) {
Write-Host "Scoop is not installed. Installing Scoop..."
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
} else {
Write-Host "Scoop is already installed."
}
# Make Scoop downloads faster
scoop install aria2
scoop config aria2-warning-enabled false
# Add extras bucket in scoop
scoop install git
scoop bucket add extras
# Fastfetch install
scoop install fastfetch
Rename-Item -Path "~/.config/fastfetch/config.jsonc" -NewName ("config." + (Get-Date -Format 'dd-MM-yyyy.HH.mm.ss') + ".jsonc") -erroraction 'silentlycontinue'
fastfetch --gen-config
del ~\.config\fastfetch\config.jsonc
Copy-Item -Path ~\scoop\apps\fastfetch\current\presets\paleofetch.jsonc -Destination ~/.config/fastfetch/config.jsonc
# pacman-apt
irm cutt.ly/pacman-apt | iex
## Install my profile
Rename-Item -Path $PROFILE.CurrentUserAllHosts -NewName ("profile." + (Get-Date -Format 'dd-MM-yyyy.HH.mm.ss') + ".ps1") -erroraction 'silentlycontinue'
irm https://raw.githubusercontent.com/ShadowElixir/better-powershell-profile/main/profile.ps1 >> $PROFILE.CurrentUserAllHosts