-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.aliases
85 lines (69 loc) · 2.35 KB
/
.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
81
82
83
84
85
#!/bin/bash
LINUX_DISTRIBUTION="$(. /etc/*-release && echo $DISTRIB_ID)"
# system
alias hibernate='systemctl hibernate'
alias esc='sudo -E systemctl edit --full'
alias sc='sudo SYSTEMD_EDITOR=vim systemctl'
alias jc='sudo journalctl'
alias fzfp="fzf --preview='less {}' --bind shift-up:preview-page-up,shift-down:preview-page-down"
alias vimf='nvim $(fzf)'
alias nvimnvim="nvim \$HOME/.config/nvim"
alias lazyconfig='lazygit -g "$HOME/.cfg" -w "$HOME"'
. /usr/share/bash-completion/completions/systemctl
. /usr/share/bash-completion/completions/journalctl
complete -F _systemctl systemctl sc
complete -F _journalctl journalctl jc
# overwrite aliases
if command -v nvim >/dev/null 2>&1; then
# alias nvim="nvim --listen /tmp/nvim-server.pipe"
alias vim='nvim'
fi
alias egrep='grep -E'
# config git alias
if [[ "$LINUX_DISTRIBUTION" == "nixos" ]]; then
alias config='/run/current-system/sw/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
else
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
fi
alias sourcezsh='source ~/.zshrc'
alias sourcebash='source ~/.bashrc'
# convenience
if command -v bat >/dev/null 2>&1; then
alias cat='bat'
fi
# wtf
alias wts='stty sane; clear;'
# navigation
alias cddata1='cd /media/data1'
alias cdc='cd $XDG_CONFIG_HOME'
alias cdl='cd /var/log'
alias cdnvim='cd $XDG_CONFIG_HOME/nvim'
alias cdkitty='cd $XDG_CONFIG_HOME/kitty'
alias cdbspwm='cd $XDG_CONFIG_HOME/bspwm'
alias cdsway='cd $XDG_CONFIG_HOME/sway'
alias cdgpwm='cd $HOME/git/beat/gpwm'
alias cdhlwm='cd $XDG_CONFIG_HOME/herbstluftwm'
alias cdws='cd "$HOME/workspace"'
alias cdsandbox='cdws && cd sandbox'
alias cdgit='cdws && cd git'
alias cdcarlo='cdgit && cd beat/carlo'
alias cdkb='cdgit && cd beat/kitebuddies'
alias cdseeme='cdgit && cd beat/see-me'
alias cdnavlog='cdws && cd analysis/navigation_analysis'
alias cdnas='cd /mnt/wutang_nas'
alias cdwine='cd $HOME/.wine'
alias cdjust='cdgit && cd just'
alias cdflarmrs='cdgit && cd beat/flarm-rs'
alias cdflarmcli='cdgit && cd beat/flarm-cli'
alias cdairshow='cdgit && cd beat/airshow'
# editing
alias vimbashrc='vim ~/.bashrc'
alias vimsim='vim $SIMULATION_CONFIG'
alias vimdds='vim $MTR_DDS_APPLICATION_PROFILE'
# schroot aliases
alias ubuntu-see-me='schroot -c chroot:see-me'
alias nvidia-power='nvidia-smi -i 0 -q -d POWER'
alias hc="herbstclient"
if [ -f "${HOME}/.aliases_mt" ]; then
. "${HOME}/.aliases_mt"
fi