-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathaliases.shrc
116 lines (97 loc) · 3.49 KB
/
aliases.shrc
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
#python 3
alias python=python3
alias pip=pip3
#make neovim default vim
export EDITOR="nvim"
alias vim=nvim
alias v=nvim
#This is a great way of always being sure that the ipython instance always belongs to the virtualenv's python version.
alias ipy="python -c 'import IPython; IPython.terminal.ipapp.launch_new_instance()'"
alias c=clear
# show hidden files by default
alias ll='ls -la'
function chpwd() {
emulate -L zsh
ll
}
# Pomodoro timer
# ->Requires brew install caarlos0/tap/timer terminal-notifier
alias pomo_work="timer 50m && terminal-notifier -message 'Pomodoro'\
-title 'Work Timer is up! Take a Break 😊'\
-appIcon '/Users/sspaeti/Simon/Sync/Pics/Desktop/Misc/CCE1041_1_A2_Frame_quer_finish.jpg'\
-sound Crystal"
alias pomo_rest="timer 10m && terminal-notifier -message 'Pomodoro'\
-title 'Break is over! Get back to work 😬'\
-appIcon '/Users/sspaeti/Simon/Sync/Pics/Desktop/Misc/CCE1041_1_A2_Frame_quer_finish.jpg'\
-sound Crystal"
# # that pip install strawberry-graphql[debug-server] will not fail (square brackets are used for globbing: https://stackoverflow.com/a/30539963/5246670)
alias pip='noglob pip'
# tmux
alias ide=~/.tmux/ide
alias tmux-session=~/.tmux/tmux-session
alias killtmuxsessions="tmux ls -F'#{session_name}'|egrep '^[0-9]+$'|xargs -I% tmux kill-session -t \"=%\""
alias ta="tmux attach"
# opening a new tmux session from current directory and name it like last part of pwd path
alias tn='tmux new -s `eval echo $(pwd) | sed "s/.*\///"`'
# when closing ranger it will be at the path you were
alias ranger='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"'
alias r=ranger
alias zed="open -a /Applications/Zed.app -n"
# same as ranger above, leaves you at currrent directory when quitting
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
alias r=y
#git shortcuts
alias g='git'
alias ga='git add'
alias gp='git push'
alias gl='git log --oneline'
alias gs='git status'
alias gd='git diff'
alias gdc='git diff --cached'
alias gm='git commit -m'
alias gma='git commit -am'
alias gb='git branch'
alias gco='git checkout'
alias gra='git remote add'
alias grr='git remote rm'
alias gpu='git pull'
alias gf='git fetch'
alias gcl='git clone'
alias gt='vim -c ":DiffviewOpen"' --diff current changes
# alias gtb = '! args=$@; shift $#; nvim -c \"DiffviewOpen $args\"'
#kuberentes
alias k=kubectl
alias kn="kubectl config set-context --current --namespace "
alias kc="kubectl config use-context "
alias ko="kubectl --dry-run=client -o yaml "
alias dps="docker ps --format \"table {{.Image}}\t{{.Status}}\t{{.Names}}\" --all"
alias docker-compose="docker compose"
alias lg=lazygit
alias ldd=lazydocker
alias lk=k9s
alias cat=bat
alias cato=/bin/cat
#docker
alias dkps="docker ps"
alias dkst="docker stats"
alias dkpsa="docker ps -a"
alias dkimgs="docker images"
alias dkcpup="docker-compose up -d"
alias dkcpdown="docker-compose down"
alias dkcpstart="docker-compose start"
alias dkcpstop="docker-compose stop"
alias arm="env /usr/bin/arch -arm64 /opt/homebrew/bin/zsh --login"
alias intel="env /usr/bin/arch -x86_64 /bin/zsh --login"
# Neomutt
alias mutt="neomutt"
alias m="neomutt"
# alias mscreener="~/.config/mutt/initial_screening.sh"
alias mscreener="~/.config/mutt/initial_screening.sh >> ~/.config/mutt/logs/screening.log 2>&1"
alias msync="offlineimap -a sspaeti.com"