-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc
More file actions
119 lines (84 loc) · 2.85 KB
/
bashrc
File metadata and controls
119 lines (84 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# If not running interactively, don't do anything
[[ "$-" != *i* ]] && return
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\d | \T] \u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}[\d | \T] \u@\h:\w\$ '
fi
# Don't put duplicate lines in the history.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# append to the history file, don't overwrite it
shopt -s histappend
# add timestamps to history
export HISTTIMEFORMAT="%F %T "
# Default to human readable figures
alias df='df -h'
alias du='du -h'
# Directory colors
eval `dircolors ~/.dir_colors`
alias ls="ls --color"
# enable color support of ls and also add handy aliases
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# some more ls aliases
alias ll='ls -alFh'
alias la='ls -A'
alias l='ls -CF'
# clear shortcut
alias c="clear"
# Weather
# alias weather="bash ~/.scripts/weather.sh 92630"
alias weather="curl wttr.in/Lake_Forest"
# Moon Phase
alias moon="curl wttr.in/Moon"
# Current IP
alias myip="dig +short myip.opendns.com @resolver1.opendns.com"
# Show mount in columns
alias mount="mount | column -t"
# Do ls after cd
alias cdd='cd "$1" && ls'
alias ccd='cd "$1" && ls'
eval $(thefuck --alias)
# rsync gcode scripts
alias gcodescripts='rsync -avz pi@octopi-MS.local:/usr/local/bin/gcode_scripts ~/octoprint_scripts/'
# cd aliases for home
alias desktophome="cd /cygdrive/d/Desktop"
alias githome="cd /cygdrive/d/Documents/Git"
alias downloadshome="cd /cygdrive/d/Downloads"
# cd alises for work
alias desktopwork="cd /cygdrive/c/Users/cvick/Desktop"
alias gitwork="cd /cygdrive/z/Git"
alias downloadswork="cd /cygdrive/z/Downloads"
#Easier way of finding packages version in apt
alias version="apt-cache policy"
# apt-fast alias to apt
alias apt="apt-fast"
alias apt-get="apt-fast"
#Random password generator
alias pass="cat /dev/urandom | base64 --wrap ${1:-"12"} | head -n 1"
alias passsym="tr -dc '[:print:]' < /dev/urandom | head -c 20"
# Show motd because it apparently doesn't do it by itself anymore
run-parts /etc/update-motd.d
eval "$(thefuck --alias)"
alias sshnc="ssh administrator@10.0.0.90"
alias sshrp="ssh administrator@10.0.0.85"
alias sshholo="ssh root@10.0.0.80"
# Blank screen when it doesn't obey
alias blank="xset dpms force off"
#Upgrade pip
alias upgradepip="python -m pip install --upgrade pip"