-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc
116 lines (95 loc) · 3.63 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
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias ll='ls -lrth --color=auto'
alias ee='emacsclient -t -a nvim'
alias vim='nvim'
alias top='btm'
alias htop='btm'
alias xx='Xephyr -br -ac -noreset -screen 1920x1080 :1 & DISPLAY=:1'
alias fix_screen='~/.screenlayout/single.sh; ~/.screenlayout/double.sh ; ~/.screenlayout/double.sh'
alias mount_fairphone='sshfs fairphone:/home/phablet ~/mnt/fairphone/'
alias mount_nexus='sshfs nexus:/home/phablet ~/mnt/nexus/'
alias mount_purism='sshfs purism:/home/purism ~/mnt/purism/'
alias mount_pi='sshfs pi:/home/klingenberg ~/mnt/pi/'
alias liwi_ssh_tunnel='ssh -f -N lichtwiese-tunnel'
alias mount_liwi='sshfs lichtwiese:/home/klingenberg ~/mnt/lichtwiese/'
alias mount_liwivpn='sshfs lichtwiesevpn:/home/klingenberg ~/mnt/lichtwiese/'
alias mount_lcluster='sshfs lcluster:/home/km88econ ~/mnt/lichtenberg/'
alias mount_jenkins_old='sshfs jenkins-old:/ ~/mnt/jenkins/'
alias mount_cadmium='sshfs cadmium:/home/dsk34/ ~/mnt/cadmium/'
alias mount_fawcett='sshfs fawcett:/home/dsk34/ ~/mnt/fawcett/'
alias mount_maths='sshfs maths:/home/dsk34/ ~/mnt/maths/'
alias mount_store_maths='sshfs maths:/store/DAMTP/dsk34 ~/mnt/maths_store/'
alias mount_data_maths='sshfs maths:/data/septal/dsk34 ~/mnt/maths_data/'
alias mount_wilkes='sshfs wilkes:/home/dsk34/ ~/mnt/wilkes/'
alias fe41='source /home/klingenberg/foam/foam-extend-4.1/etc/bashrc'
source ~/.bash_aliases.sh
function latexdiff-vc-most-recent(){
latexdiff-vc -r HEAD^ -r HEAD "$1" --pdf
}
function scrcb() {
scrot $1 -e 'xclip -selection clipboard -t image/png -i $f'
}
PS1='[\u@\h \W]\$ '
export PATH=~/.config/emacs/bin/:$PATH
export FOAM_DG_ROOT=~/Documents-work/programming/foam-dg/foam-dg/
# up-down arrow to search in history
bind '"\e[A": history-substring-search-backward'
bind '"\e[B": history-substring-search-forward'
alias hostname="echo $HOSTNAME"
if [[ "$INSIDE_EMACS" = 'vterm' ]] \
&& [[ -n ${EMACS_VTERM_PATH} ]] \
&& [[ -f ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh ]]; then
source ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh
fi
# vterm_printf(){
# if [ -n "$TMUX" ] && ([ "${TERM%%-*}" = "tmux" ] || [ "${TERM%%-*}" = "screen" ] ); then
# # Tell tmux to pass the escape sequences through
# printf "\ePtmux;\e\e]%s\007\e\\" "$1"
# elif [ "${TERM%%-*}" = "screen" ]; then
# # GNU screen (screen, screen-256color, screen-256color-bce)
# printf "\eP\e]%s\007\e\\" "$1"
# else
# printf "\e]%s\e\\" "$1"
# fi
# }
# if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
# function clear(){
# vterm_printf "51;Evterm-clear-scrollback";
# tput clear;
# }
# fi
# PROMPT_COMMAND='echo -ne "\033]0;${HOSTNAME}:${PWD}\007"'
# vterm_cmd() {
# local vterm_elisp
# vterm_elisp=""
# while [ $# -gt 0 ]; do
# vterm_elisp="$vterm_elisp""$(printf '"%s" ' "$(printf "%s" "$1" | sed -e 's|\\|\\\\|g' -e 's|"|\\"|g')")"
# shift
# done
# vterm_printf "51;E$vterm_elisp"
# }
# # should be at the end
# vterm_prompt_end(){
# vterm_printf "51;A$(whoami)@$(hostname):$(pwd)"
# }
# PS1=$PS1'\[$(vterm_prompt_end)\]'
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/usr/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/usr/etc/profile.d/conda.sh" ]; then
. "/usr/etc/profile.d/conda.sh"
else
export PATH="/usr/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
[ -f /opt/miniconda3/etc/profile.d/conda.sh ] && source /opt/miniconda3/etc/profile.d/conda.sh