diff options
| author | Yousef Jan <yousefjan24000@gmail.com> | 2026-08-17 11:52:27 +0300 |
|---|---|---|
| committer | Yousef Jan <yousefjan24000@gmail.com> | 2026-08-17 11:52:27 +0300 |
| commit | 1307051a867f103379687b9f88e1cd486476c281 (patch) | |
| tree | 3170b982e10590be0835fd9adfc4b2b06e6dda84 /.bashrc | |
| parent | eef237fd3c04a84ab771e8f94e001b4184b53a33 (diff) | |
Diffstat (limited to '.bashrc')
| -rw-r--r-- | .bashrc | 60 |
1 files changed, 60 insertions, 0 deletions
@@ -0,0 +1,60 @@ +# .bashrc + +# Custom prompt with directory in #afd7ff +PS1='[\u@\h \[\e[38;2;175;215;255m\]\w\[\e[0m\]]\$ ' + +# Aliases +alias python=python3 +alias ls='ls -larth' +alias e='emacsclient -nc -a ""' +alias ke='emacsclient -e "(kill-emacs)"' +alias copy='xclip -selection clipboard' +alias paste='xclip -o -selection clipboard' + +# bun completions +[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun" + +# bun +export BUN_INSTALL="$HOME/.bun" +export PATH="$BUN_INSTALL/bin:$PATH" + +# Local bins +export PATH="$HOME/.local/bin:$PATH" +# Doom Emacs CLI +export PATH="$HOME/.config/emacs/bin:$PATH" + +# Auto-attach or create tmux session on shell start +if [ -z "$TMUX" ]; then + tmux attach 2>/dev/null || tmux new -s main +fi + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + +# User specific environment +if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then + PATH="$HOME/.local/bin:$HOME/bin:$PATH" +fi +export PATH + +# User specific aliases and functions +if [ -d ~/.bashrc.d ]; then + for rc in ~/.bashrc.d/*; do + if [ -f "$rc" ]; then + . "$rc" + fi + done +fi +unset rc + +[ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env" + +# pnpm +export PNPM_HOME="/home/yousefjan/.local/share/pnpm" +case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; +esac +# pnpm end |