From d97cf649f6767d4564957edaed289c7d867eb9c8 Mon Sep 17 00:00:00 2001 From: habiwan Date: Sun, 29 Mar 2026 12:41:50 +0100 Subject: [PATCH] Auto-sync Windows: 2026-03-29 12:41 --- Microsoft.PowerShell_profile.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Microsoft.PowerShell_profile.ps1 b/Microsoft.PowerShell_profile.ps1 index c8371a5..43e06cf 100644 --- a/Microsoft.PowerShell_profile.ps1 +++ b/Microsoft.PowerShell_profile.ps1 @@ -9,3 +9,16 @@ function fixomp { } fastfetch --logo "$HOME\hwk.txt" oh-my-posh init pwsh | Invoke-Expression + +function Sync-Shells { + Set-Location "C:\src\dotfiles" + Write-Host "Updating from GitHub..." -ForegroundColor Cyan + git pull origin main + Write-Host "Backing up Windows config..." -ForegroundColor Cyan + git add . + git commit -m "Auto-sync Windows: $(Get-Date -Format 'yyyy-MM-dd HH:mm')" + git push origin main + Write-Host "Done! System is in sync." -ForegroundColor Green + Set-Location $HOME +} +New-Alias -Name sync -Value Sync-Shells -Force \ No newline at end of file