diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 727c06c..8b23714 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -1,3 +1,5 @@ +# $XDG_CONFIG_HOME/tmux/tmux.conf +# ln -sf $DOTFILES/.config/tmux/tmux.conf $XDG_CONFIG_HOME/tmux/tmux.conf # Prefix # ----------------- set-option -g prefix C-x diff --git a/mac/mac_setup.sh b/mac/mac_setup.sh index e17de3f..a6534f3 100644 --- a/mac/mac_setup.sh +++ b/mac/mac_setup.sh @@ -59,32 +59,43 @@ defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool echo "[INFO] Setting Up Dotfiles" export DOTFILES="$HOME/.dotfiles" git clone https://www.github.com/js0ny/dotfiles.git ~/.dotfiles -ln -sf $DOTFILES/zsh/.zshenv ~/.zshenv -echo "[INFO] 'source ~/.zshenv' to use XDG_CONFIG_HOME" -source ~/.zshenv +sudo cp ~/.dotfiles/zsh/.zshenv /etc/zshenv +echo "[INFO] 'source etc/zshenv' to use XDG_CONFIG_HOME" +source /etc/zshenv # export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" # export ZDOTDIR="${XDG_CONFIG_HOME}/zsh" echo "[INFO] Setting Up Zsh for Initial Use" -ln -sf $DOTFILES/zsh/.zshenv ~/.zshenv -ln -sf $DOTFILES/mac/.zshrc $XDG_CONFIG_HOME/zsh/.zshrc -source $XDG_CONFIG_HOME/zsh/.zshrc +mkdir -p $ZDOTDIR +ln -sf $DOTFILES/zsh/.zshenv $ZDOTDIR/.zshenv +ln -sf $DOTFILES/mac/.zshrc $ZDOTDIR/.zshrc +mv ~/.zprofile $ZDOTDIR/.zprofile +source $ZDOTDIR/.zshrc sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH/custom/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH/custom/plugins/zsh-syntax-highlighting -source $XDG_CONFIG_HOME/zsh/.zshrc +source /etc/zshenv +source $ZDOTDIR/.zshrc +rm -f ~/.zshrc ~/.zprofile ~/.zsh_history ~/.zshenv +rm -rf ~/.zsh_sessions echo "[INFO] Setting Up dotfiles" -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 $XDG_CONFIG_HOME/NuGet +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 $XDG_CONFIG_HOME/NuGet $XDG_CONFIG_HOME/vim $XDG_CONFIG_HOME/tmux $XDG_CONFIG_HOME/npm mkdir -p ~/.config/zellij # Not support XDG_CONFIG_HOME but same directory +mkdir -p $WAKATIME_HOME +mkdir -p $XDG_STATE_HOME/vim/undo $XDG_STATE_HOME/vim/backup $XDG_STATE_HOME/vim/swap $XDG_STATE_HOME/vim/view # $DOTFILES/.config ln -sf $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc ln -sf $DOTFILES/.config/git/.gitconfig $XDG_CONFIG_HOME/git/config ln -sf $DOTFILES/.config/ideavim/ideavimrc.vimrc $XDG_CONFIG_HOME/ideavim/ideavimrc ln -sf $DOTFILES/.config/markdownlint/.markdownlint.json $XDG_CONFIG_HOME/markdownlint/markdownlint.json +ln -sf $DOTFILES/.config/npm/npmrc $NPM_CONFIG_USERCONFIG ln -sf $DOTFILES/.config/NuGet/NuGet.Config $XDG_CONFIG_HOME/NuGet/NuGet.Config ln -sf $DOTFILES/.config/nvim/ $XDG_CONFIG_HOME/nvim ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf +ln -sf $DOTFILES/.config/tmux/tmux.conf $XDG_CONFIG_HOME/tmux/tmux.conf +ln -sf $DOTFILES/.config/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc ln -sf $DOTFILES/.config/zellij/config.kdl ~/.config/zellij/config.kdl +ln -sf $DOTFILES/.config/lesskey $XDG_CONFIG_HOME/lesskey # $DOTFILES/mac 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 @@ -92,8 +103,6 @@ ln -sf $DOTFILES/mac/Microsoft.PowerShell_profile.ps1 $XDG_CONFIG_HOME/powershel ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode.vimrc # $DOTFILES root ln -sf $DOTFILES/.haskeline ~/.haskeline -ln -sf $DOTFILES/.npmrc ~/.npmrc -ln -sf $DOTFILES/.tmux.conf ~/.tmux.conf # Brew echo "[INFO] Installing Homebrew" @@ -126,6 +135,7 @@ brew install --formula cmake brew install --formula bat brew install --formula lsd brew install --formula starship # Shell Prompt +brew install --formula glow # Markdown Preview # Editors brew install --cask visual-studio-code diff --git a/zsh/.zshenv b/zsh/.zshenv index 031bca6..1a78651 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -8,8 +8,11 @@ export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" export XDG_RUNTIME_DIR="/run/user/$(id -u)" +# Disable shell sessions on macOS when using default terminal +SHELL_SESSIONS_DISABLE=1 # Zsh export ZDOTDIR="${XDG_CONFIG_HOME}/zsh" # Also put in /etc/zsh/zshenv +# or /etc/zshenv in macOS diff --git a/zsh/config.zsh b/zsh/config.zsh index d240881..d29813e 100644 --- a/zsh/config.zsh +++ b/zsh/config.zsh @@ -31,14 +31,19 @@ export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet export GNUPGHOME="$XDG_DATA_HOME"/gnupg # ~/go -> $XDG_DATA_HOME/go export GOPATH="$XDG_DATA_HOME"/go +# ~/.node_repl_history -> $XDG_STATE_HOME/node/repl_history +export NODE_REPL_HISTORY="$XDG_STATE_HOME"/node/repl_history # ~/.npmrc -> $XDG_CONFIG_HOME/npm/npmrc export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc # ~/.python_history -> $XDG_DATA_HOME/python/history # Works only with Python 3.13.0a3 and later export PYTHON_HISTORY="$XDG_DATA_HOME"/python/history +# ~/.tldrc/ -> $XDG_CACHE_HOME/tldr +export TLDR_CACHE_DIR="$XDG_CACHE_HOME"/tldr # ~/.w3m -> $XDG_DATA_HOME/w3m export W3M_DIR="$XDG_DATA_HOME"/w3m # ~/.wakatime.cfg -> $XDG_CONFIG_HOME/wakatime.cfg +# ~/.wakatime/ -> $XDG_CONFIG_HOME/wakatime/ export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime" # ~/.wget-hsts -> $XDG_DATA_HOME/wget-hsts alias wget='wget --hsts-file="$XDG_DATA_HOME/wget-hsts"'