blob: f180d8e33e51dcd44662c628f9688514f6d7b176 (
plain) (
blame)
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
|
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# vi mode
set -o vi
# aliases
alias ls='ls --color=auto --group-directories-first'
alias ll='ls -lAh'
alias cat='bat -p'
alias ssh='TERM=rxvt ssh'
alias config='/usr/bin/git --git-dir=$HOME/Documents/dotfiles --work-tree=$HOME'
alias brc='nvim ~/.bashrc && source ~/.bashrc'
alias vrc='nvim ~/.config/nvim/init.vim'
alias v='nvim'
alias fsl='fossil'
PS1='[\u@\h \W]\$ '
# use gpg authentication key for ssh auth
export SSH_AUTH_SOCK=$( gpgconf --list-dirs agent-ssh-socket )
gpgconf --launch gpg-agent
# fzf bindings and tweaks
source /usr/share/fzf/key-bindings.bash
source /usr/share/fzf/completion.bash
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
export FZF_CTRL_T_COMMAND='$FZF_DEFAULT_COMMAND'
# ripped off from nixcasts' .bashrc
pacs() {
sudo pacman -Syy $(pacman -Ssq | fzf -m --preview="pacman -Si {}" \
--preview-window=:hidden --bind=space:toggle-preview)
}
FOSSILS_HOME=$HOME/Documents/Fossils
fslcd() {
cd $(fossil all ls -c | fzf)
}
# fossil init script
# modified version of one taken from
# https://www.fossil-scm.org/home/doc/trunk/www/server/openbsd/fastcgi.md
source $HOME/.local/bin/finit
# real one is there, but because it has some
#personal information, i'll not include it, but it almost identical to
#following:
#
#finit() {
# FINIT_REPO=$FOSSILS_HOME/$1.fossil
# fossil init $FINIT_REPO && \
# chmod 664 $FINIT_REPO && \
# fossil open $FINIT_REPO --workdir $HOME/Documents/$1 && \
# fossil user -R $FINIT_REPO password $USER $PASSWD && \
# fossil remote-url -R $FINIT_REPO https://$USER@domain.tld/$1 && \
# rsync --perms $FINIT_REPO $USER@domain.tld:/var/www/fossils/ \
# >/dev/null && \
# chmod 644 $FINIT_REPO
#}
# starship prompt
eval "$(starship init bash)"
|