Browse Source

Attempting to consolidate all bashrcs

Simon Watson 3 years ago
parent
commit
71bc8c0df7
2 changed files with 70 additions and 1 deletions
  1. 70 0
      bashrc/bashrc-all
  2. 0 1
      bashrc/bashrc-fedora-work

+ 70 - 0
bashrc/bashrc-all

@@ -0,0 +1,70 @@
+if [ -f ~/.wal_alias ]; then
+	. ~/.wal_alias 
+fi
+
+[ -f ~/.fzf.bash ] && source ~/.fzf.bash
+
+# Cargo config
+[ -f ~/.cargo ] && source "$HOME/.cargo/env"
+
+if $(which wal> /dev/null 2>&1); then
+    cat ~/.cache/wal/sequences
+fi
+
+export EDITOR=$(which vim)
+
+EXA_PATH=$(which exa)
+if [ ! -z "$EXA_PATH" ]; then
+    alias ls="$EXA_PATH"
+    alias ll="$EXA_PATH -lah"
+    alias lg="$EXA_PATH -lah --git"
+fi
+
+# Platform agnostic aliases
+alias tmuxa="tmux attach -t $1"
+alias tmuxl="tmux ls"
+alias tmuxq="echo $TMUX"
+
+alias httpserver="python -m SimpleHTTPServer"
+
+# Case defines platform specific configs
+# Platform agnostic configs above
+case $(hostname) in
+    Simons-MBP)
+	export PS1="\w λ > \[$(tput sgr0)\]"
+
+	# Mac aliases
+	alias shorten-ps1="PS1='λ > '"
+	alias default-ps1='PS1="\w λ > \[$(tput sgr0)\]"'
+	alias tmuxn="tmux new -s $1"
+	alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs"
+
+	# PATH setups
+	PATH='/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/swatson/.fzf/bin:/Users/swatson/Library/Python/3.8/bin'
+
+	default-ps1
+	clear
+	echo "Loaded MacM1 config"
+
+	;;
+
+    watsonsi-fedora)
+	
+	alias start_od="rclone --vfs-cache-mode writes mount ipconedrive: /home/watonsi/OneDrive/"
+	alias tmux="systemd-run --scope --user tmux"
+	
+	# function to set terminal title
+	function set-title() {
+	    if [[ -z "$ORIG" ]]; then
+		ORIG=$PS1
+	    fi
+	    TITLE="\[\e]2;$*\a\]"
+	    PS1=${ORIG}${TITLE}
+	}
+
+	
+	echo "Loaded Work Fedora config"
+	;;
+esac
+
+

+ 0 - 1
bashrc/bashrc-fedora-work

@@ -40,7 +40,6 @@ PS1="[\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]]\$ "
 #export $PS1
 
 alias start_od="rclone --vfs-cache-mode writes mount ipconedrive: /home/watonsi/OneDrive/"
-alias pass_server="ssh watsonsi@ffdctpws1.ipc.com"
 alias shorten-ps1="PS1='\$ '"
 alias default-ps1="PS1='[\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]]\$ '"
 alias ls="/usr/bin/exa"