-
Notifications
You must be signed in to change notification settings - Fork 3
/
.zsh_aliases
87 lines (68 loc) · 2.31 KB
/
.zsh_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
86
# General use aliases
#
alias cp="cp -iv"
alias mkdir="mkdir -pv"
alias mv="mv -iv"
alias rm="rm -rf --"
# eza aliases
alias ls="eza --color=auto --icons"
alias la="eza -la --color=auto --icons"
alias ll="eza -alh --color=auto --icons"
alias lt="eza -a --tree --color=auto --icons" # show tree in directory
# colorize grep output (good for log files)
alias grep="grep --color=auto"
# ps aux
alias pgrep="ps aux | grep"
# system aliases
alias aptu="sudo apt update; sudo apt upgrade -y"
alias aptr="sudo apt remove"
alias apti="sudo apt install"
alias apts="apt-cache search"
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# clear terminal
alias cls="clear"
# create directory recursive
alias mkdir="mkdir -pv"
# pyenv aliases
alias aenv="source .venv/bin/activate"
alias cenv="python3 -m venv .venv"
alias denv="deactivate"
# using terminfo of kitty in ssh
alias ssh="TERM=xterm-256color ssh"
# python server to server files
alias pyserver="python3 -m http.server 8000"
# update pip
alias pipu="pip install pip --upgrade"
alias pipr="pip install -r requirements.txt"
# nvim aliases
alias nvimconf="cd $HOME/.config/nvim && nvim"
alias nvimclean="nvim --clean"
alias nvimdel="rm -rf $HOME/.local/share/nvim $HOME/.local/state/nvim $HOME/.cache/nvim"
# i3 and polybar aliases
alias i3conf="nvim $HOME/.config/i3/config"
alias polybarconf="nvim $HOME/.config/polybar/config.ini"
# terminal aliases
alias wezconf="nvim $HOME/.config/wezterm/wezterm.lua"
alias alacrittyconf="nvim $HOME/.config/alacritty/alacritty.toml"
# tmux aliases
# attach session
alias tmuxa="tmux a -t"
# create session
alias tmuxs="tmux new -s"
# Docker
# List databases on postgres container
alias odoodbls="docker exec postgresql psql -U odoo -l"
# docker compose aliases
alias dcup="docker compose up"
alias dcdn="docker compose down"
alias dcb="docker compose build"
alias dcps="docker compose ps"
alias dcr="docker compose run"
alias dcstop="docker compose stop"
alias dcstart="docker compose start"
alias dcupb="docker compose up --build"
alias dclf="docker compose logs -f"
# run odoo bin
alias odoorun="docker compose run --rm --remove-orphans --service-ports odoo"