blob: 358ba8a3618b77d741dbed55c5649fb65e1614df (
plain)
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
|
#export LC_ALL=en_US.UTF-8
#export LANG=en_US.UTF-8
#export LANGUAGE=en_US.UTF-8
export TERM='xterm-256color'
export TERMINAL=st
export EDITOR='vim'
export VISUAL='vim'
export DESKTOP_SESSION=KDE
export XDG_CURRENT_DESKTOP=KDE
export SFML_DIR=/home/senders/Downloads/SFML-2.5.1
#Prompt Command Function CWD
function cwd {
pwd | awk '{ n=split($0,a,"/"); print a[n-1]"/"a[n] }'
}
function vim {
if [ -f $PWD/.vimrc ]; then
/usr/bin/vim -u $PWD/.vimrc $@
else
/usr/bin/vim $@
fi
}
##
# Exports
##
export PROMPT_COMMAND='echo -ne "\033]0;`cwd`\007"'
export PS1="\[$(tput setaf 12)\][\[$(tput bold)\]\[$(tput setaf 2)\]\u\[$(tput sgr0)\]\[$(tput setaf 12)\]]\[$(tput setaf 13)\]\\$ \[$(tput sgr0)\]"
export PRJ_HOME=$HOME/projects
export APP_HOME=$HOME/applications
export CONF_HOME=$HOME/configs
export JAVA_HOME=/usr/lib/jvm/default-runtime
export IDEA_JDK=$JAVA_HOME
#export IDEA_JDK=/usr/lib/jvm/jdk-jetbrains
export PLAYGROUND_HOME=$HOME/playground
export SCALA_HOME=$APP_HOME/scala-latest
export GO_HOME=/usr/local/go
export GOPATH=$PLAYGROUND_HOME/go
export ARDOUR_HOME=/opt/Ardour-5.12.0/bin
export MPV_HOME=~/.config/
export PATH=$PATH:/home/senders/.bin:$ARDOUR_HOME:$SCALA_HOME/bin:$HOME/.cargo/bin:/snap/bin:$GO_HOME/bin:/usr/local/include:$GOPATH:/usr/include
##
# Alias
##
alias ccopy='xclip -selection clipboard'
alias cpaste='xclip -selection clipboard -o'
alias tgz='tar czvf'
alias utgz='tar xzvf'
alias volmute='amixer sset Master toggle'
alias bgrand='fn_bg_rand'
alias bgset='xsetroot -solid '
alias resource='source ~/.bash_profile'
alias whoisport='lsof -t tcp:'
alias checksum='openssl dgst -sha256'
alias mmoff='xrandr --output eDP-1 --off'
alias mmon='xrandr --output eDP-1 --auto'
alias exon='xrandr --output DP-1 --auto && mmoff'
alias exoff='mmon; xrandr --output DP-1 --off'
alias ssh-evict='ssh-keygen -f "/home/senders/.ssh/known_hosts" -R'
alias add-ssh='ssh-add ~/.ssh/id_rsa'
alias tlmgr='/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode'
alias nem='emacsclient -nw'
# Private Bash Profile for things I don't want in git
if [ -f ~/.pc_local_bash_profile ]; then
. ~/.pc_local_bash_profile
fi
# Setup SSH to work with ST
# if [ "$TERM" == "st-256color"]; then
# alias ssh='TERM="xterm-256color"; ssh'
# fi
##
# Functions
##
function prj {
cd $PRJ_HOME/$1
}
function config {
cd $CONF_HOME/$1
}
function play {
cd $PLAYGROUND_HOME/$1
}
function clip {
cat $1 | ccopy
}
function print_clip {
cpaste
}
function fn_bg_set {
xsetroot -solid "#$1"
}
function fn_bg_rand {
__CLR=$(openssl rand -hex 3)
fn_bg_set $__CLR
echo "#"$__CLR
unset __CLR
}
function mvnversion {
mvn versions:set -DnewVersion=$1 -DgenerateBackupPoms=false
}
export PATH="$HOME/.cargo/bin:$PATH"
GIT_AUTOCOMPLETE=/usr/share/git/completion/git-completion.bash
if [ -f $GIT_AUTOCOMPLETE ]; then
source $GIT_AUTOCOMPLETE
fi
|