From d639ec8609c7e7673ac1a2a8d10db25f928bb1b5 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Mon, 26 Aug 2024 21:02:08 +0200 Subject: [PATCH] initialize existing program configurations --- PowerShell/Microsoft.PowerShell_profile.ps1 | 40 +++++++++++++++++++++ alacritty/alacritty.toml | 6 ++++ nvim/README.md | 5 ++- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 PowerShell/Microsoft.PowerShell_profile.ps1 create mode 100644 alacritty/alacritty.toml diff --git a/PowerShell/Microsoft.PowerShell_profile.ps1 b/PowerShell/Microsoft.PowerShell_profile.ps1 new file mode 100644 index 0000000..75aed95 --- /dev/null +++ b/PowerShell/Microsoft.PowerShell_profile.ps1 @@ -0,0 +1,40 @@ +# Get internet settings +$settings = Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings'; + +function Set-Proxy { + # Get proxy data from settings + $proxy_server = $settings.proxyServer; + + # Set proxy environment variables + $env:http_proxy = ($env:https_proxy = $proxy_server) + [System.Environment]::SetEnvironmentVariable('http_proxy', $proxy_server, 'User'); + [System.Environment]::SetEnvironmentVariable('https_proxy', $proxy_server, 'User'); + + # Set proxy git settings + git config --global http.proxy $proxy_server; + git config --global https.proxy $proxy_server; + + # Set proxy npm settings + npm config set proxy $proxy_server; + npm config set https-proxy $proxy_server; +} +Set-Alias -Name proxy-set -Value Set-Proxy + +function Unset-Proxy { + # Unset proxy environment variables + $env:http_proxy = ($env:https_proxy = '') + [System.Environment]::SetEnvironmentVariable('http_proxy', [NullString]::Value, 'User'); + [System.Environment]::SetEnvironmentVariable('https_proxy', [NullString]::Value, 'User'); + + # Unset proxy git settings + git config --global --unset http.proxy; + git config --global --unset https.proxy; + + # Delete proxy npm settings + npm config delete proxy; + npm config delete https-proxy; +} +Set-Alias -Name proxy-unset -Value Unset-Proxy + +if ($settings.proxyEnable -and (!$env:http_proxy)) { Set-Proxy } +elseif ((!$settings.proxyEnable) -and $env:http_proxy) { Unset-Proxy } diff --git a/alacritty/alacritty.toml b/alacritty/alacritty.toml new file mode 100644 index 0000000..117d974 --- /dev/null +++ b/alacritty/alacritty.toml @@ -0,0 +1,6 @@ +[shell] +program = "pwsh" +args = [ "-WorkingDirectory ~" ] + +[font] +normal = { family = "CaskaydiaCove Nerd Font Mono" } diff --git a/nvim/README.md b/nvim/README.md index 624022f..2293847 100644 --- a/nvim/README.md +++ b/nvim/README.md @@ -1,2 +1,5 @@ -# Neovim configuration +# Neovim Configuration +This configuration varies from this here standard. The actual Neovim configuration +can be found under a separate repository here. These files only serve as a reference +to all configurations that are to be installed in my personal configuration.