dotfiles/README.md

53 lines
1.2 KiB
Markdown
Raw Normal View History

2024-06-09 16:52:42 -05:00
# dotfiles
2024-06-09 17:40:46 -05:00
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"'
2024-06-10 18:00:48 -05:00
dot checkout -b Linux
2024-06-10 17:17:01 -05:00
dot config --local status.showUntrackedFiles no
2024-06-09 17:40:46 -05:00
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
2024-06-09 17:41:09 -05:00
**Adding or Modifying files**
2024-06-09 17:40:46 -05:00
```sh
dot add .zshrc
dot commit -m "Update .zshrc"
dot push
```
## Useage on Windows
### Checking out the repo
2024-06-10 17:17:01 -05:00
```ps1
2024-06-10 16:27:05 -05:00
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
2024-06-10 18:00:48 -05:00
dot checkout -b Windows
dot config --local status.showUntrackedFiles no
"`n. `"$HOME/windows/Microsoft.PowerShell_profile.ps1`"" | Out-File -Append $PROFILE
2024-06-10 17:17:01 -05:00
```