Skip to content

Commit

Permalink
added fonts and powershell customization
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhviid committed Jan 22, 2020
1 parent f8b1d37 commit 58d29db
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 28 deletions.
27 changes: 27 additions & 0 deletions add-fonts.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Installing cascadia code fonts (update them from https://github.com/microsoft/cascadia-code/releases)

$SourceDir = ".\supportfiles\fonts"
$Source = ".\supportfiles\fonts\*"
$Destination = (New-Object -ComObject Shell.Application).Namespace(0x14)
$TempFolder = "C:\Windows\Temp\Fonts"

# Create the source directory if it doesn't already exist
New-Item -ItemType Directory -Force -Path $SourceDir

New-Item $TempFolder -Type Directory -Force | Out-Null

Get-ChildItem -Path $Source -Include '*.ttf', '*.ttc', '*.otf' -Recurse | ForEach {
If (-not(Test-Path "C:\Windows\Fonts\$($_.Name)")) {

$Font = "$TempFolder\$($_.Name)"

# Copy font to local temporary folder
Copy-Item $($_.FullName) -Destination $TempFolder

# Install font
$Destination.CopyHere($Font, 0x10)

# Delete temporary copy of font
Remove-Item $Font -Force
}
}
5 changes: 5 additions & 0 deletions install-1-managers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Set-Location ~\Downloads\
Invoke-WebRequest https://dl.appget.net/appget/appget.setup.exe -o appget.exe
./appget.exe /sp- /silent /norestart

# Installing modules for a fancy powershell
Install-Module -Name posh-git -Scope CurrentUser
Install-Module -Name oh-my-posh -Scope CurrentUser

# install WSL features
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Write-Output 'Please reboot for applications to register, and then run "install-2-applications.ps1"'
40 changes: 12 additions & 28 deletions install-2-applications.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,24 @@ git config --global user.email "[email protected]"
scoop install aria2 sudo
scoop bucket add extras
scoop bucket add java
scoop bucket add nerd-fonts
scoop bucket add specialized https://github.com/jakobhviid/scoop-specialized
scoop install curl grep nano vim make say tar sudo micro coreutils git tidy oraclejre8 vlc 7zip paint.net vscode gitkraken filezilla sqlitebrowser putty anaconda3 nodejs python go sharpkeys nssm draw.io ssh-copy-id perl terminus plex-player latex speedtest-cli
scoop install curl grep nano vim make say tar sudo micro coreutils git tidy oraclejre8 vlc 7zip paint.net vscode gitkraken filezilla sqlitebrowser putty anaconda3 nodejs python go sharpkeys nssm draw.io ssh-copy-id perl terminus plex-player latex speedtest-cli

# Installing Visual Studio Code Sync Extension and the themes
code --install-extension shan.code-settings-sync
code --install-extension pkief.material-icon-theme
code --install-extension equinusocio.vsc-material-theme

# Bling for powershell console
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox

Add-Content $profile "Import-Module posh-git"
Add-Content $profile "Import-Module oh-my-posh"
Add-Content $profile "Set-Theme Paradox"

# Adding registry fixes
regedit /s ./supportfiles/FixGitKraken.reg
regedit /s ./supportfiles/DisableNetworkDriveWarning.reg
Expand All @@ -43,30 +53,4 @@ cpan -f -i Log::Log4perl
# extra apps for scientific work
scoop install protege

# Installing cascadia code fonts (update them from https://github.com/microsoft/cascadia-code/releases)

$SourceDir = ".\supportfiles\fonts"
$Source = ".\supportfiles\fonts\*"
$Destination = (New-Object -ComObject Shell.Application).Namespace(0x14)
$TempFolder = "C:\Windows\Temp\Fonts"

# Create the source directory if it doesn't already exist
New-Item -ItemType Directory -Force -Path $SourceDir

New-Item $TempFolder -Type Directory -Force | Out-Null

Get-ChildItem -Path $Source -Include '*.ttf', '*.ttc', '*.otf' -Recurse | ForEach {
If (-not(Test-Path "C:\Windows\Fonts\$($_.Name)")) {

$Font = "$TempFolder\$($_.Name)"

# Copy font to local temporary folder
Copy-Item $($_.FullName) -Destination $TempFolder

# Install font
$Destination.CopyHere($Font, 0x10)

# Delete temporary copy of font
Remove-Item $Font -Force
}
}
./add-fonts.ps1
Binary file added supportfiles/fonts/Delugia.Nerd.Font.Complete.ttf
Binary file not shown.
Binary file added supportfiles/fonts/Delugia.Nerd.Font.ttf
Binary file not shown.

0 comments on commit 58d29db

Please sign in to comment.