-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.bashrc
120 lines (105 loc) · 4.75 KB
/
.bashrc
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
120
#!/bin/bash
# =========================================================================== #
# #
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ #
# ┃ ███╗ ██╗ ██████╗ ██╗ ██╗ █████╗ ┃ #
# ┃ ████╗ ██║██╔═████╗██║ ██║██╔══██╗ ┃ #
# ┃ ██╔██╗ ██║██║██╔██║██║ ██║███████║ ┃ #
# ┃ ██║╚██╗██║████╔╝██║╚██╗ ██╔╝██╔══██║ ┃ #
# ┃ ██║ ╚████║╚██████╔╝ ╚████╔╝ ██║ ██║ ┃ #
# ┃ ╚═╝ ╚═══╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ┃ #
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ #
# #
# This machine kills fascists. #
# #
# =========================================================================== #
# -------------------------
# [SECRETS]
# -------------------------
. ~/.secrets/rc
# -------------------------
# [ENVIRONMENTAL VARIABLES]
# -------------------------
export NOVIX_WORKSPACE="${HOME}/workspace"
export LD_LIBRARY_PATH=/usr/local/lib
export GO111MODULE=on
export PATH=$PATH:${HOME}/bin:/var/lib/mastodon/bin:${HOME}/.cargo/bin
export EDITOR=emacs
export RAILS_ENV=production
export GPG_TTY=$(tty)
export PKG_CONFIG_SYSROOT_DIR=/
# -------------------------
# [ALIAS]
# -------------------------
alias pacaur="yay"
alias ks="kubectl -n kube-system"
alias k="kubectl"
alias emacs="/usr/bin/emacs -nw"
alias ls="ls -CF --color=auto"
alias mkdir="mkdir -pv"
alias userlist="cut -d: -f1 /etc/passwd"
alias fhere="find . -name "
alias free="free -mt"
alias ps="ps auxf"
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
alias wget="wget -c"
alias histg="history | grep"
alias myip="curl http://ipecho.net/plain; echo"
alias logs="find /var/log -type f -exec file {} \; | grep 'text' | cut -d' ' -f1 | sed -e's/:$//g' | grep -v '[0-9]$' | xargs tail -f"
alias folders='find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn'
alias grep='grep --color=auto'
# -------------------------
# [VARS]
# -------------------------
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# -------------------------
# [SYSTEM]
# -------------------------
#ulimit -n 2048
#ssh-add ~/.ssh/id_rsa
# -------------------------
# [FUNCTIONS]
# -------------------------
# -------------------------
# [COMPUTER]
# -------------------------
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Make colorcoding available for everyone
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
Purple='\e[0;35m' # Purple
Cyan='\e[0;36m' # Cyan
White='\e[0;37m' # White
# Bold
BBlack='\e[1;30m' # Black
BRed='\e[1;31m' # Red
BGreen='\e[1;32m' # Green
BYellow='\e[1;33m' # Yellow
BBlue='\e[1;34m' # Blue
BPurple='\e[1;35m' # Purple
BCyan='\e[1;36m' # Cyan
BWhite='\e[1;37m' # White
# Background
On_Black='\e[40m' # Black
On_Red='\e[41m' # Red
On_Green='\e[42m' # Green
On_Yellow='\e[43m' # Yellow
On_Blue='\e[44m' # Blue
On_Purple='\e[45m' # Purple
On_Cyan='\e[46m' # Cyan
On_White='\e[47m' # White
NC="\e[m" # Color Reset
# New alert text
ALERT=${BWhite}${On_Red} # Bold White on red background
# Set the prompt
export PS1="\[\033[38;5;12m\][\[$(tput sgr0)\]\[\033[38;5;10m\]\u\[$(tput sgr0)\]\[\033[38;5;12m\]@\[$(tput sgr0)\]\[\033[38;5;7m\]\h\[$(tput sgr0)\]\[\033[38;5;12m\]]\[$(tput sgr0)\]\[\033[38;5;15m\]: \[$(tput sgr0)\]\[\033[38;5;7m\]\w\[$(tput sgr0)\]\[\033[38;5;12m\]>\[$(tput sgr0)\]\[\033[38;5;10m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"
[ -e "/etc/DIR_COLORS" ] && DIR_COLORS="/etc/DIR_COLORS"
[ -e "$HOME/.dircolors" ] && DIR_COLORS="$HOME/.dircolors"
[ -e "$DIR_COLORS" ] || DIR_COLORS=""
eval "`dircolors -b $DIR_COLORS`"
# Write the message of the day
# motd