-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
83 lines (73 loc) · 2.13 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
# Colorful ZSH
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# Personal aliases
alias ls='eza --icons --color=always --group-directories-first'
alias ll='ls -lF'
alias lsa='ls -lah'
alias cls='clear && sfetch'
alias clr=';clear;test -n "$TMUX" && tmux clear-history'
alias btop='btop --utf-force'
alias spt='~/scripts/launchspt'
alias powermenu='~/scripts/powermenu'
alias slauncher='~/scripts/slauncher'
alias launcher='~/scripts/launcher'
alias nvim='nvim --listen /tmp/nvim-$RANDOM'
alias vi='nvim'
alias sfetch='neofetch --ascii_distro arch --ascii ~/machfiles/ascii'
alias ss='eval "$(starship init zsh)" && clear'
# git functions
push () {
local current_branch=$(git rev-parse --abbrev-ref HEAD)
local branches=$(git remote -v | grep push | awk '{print $1}')
for branch in "$branches"
do
git push -u "$branch" "$current_branch"
done
}
# git aliases
alias ggs='git status'
alias gga='git add'
alias ggc='git commit -m'
alias ggr='git reset'
alias ggmv='git mv -f'
alias ggrm='git rm -rf'
# alias ggp=push
alias ggui='gitui'
alias lg='lazygit'
# go to aliases
alias gs='cd $HOME/scripts && lsa'
alias gd='cd $HOME/Documents && lsa'
alias gz='cd $HOME/.zsh && lsa'
alias gb='cd $HOME/.bash && lsa'
alias gc='cd $HOME/.config && lsa'
alias gt='cd $HOME/.tmux && lsa'
alias gv='cd $HOME/.config/nvim && lsa'
alias gw='cd $HOME/Projects/Working && lsa'
alias ga='cd $HOME/Projects/Archived && lsa'
alias gsb='cd $HOME/Projects/Sandbox && lsa'
# machmarks aliases
alias m='machmarks'
alias mm='m -g'
alias ms='m -s'
alias ml='m -l'
alias mla='m -L'
# tmux aliases
alias tmkill='killall tmux'
alias tmls='tmux ls'
# python aliases
alias py='python3'
# mass change extension function
mvext () {
local current_extension="$1"
local to_extension="$2"
for f in *."$current_extension"; do mv -- "$f" "${f%.$current_extension}.$to_extension"; done
}
alias bash='clear && exec bash'
alias sourcez='source ~/.zshrc'