-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
60 lines (51 loc) · 1.9 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
alias ..='cd ../'
alias ...='cd ../../'
alias ....='cd ../../../'
alias .....='cd ../../../../'
alias ......='cd ../../../../../'
alias dl='cd ~/Downloads/'
alias dt="cd ~/Desktop"
alias doc="cd ~/Documents"
alias proj='cd ~/projects/'
alias ll='ls -lah'
alias cl='clear'
alias :q='exit'
alias p='python3'
alias i='ipython'
alias ca='conda activate'
alias path='echo -e ${PATH//:/\\n}'
alias t='tmux new-session -s $(hostname)'
alias ta="tmux a"
alias td='cd $(mktemp -d /tmp/$1.XXX)'
alias glb='git shortlog -nse'
alias git_clean='git branch | grep -v "main" | grep -v "master" | xargs git branch -D'
# fix annoying bug where the service does not restart correctly when switching between users
#alias restart_anydesk='sudo killall anydesk && (tmux has-session -t anydesk_session 2>/dev/null || tmux new-session -d -s anydesk_session) && tmux send-keys -t anydesk_session "sudo anydesk --service" C-m && tmux attach -t anydesk_session'
alias restart_anydesk='(tmux has-session -t anydesk_session 2>/dev/null || tmux new-session -d -s anydesk_session) && tmux send-keys -t anydesk_session "sudo killall anydesk && sudo anydesk --service" C-m && tmux attach -t anydesk_session'
# Think this is zsh default
alias ~='cd ~'
# Ramona Specific
if [ -f ~/dotfiles/ramona/.ramona ]; then
source ~/dotfiles/ramona/.ramona
fi
if hash exa 2>/dev/null; then
alias ls='exa'
alias ll="exa -lah --git --icons"
alias lll="exa -abghHliS@ --git --icons"
fi
alias la='cat ~/.aliases'
if hash bat 2>/dev/null; then
alias la='bat ~/.aliases -l bash'
fi
if hash nvim 2>/dev/null; then
alias vim='nvim'
alias vi='nvim'
alias vimdiff='nvim -d'
fi
if command -v ffmpeg >/dev/null 2>&1 && command -v gifski >/dev/null 2>&1; then
mp4togif() {
input_file="$1"
base_name="$(basename "${input_file}" .mp4)"
ffmpeg -i "${input_file}" -f yuv4mpegpipe - | gifski -Q 100 --extra -o "${base_name}.gif" -
}
fi