From 3db77a4aea42ff6f2f8c302e1be63620b9ba2bab Mon Sep 17 00:00:00 2001 From: Yousef Jan Date: Sun, 10 May 2026 07:34:30 +0300 Subject: Shell updates --- bash/.bash_profile | 9 +++++++++ bash/.bashrc | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ zsh/.zshrc | 2 ++ 3 files changed, 68 insertions(+) create mode 100644 bash/.bash_profile create mode 100644 bash/.bashrc diff --git a/bash/.bash_profile b/bash/.bash_profile new file mode 100644 index 0000000..f015706 --- /dev/null +++ b/bash/.bash_profile @@ -0,0 +1,9 @@ +# .bash_profile + +# Get the aliases and functions +if [ -f ~/.bashrc ]; then + . ~/.bashrc +fi + +# User specific environment and startup programs +. "$HOME/.cargo/env" diff --git a/bash/.bashrc b/bash/.bashrc new file mode 100644 index 0000000..b3a7c1c --- /dev/null +++ b/bash/.bashrc @@ -0,0 +1,57 @@ +# .bashrc + +# Aliases +alias python=python3 +alias ls='ls -larth' +alias vim=nvim +alias tmuxa='tmux attach' +alias tmusxd='tmux detach' +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 +. "$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 diff --git a/zsh/.zshrc b/zsh/.zshrc index c20e539..c82c6ad 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,4 +1,6 @@ eval "$(/opt/homebrew/bin/brew shellenv)" + +PROMPT='[%n@%m %F{#afd7ff}%~%f]%# ' alias python=python3 alias ls='ls -lah' alias vim=nvim -- cgit v1.2.3