chore(bootstrap): optimize shell-scripts for robustness

This commit is contained in:
js0ny 2025-02-27 03:02:55 +00:00
parent 42b83d4696
commit 2c014e281f
13 changed files with 441 additions and 184 deletions

View file

@ -6,28 +6,26 @@
export DOTFILES=$HOME/.dotfiles
if [ -n "$WAYLAND_DISPLAY" ]; then
if [ -n "$WSL_DISTRO_NAME" ]; then
alias clip="clip.exe"
alias paste="pwsh.exe -NoProfile -Command 'Get-Clipboard'"
elif [ -n "$WAYLAND_DISPLAY" ]; then
alias clip="wl-copy"
alias paste="wl-paste"
elif [ -n "$DISPLAY" ]; then
alias clip="xclip"
elif [ -n "$WSL_DISTRO_NAME" ]; then
alias clip="clip.exe"
alias paste="pwsh.exe -NoProfile -Command 'Get-Clipboard'"
fi
source $DOTFILES/tools/bash/bash_aliases # For compatibility
source "$DOTFILES"/tools/bash/bash_aliases # For compatibility
export IPYTHONDIR="$XDG_CONFIG_HOME"/ipython
if command -v fzf > /dev/null; then
if command -v fzf >/dev/null; then
eval "$(fzf --bash)"
fi
if command -v starship > /dev/null; then
if command -v starship >/dev/null; then
eval "$(starship init bash)"
fi
#
# bind 'set show-mode-in-prompt off'
# bind 'set show-mode-in-prompt off'