Last active
September 2, 2017 04:22
-
-
Save serverhiccups/667595a9278cb5f0f91c2d1e9798592a to your computer and use it in GitHub Desktop.
my profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#tmux | |
EVENT_NOKQUEUE=1 | |
alias tm='tmux attach || tmux new' #Because having multiple sessions is fiddly | |
#SSH | |
alias rpi='rpi' # see ~/.ssh/config | |
alias rpix="xterm -e 'ssh rpi -Y lxsession'" # Start xterm (in XQuartz) and ssh into my pi and run lxde | |
alias rpim="mosh rpi" | |
alias macserver="ssh macserver" | |
#Aliases | |
alias ping8="ping 8.8.8.8" #Actually test the inet connection | |
alias yecto="ssh [email protected]" | |
alias adom="ssh [email protected] -t \"~/bin/adom\"" | |
alias git="hub" | |
alias nano="micro" | |
alias ff="/Applications/Firefox.app/Contents/MacOS/firefox" | |
alias ad="git add ." | |
alias ph="git push" | |
function cm { git commit -m "$1"; } | |
alias updatewebsite="ssh macserver -t 'UW_PWD=\"$(pwd)\";cd ~/hiccup01-next;git pull;cd \"$UW_PWD\";';" | |
alias ls="exa -l" | |
#Micro | |
EDITOR="micro" | |
MICRO_TRUECOLOR=1 | |
export PATH=$PATH:$HOME/bin #Add my personal bin | |
#function anybar { echo -n $1 | nc -4u -w0 localhost ${2:-1738}; } | |
#open -g -a AnyBar | |
#/Applications/AnyBar.app/Contents/MacOS/Anybar | |
#Custom Prompts | |
source ~/.git-prompt.sh | |
#username() { | |
#if [!$(whoami)=DEFUALTUSER] then echo -n "\w"; | |
#} | |
isssh(){ | |
if [[ $(who am i) =~ \([-a-zA-Z0-9\.]+\)$ ]] ; then | |
echo -ne "$(whoami) "; | |
fi | |
} | |
hostnameis(){ | |
if [ !"$(hostname)" = "The-Tardis.local" ] ; then | |
echo -ne "$(hostname) " | |
fi | |
} | |
isroot(){ | |
if [ "$(whoami)" = "root" ] ; then | |
echo -ne "root " | |
fi | |
} | |
isgit(){ | |
if git rev-parse --git-dir > /dev/null 2>&1; then | |
echo -ne "on \[$(tput setaf 6)\]$(prompt_git)"; | |
fi | |
} | |
PS1="\[$(tput setaf 5)\]\u\[$(tput sgr0)\] at \[$(tput setaf 4)\]\h\[$(tput sgr0)\] in \[$(tput setaf 2)\]\w\[$(tput sgr0)\] $(isgit)\[$(tput sgr0)\]\n\[$(tput bold)\]\$\[$(tput sgr0)\] " | |
#2tiny | |
PS2="\[\033[1A\]\[$(echo -n ╟)\]\[\033[1B\033[2D\]╙\[$(tput setaf 4; tput bold)\]->\[$(tput sgr0)\] " #2tiny Smart PS2 | |
#PS1="\[$(tput setaf 7; tput bold)\]\W>\[$(tput sgr0)\] " #Apple | |
export PATH="$HOME/.cargo/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment