blob: 6d10e308906b3061c5e5f7d31848fa1595a1db9c (
plain)
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
|
# # Ask if using VPN
# $usingvpn = Read-Host -Prompt "Are you using the VPN? (y/n)"
# if ($usingvpn -eq 'y') {
# $env:HTTP_PROXY="http://proxy.cat.com:80"
# $env:HTTPS_PROXY="http://proxy.cat.com:80"
# } else {
# $env:HTTP_PROXY=""
# $env:HTTPS_PROXY=""
# }
#
# Load Oh-My-Posh theme
# oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression
# oh-my-posh init pwsh --config "C:\Users\muftei\AppData\Local\Programs\oh-my-posh\themes\kali.omp.json" | Invoke-Expression
# Use some cool icons
Import-Module -Name Terminal-Icons
$env:XDG_CONFIG_HOME="C:/Users/muftei/.config"
$env:XDG_DATA_HOME="C:/Users/muftei/.local/share"
$env:XDG_STATE_HOME="C:/Users/muftei/.local/state"
$env:EDITOR="nvim"
# Git autocompletion for Powershell
Import-Module -Name posh-git
# Fuzzy find my project files
Set-PSReadlineKeyHandler -Key "Ctrl+f" -ScriptBlock {
Invoke-Expression "cd $(fd . 'C:\Users\muftei\Documents\Repos\' 'C:\Users\muftei\AppData\Local\' 'C:\Users\muftei\.config\' -t d -d 1 | fzf)"
# Next two lines sends an 'enter' key
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
}
# Load Starship prompt
Invoke-Expression (&starship init powershell)
|