From a5491ea10823b7625d686c988826d00a6cc2e0ca Mon Sep 17 00:00:00 2001 From: TheFlyingFool Date: Mon, 10 Jun 2024 17:58:05 -0500 Subject: [PATCH] Trying branches per OS --- README.md | 52 ------------------------ windows/Microsoft.PowerShell_profile.ps1 | 15 ------- windows/Microsoft.VSCode_profile.ps1 | 9 ---- windows/aliases.ps1 | 7 ---- 4 files changed, 83 deletions(-) delete mode 100644 README.md delete mode 100644 windows/Microsoft.PowerShell_profile.ps1 delete mode 100644 windows/Microsoft.VSCode_profile.ps1 delete mode 100644 windows/aliases.ps1 diff --git a/README.md b/README.md deleted file mode 100644 index ff8a398..0000000 --- a/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# dotfiles - -My dotfiles for both Arch Linux and Windows - -## Useage on Linux - -### Checking out the repo - -```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 -``` - -If there are conflicts: - -```sh -mkdir -p .dot-backup && \ -dot checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \ -xargs -I{} mv {} .dot-backup/{} -dot checkout -``` - -### Managing dotfiles - -**Adding or Modifying files** - -```sh -dot add .zshrc -dot commit -m "Update .zshrc" -dot push -``` - -## Useage on Windows - -### Checking out the repo - -```ps1 -PowerShell -NoProfile -ExecutionPolicy Bypass -git clone --bare https://git.theflyingfool.com/theflyingfool/dotfiles.git $HOME/.dot -if (!(Test-Path -Path $PROFILE)) { - # Create the profile - New-Item -Type File -Path $PROFILE -Force -} -"`nfunction dot { & git --git-dir=`"$HOME/.dot/`" --work-tree=`"$HOME`" @args }" | Out-File -Append $PROFILE -. $PROFILE -dot checkout -dot config --local status.showUntrackedFiles no -"`n. `"$HOME/windows/Microsoft.PowerShell_profile.ps1`"" | Out-File -Append $PROFILE -``` diff --git a/windows/Microsoft.PowerShell_profile.ps1 b/windows/Microsoft.PowerShell_profile.ps1 deleted file mode 100644 index 9e8d80b..0000000 --- a/windows/Microsoft.PowerShell_profile.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock { - param($wordToComplete, $commandAst, $cursorPosition) - [Console]::InputEncoding = [Console]::OutputEncoding = $OutputEncoding = [System.Text.Utf8Encoding]::new() - $Local:word = $wordToComplete.Replace('"', '""') - $Local:ast = $commandAst.ToString().Replace('"', '""') - winget complete --word="$Local:word" --commandline "$Local:ast" --position $cursorPosition | ForEach-Object { - [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) - } - } - - -function dot { & git --git-dir="$HOME/.dot/" --work-tree="$HOME" @args } - -# Source the aliases.ps1 file -. "$PSScriptRoot/aliases.ps1" diff --git a/windows/Microsoft.VSCode_profile.ps1 b/windows/Microsoft.VSCode_profile.ps1 deleted file mode 100644 index b841b2d..0000000 --- a/windows/Microsoft.VSCode_profile.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock { - param($wordToComplete, $commandAst, $cursorPosition) - [Console]::InputEncoding = [Console]::OutputEncoding = $OutputEncoding = [System.Text.Utf8Encoding]::new() - $Local:word = $wordToComplete.Replace('"', '""') - $Local:ast = $commandAst.ToString().Replace('"', '""') - winget complete --word="$Local:word" --commandline "$Local:ast" --position $cursorPosition | ForEach-Object { - [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) - } - } diff --git a/windows/aliases.ps1 b/windows/aliases.ps1 deleted file mode 100644 index 8030e1f..0000000 --- a/windows/aliases.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -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