From 65e386acacdfd26b829d33ab191bf7c24d231836 Mon Sep 17 00:00:00 2001 From: TheFlyingFool Date: Mon, 10 Jun 2024 17:17:01 -0500 Subject: [PATCH] started cleaning up windows files --- README.md | 7 ++++--- windows/Microsoft.PowerShell_profile.ps1 | 7 +++---- windows/aliases.ps1 | 7 +++++++ windows/dot.ps1 | 6 ------ 4 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 windows/aliases.ps1 delete mode 100644 windows/dot.ps1 diff --git a/README.md b/README.md index 6dbd754..ff8a398 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,8 @@ My dotfiles for both Arch Linux and Windows ```sh git clone --bare gitea@git.theflyingfool.com:theflyingfool/dotfiles.git $HOME/.dot alias dot='/usr/bin/git --git-dir="$HOME/.dot/" --work-tree="$HOME"' - +dot checkout +dot config --local status.showUntrackedFiles no source ~/.zshrc ``` @@ -36,7 +37,7 @@ dot push ### Checking out the repo -```ps +```ps1 PowerShell -NoProfile -ExecutionPolicy Bypass git clone --bare https://git.theflyingfool.com/theflyingfool/dotfiles.git $HOME/.dot if (!(Test-Path -Path $PROFILE)) { @@ -48,4 +49,4 @@ if (!(Test-Path -Path $PROFILE)) { dot checkout dot config --local status.showUntrackedFiles no "`n. `"$HOME/windows/Microsoft.PowerShell_profile.ps1`"" | Out-File -Append $PROFILE -``` \ No newline at end of file +``` diff --git a/windows/Microsoft.PowerShell_profile.ps1 b/windows/Microsoft.PowerShell_profile.ps1 index 1fb83a5..9e8d80b 100644 --- a/windows/Microsoft.PowerShell_profile.ps1 +++ b/windows/Microsoft.PowerShell_profile.ps1 @@ -9,8 +9,7 @@ Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock { } -function touch($file) { - "" | Out-File $file -Encoding ASCII -} +function dot { & git --git-dir="$HOME/.dot/" --work-tree="$HOME" @args } -function dot { & git --git-dir="C:\Users\User/.dot/" --work-tree="C:\Users\User" @args } \ No newline at end of file +# Source the aliases.ps1 file +. "$PSScriptRoot/aliases.ps1" diff --git a/windows/aliases.ps1 b/windows/aliases.ps1 new file mode 100644 index 0000000..8030e1f --- /dev/null +++ b/windows/aliases.ps1 @@ -0,0 +1,7 @@ +function Upgrade-All { winget upgrade --all } + +Set-Alias -Name Syu -Value Upgrade-All + +function touch($file) { + "" | Out-File $file -Encoding ASCII +} \ No newline at end of file diff --git a/windows/dot.ps1 b/windows/dot.ps1 deleted file mode 100644 index 217f49a..0000000 --- a/windows/dot.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -param ( - [Parameter(ValueFromRemainingArguments = $true)] - [string[]]$args -) - -& git --git-dir=$env:USERPROFILE\.dot --work-tree=$env:USERPROFILE @args