Use XDG Standard

This commit is contained in:
js0ny 2024-11-01 12:37:02 +00:00
parent fbe6495c85
commit 68892183bc
8 changed files with 17 additions and 12 deletions

View file

@ -1,5 +1,7 @@
# $XDG_CONFIG_HOME/conda/condarc.yaml # $XDG_CONFIG_HOME/conda/condarc.yaml
# New-Item -ItemType SymbolicLink -Path ~\.condarc -Target ~\.dotfiles\.config\conda\condarc.yaml # ==================================================================
# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME\conda\.condarc -Target $DOTFILES\.config\conda\condarc.yaml
# ln -s $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc # ln -s $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc
# Reference: https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html # ==================================================================
auto_activate_base: false # https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html
auto_activate_base: false

View file

@ -4,5 +4,5 @@
- `j->e`, `k->n`, `h->h`, `l->i` - `j->e`, `k->n`, `h->h`, `l->i`
```sh ```sh
ln -s $DOTFILES/.config/nvim/ ~/.config/nvim ln -sf $DOTFILES/.config/nvim/ $XDG_CONFIG_HOME/nvim
``` ```

View file

@ -1,5 +1,5 @@
# ~/.config/zsh/.zshrc # $XDG_CONFIG_HOME/zsh/.zshrc
# ln -s $DOTFILES/mac/.zshrc ~/.config/zsh/.zshrc # ln -s $DOTFILES/mac/.zshrc $XDG_CONFIG_HOME/zsh/.zshrc
### Variables ### ### Variables ###
export DOTFILES="$HOME/.dotfiles" export DOTFILES="$HOME/.dotfiles"

View file

@ -1,3 +1,5 @@
# $XDG_CONFIG_HOME/powershell/Microsoft.PowerShell_profile.ps1
# ln -sf $DOTFILES/mac/Microsoft.PowerShell_profile.ps1 $XDG_CONFIG_HOME/powershell/Microsoft.PowerShell_profile.ps1
### Variables ### ### Variables ###
$DOTFILES = "$HOME\.dotfiles" $DOTFILES = "$HOME\.dotfiles"

View file

@ -60,7 +60,7 @@ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH/custom/p
source $XDG_CONFIG_HOME/zsh/.zshrc source $XDG_CONFIG_HOME/zsh/.zshrc
echo [INFO] Setting Up dotfiles echo [INFO] Setting Up dotfiles
mkdir -p $XDG_CONFIG_HOME/conda $XDG_CONFIG_HOME/nvim $XDG_CONFIG_HOME/git $XDG_CONFIG_HOME/ideavim $XDG_CONFIG_HOME/markdownlint $XDG_CONFIG_HOME/pip $XDG_CONFIG_HOME/neovide $XDG_CONFIG_HOME/powershell $XDG_CONFIG_HOME/vscode mkdir -p $XDG_CONFIG_HOME/conda $XDG_CONFIG_HOME/git $XDG_CONFIG_HOME/ideavim $XDG_CONFIG_HOME/markdownlint $XDG_CONFIG_HOME/pip $XDG_CONFIG_HOME/neovide $XDG_CONFIG_HOME/powershell $XDG_CONFIG_HOME/vscode
mkdir -p ~/.config/zellij # Not support XDG_CONFIG_HOME but same directory mkdir -p ~/.config/zellij # Not support XDG_CONFIG_HOME but same directory
ln -sf $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc ln -sf $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc
ln -sf $DOTFILES/.config/git/config $XDG_CONFIG_HOME/git/config ln -sf $DOTFILES/.config/git/config $XDG_CONFIG_HOME/git/config
@ -74,6 +74,7 @@ ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf
ln -sf $DOTFILES/mac/neovide.toml $XDG_CONFIG_HOME/neovide/config.toml ln -sf $DOTFILES/mac/neovide.toml $XDG_CONFIG_HOME/neovide/config.toml
ln -sf $DOTFILES/mac/Microsoft.PowerShell_profile.ps1 $XDG_CONFIG_HOME/powershell/Microsoft.PowerShell_profile.ps1 ln -sf $DOTFILES/mac/Microsoft.PowerShell_profile.ps1 $XDG_CONFIG_HOME/powershell/Microsoft.PowerShell_profile.ps1
ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode.vimrc ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode.vimrc
ln -sf $DOTFILES/.config/nvim/ $XDG_CONFIG_HOME/nvim
# Brew # Brew
echo [INFO] Installing Homebrew echo [INFO] Installing Homebrew

View file

@ -1,6 +1,6 @@
" ~/.config/vscode/vscode.vimrc " $XDG_CONFIG_HOME/vscode/vscode.vimrc
" New-Item -ItemType SymbolicLink -Path ~\.config\vscode\vscode.vimrc -Target ~\.dotfiles\vscode\vscode.vimrc " New-Item -ItemType SymbolicLink -Path ~\.config\vscode\vscode.vimrc -Target ~\.dotfiles\vscode\vscode.vimrc
" ln -sf $DOTFILES/vscode/vscode.vimrc ~/.config/vscode/vscode.vimrc " ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode/vscode.vimrc
" And go to vscode vim setting: " And go to vscode vim setting:
"vim.vimrc.path": "$HOME/.config/vscode/vscode.vimrc", "vim.vimrc.path": "$HOME/.config/vscode/vscode.vimrc",

View file

@ -1,5 +1,5 @@
# ~/.config/zsh/.zshrc # $XDG_CONFIG_HOME/zsh/.zshrc
# ln -s $DOTFILES/wsl/.zshrc ~/.config/zsh/.zshrc # ln -s $DOTFILES/wsl/.zshrc $XDG_CONFIG_HOME/zsh/.zshrc
### Variables ### ### Variables ###
export DOTFILES="$HOME/.dotfiles" export DOTFILES="$HOME/.dotfiles"

View file

@ -13,7 +13,7 @@ alias bashcfg="nvim ~/.bashrc"
alias zshcfg="nvim ~/.zshrc" alias zshcfg="nvim ~/.zshrc"
alias shcfg=zshcfg alias shcfg=zshcfg
alias reload="source ~/.zshrc" alias reload="source ~/.zshrc"
alias nvimrc="nvim ~/.config/nvim/" alias nvimrc="nvim $XDG_CONFIG_HOME/nvim/"
alias ohmyzsh="code ~/.oh-my-zsh" alias ohmyzsh="code ~/.oh-my-zsh"
alias pulldots="cd $DOTFILES && git pull" alias pulldots="cd $DOTFILES && git pull"