-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_aliases
82 lines (67 loc) · 2.29 KB
/
.bash_aliases
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
#------------------GIT------------------
alias gitcam='git commit -a -m '
alias gits='git status'
alias gitA='git add -A'
alias gitp='git push'
alias gitc='git commit'
alias dotcam='git -C ~/dotfiles commit -a -m '
alias dotp='git -C ~/dotfiles push'
alias gl='git log --graph --abbrev-commit --decorate --format=format:'\''%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'\'' --all'
#------------------NVIM------------------
alias v='nvim'
alias v.='nvim .'
alias dvim='nvim .'
alias cdconfig='cd ~/.config/nvim'
#------------------TMUX------------------
alias tls='tmux ls'
alias tas='tmux attach -t'
alias ta='tmux attach'
alias td='tmux detach'
#------------------SSH------------------
alias sshkth='ssh [email protected]'
[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh"
#-----------------CLIs/Related------------
alias neofetch='fastfetch'
alias pbcopy='xclip -selection clipboard'
alias dircp='pwd | pbcopy'
alias hist='$(bat ~/.bash_history | fzf)'
function zopen(){
zathura $1 &
}
#------------------Movement------------------
alias cdkth='cd ~/Documents/kth'
alias cddot='cd ~/dotfiles'
alias ..='cd ..'
show_file_or_dir_preview="if [ -d {} ]; then eza --color=always {} | head -200; else bat --color=always --theme gruvbox-dark --line-range :500 {};fi"
function fd() {
local dirname
dirname=$(fdfind . ~/ -t d -H| fzf --preview "$show_file_or_dir_preview" ) || return
cd "$dirname"
}
function fdd() {
local dirname
dirname=$(fdfind . ./ -t d -H| fzf --preview "$show_file_or_dir_preview") || return
cd "$dirname"
}
function fda() {
local dirname
dirname=$(fdfind . / -t d -H| fzf --preview "$show_file_or_dir_preview") || return
cd "$dirname"
}
alias fivm='fvim'
alias fv='fvim'
function fvim() {
local dirname
dirname=$(fdfind . ~/ -H| fzf --preview "$show_file_or_dir_preview" -m --preview-window '~3') || return
nvim "$dirname"
}
function fva() {
local dirname
dirname=$(fdfind . / -H| fzf --preview "$show_file_or_dir_preview" -m --preview-window '~3') || return
nvim "$dirname"
}
function fvimd() {
local dirname
dirname=$(fdfind . ./ -H| fzf --preview "$show_file_or_dir_preview" -m --preview-window '~3') || return
nvim "$dirname"
}