Update dotfiles to reflect current setup as of 2026-02-23

This commit is contained in:
Riz Ashraf
2026-02-23 03:17:51 +00:00
parent 691a8dfd29
commit d33f6ebc05
7 changed files with 545 additions and 48 deletions
@@ -1,3 +1,7 @@
# Default file encoding to UTF-8 (no BOM)
$OutputEncoding = [System.Text.UTF8Encoding]::new($false)
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
# Prioritize Scoop shims
$scoopShims = "$env:USERPROFILE\scoop\shims"
if ($env:Path -notlike "$scoopShims*") {
@@ -11,10 +15,14 @@ if ($env:Path -notlike "$scoopShims*") {
$env:YAZI_FILE_ONE = 'C:\Program Files\Git\usr\bin\file.exe'
$env:POSH_GIT_ENABLED = $true
$env:POSH_GIT_ENABLED = $false
$env:POSH_THEME = "$env:POSH_THEMES_PATH\nordtron.omp.json"
oh-my-posh --init --shell pwsh --config $env:POSH_THEME | Invoke-Expression
Import-Module Terminal-Icons
Import-Module DockerCompletion
Import-Module CompletionPredictor
Set-PSReadLineKeyHandler -Chord 'Ctrl+Spacebar' -Function MenuComplete
#Set-PSReadLineKeyHandler -Key Tab -ScriptBlock { Invoke-FzfTabCompletion }
Set-PSReadlineKeyHandler -Key Shift+Tab -Function TabCompletePrevious
@@ -29,7 +37,6 @@ Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
#Set-PSReadLineOption -EditMode Windows
Set-PSReadlineOption -EditMode Vi
Set-PSReadLineOption -ViModeIndicator Cursor
@@ -140,6 +147,7 @@ Set-Alias -Name g -Value git
Set-Alias -Name cat -Value bat
Set-Alias -Name fork -Value 'C:\Users\reazul.ashraf\AppData\Local\Fork\Fork.exe'
Set-Alias -Name winfetch -Value pwshfetch-test-1
Set-Alias -Name ocgv -Value Out-ConsoleGridView
function vcvars {
&'C:\Program Files\Microsoft Visual Studio\18\Community\Common7\Tools\Launch-VsDevShell.ps1' -SkipAutomaticLocation
@@ -174,14 +182,12 @@ function acl {
}
function jdk8home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-8.0.472.8-hotspot" }
function jdk8home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-8.0.482.8-hotspot" }
function jdk8home32 { $env:JAVA_HOME="C:\Program Files (x86)\Eclipse Adoptium\jdk-8.0.472.8-hotspot" }
function jdk21home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-21.0.9.10-hotspot" }
function jdk25home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-25.0.1.8-hotspot" }
function jdk21home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-21.0.10.7-hotspot" }
function jdk25home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-25.0.2.10-hotspot" }
function java { &$env:JAVA_HOME/bin/java.exe $args }
# set java home
jdk21home
function gemini { $env:NODE_OPTIONS="$env:NODE_OPTIONS --no-deprecation"; gemini.ps1}
function sonarscan {
pwsh -Command {
@@ -190,6 +196,7 @@ function sonarscan {
if ($null -eq $branch) { exit }
$env:MAVEN_OPTS="-Dsonar.dependencyCheck.htmlReportPath=target/dependency-check-report.html -Dsonar.dependencyCheck.jsonReportPath=target/dependency-check-report.json -Dsonar.branch.name=$branch"
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:RELEASE:sonar -DskipTests -Drevision="$Env:USERNAME-$Env:COMPUTERNAME"
New-BurntToastNotification -Text "Sonar Scan Complete", "Branch: $branch"
}
}
@@ -198,6 +205,7 @@ function owaspdepcheck {
jdk25home
$env:MAVEN_OPTS="-Djdk.util.zip.disableZip64ExtraFieldValidation=true"
mvn -B org.owasp:dependency-check-maven:RELEASE:aggregate -DskipTests -Dformats='XML,JSON,HTML' -DnvdApiKey=b00166ac-5422-402e-830c-998beba0265d
New-BurntToastNotification -Text "OWASP Dependency Check Complete"
}
}
@@ -205,8 +213,21 @@ function owaspdepcheck {
# squash all commits into one
function gsquash { &git reset --soft HEAD~$(git rev-list --count HEAD ^$args) }
# Initialize a project for gemini-cli
function ginit {
&git init
&git checkout -b gemini-cli
Write-Host "Initialized git repository on 'gemini-cli' branch." -ForegroundColor Cyan
}
# set java home
jdk25home
$env:EDITOR = 'nvim'
$env:VISUAL = 'nvim'
$env:LESS = '-R -F -X'
$env:BAT_PAGER = 'less -R -F -X'
$env:DOCKER_HOST = "tcp://127.0.0.1:2375"
$env:GEMINI_API_KEY = 'inse-r-and-d' # Added by Gemini CLI
fnm env --use-on-cd | Out-String | Invoke-Expression