-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.aliases
executable file
·111 lines (92 loc) · 2.96 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
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
#!/bin/zsh
# navigation shortcuts
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
# cat -> bat (syntax maps in ~/.config/bat/config)
alias cat="bat"
# global help aliases (zsh specific) to go through bat
alias -g -- -h='-h 2>&1 | bat --language=help --style=plain'
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
# ls + tree -> eza
alias lll=lla
alias lla='eza -la --group-directories-first --icons=always --git-ignore --git --sort ext --color=always'
alias ll='eza -l --group-directories-first --icons=always --git-ignore --git --sort ext --color=always'
alias la='eza -a --group-directories-first --icons=always'
alias ls='eza --group-directories-first'
alias tree='eza --tree --group-directories-first --icons --git-ignore -git --sort -I "node_modules|target|site-packages|.git|venv"'
# top -> btop, htop stays in place
alias top='btop'
# jq on everything
alias yq='lq --input=yaml'
alias tq='lq --input=toml'
alias JQ='lq --input=json'
# hyprland
alias hde="hyprctl dispatch exec"
# yabai
alias yw="yabai -m query --windows"
ywr() {
yw | jq ".[] | select(.app | test(\"$1\"; \"ix\"))"
}
alias ym="yabai -m query --spaces"
# make rg look like ag
alias rg="rg --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'line:style:bold' --colors 'path:fg:green' --glob=!.git/"
# du -> dust
alias du='dust -br -z1000000'
alias du1='du -d1'
alias du2='du -d2'
# misc color defaults
alias grep='grep --color=auto'
alias pacman='pacman --color=auto'
alias diff='diff -Naur --color=auto'
# common pipe aliases
alias A="awk"
alias WC="wc -l"
alias G="grep"
alias XG="xargs grep"
alias L="less"
if [[ "${OSTYPE}" =~ "darwin" ]]; then
alias C="pbcopy"
alias xdg-open="open"
else
alias C="wl-copy"
fi
# misc
alias cwd='pwd | tr -d "\r\n" | XC'
alias week='date +%V'
alias ymd='date +%Y-%m-%d'
# chrome with proxy-pac
alias chrome='google-chrome-stable --proxy-pac-url="$(~/.ssh/genpac)"'
# cargo
alias c="cargo"
alias cb="cargo build"
alias cbb="cargo build --bin"
alias ct="cargo test"
alias cv="tq .package.version -r Cargo.toml"
# docker
alias d="docker"
alias dps="docker ps"
alias dpsa="docker ps -a"
alias di="docker images"
alias dia="docker images -a"
alias dr="docker run"
alias dp="docker pull"
alias dr="docker restart"
alias drm="docker rm"
alias drmi="docker rmi"
alias db="docker build"
alias de="docker exec"
# rsync
alias rs="rsync -avz --progress -h"
alias rscp="rs"
alias rscpf="rs -u --delete"
alias rsmv="rs --remove-source-files"
# jira / work specific shortcuts that hook into starship + git
alias jc="jira-set" # write selected story id to ~/.jira_story
alias jcr="jira-risk" # ensure the mandatory fields are set for ~/.jira_story
alias jcc="jira-clean" # delete ~/.jira_story
# quick sys overview via fastfetch
alias neosys="fastfetch -c ~/.config/fastfetch/sys.jsonc"
alias neohw="fastfetch -c ~/.config/fastfetch/hw.jsonc"
alias neopriv="fastfetch -c ~/.config/fastfetch/priv.jsonc"