-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdot_aliases
45 lines (37 loc) · 1.61 KB
/
dot_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
# -*- mode: sh; -*-
alias screensaver='open /System/Library/CoreServices/ScreenSaverEngine.app'
alias wakedesk='wakeonlan -i $HOME_IP -p 7 $DESK_MAC'
alias t='tmux'
alias tx='tmuxinator'
alias txstart='tmuxinator start $(tmuxinator list -n | tail -n +2 | fzf)'
alias txstop='tmuxinator stop $(tmuxinator list -n | tail -n +2 | fzf)'
alias tatt='tmux attach -t "$(tmux ls | fzf -1 | cut -d: -f1)"'
alias cm='chezmoi'
alias n='nvim'
alias ytdl="yt-dlp -f '(bestvideo+bestaudio/best)' --merge-output-format=mkv"
alias musicdl="yt-dlp --extract-audio --audio-format flac --audio-quality 0"
# file listing
alias lsnotes='rg -e "(TODO|FIXME|OPTIMIZE|REVIEW)"'
alias lsfiles='la | rg ^-'
alias lsdirs='la | rg ^d'
# git
alias gbd='git branch --delete $(git branch | fzf -m)'
alias gbD='git push --delete $(git branch -r | fzf -m)'
alias gselectwip='git status -s | fzf -m | awk '\''{ print $2 }'\'''
alias gcof='gselectwip | xargs git checkout --'
alias grf='gselectwip | xargs git reset HEAD'
alias gaf='gselectwip | xargs git add'
alias subreposdiffs="fd --type directory --no-ignore --hidden --prune '^.git$' -x git -C {//} diff"
# docker
alias dcp='docker compose'
alias dcpe='docker compose exec'
alias dcpp='docker compose ps'
alias dcpu='docker compose up'
alias dcpd='docker compose down'
alias dcpr='docker compose restart'
alias dstop='docker ps -a | sed "1d" | fzf -m | awk '\''{ print $1 }'\'' | xargs docker stop'
alias drm='docker ps -a | sed "1d" | fzf -m | awk '\''{ print $1 }'\'' | xargs docker rm'
alias drmi='docker images | sed "1d" | fzf -m | awk '\''{ print $3 }'\'' | xargs docker rmi -f'
basepwd() {
basename $PWD
}