-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
71 lines (57 loc) · 1.52 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
#!/usr/bin/env bash
source ~/.sections/defaults
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=9000
HISTFILESIZE=90000
#export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
parse_git_branch() {
# git branch 2> /dev/null | grep '^*' | colorm 1 2
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# Using current history in other terminals ry
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
# disable suspend, CTRL-s will not freeze bash
stty -ixon
# new prompt
PS1='${debian_chroot:+($debian_chroot)}\[\033[00;34m\]\w\n\[\033[2;38;5;214m\]\@ \[\033[01;32m\]skylar\[\033[33m\]$(parse_git_branch)\[\033[00m\] 🌱 '
# Introduction
export USERNAME="Ryan"
export NICKNAME="Ryan"
source ~/.sections/alias
source ~/.sections/android
source ~/.sections/functions
source ~/.sections/git
source ~/.sections/rfidtest
# Scroll past splash screen
# for i in {1..40}
# do
# echo
# done
clear
# Welcome
screenfetch
echo
quoter[0]=$(fortune)
quoter[1]=$(fortune /usr/local/fortune/bible)
quoter[2]=$(verse)
gday="Good day"
h=`date +%H` #| sed -e 's/^0//g'
if [ $h -lt 12 ]; then
gday="Good Morning"
elif [ $h -lt 18 ]; then
gday="Good Afternoon"
else
gday="Good Evening"
fi
# Welcome message
echo -ne "$gday, $NICKNAME! It's "; date '+%A, %B %-d %Y'
echo -ne "The time is "; date '+%I:%M %P'
echo
rand=$[ $RANDOM % 3 ]
echo ${quoter[$rand]}
# echo
# savoy
echo
cat ~/.notes.txt