Compare commits
2 Commits
77d340c852
...
a135a1102b
| Author | SHA1 | Date | |
|---|---|---|---|
|
a135a1102b
|
|||
|
67ef51c579
|
42
.aliases
42
.aliases
@@ -1,24 +1,31 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
|
# Vim is a disease
|
||||||
|
alias :q="exit"
|
||||||
|
|
||||||
|
# Zoxide cd replacement
|
||||||
alias cd="z"
|
alias cd="z"
|
||||||
|
|
||||||
|
# Eza ls replacement
|
||||||
|
alias ls="command eza"
|
||||||
|
|
||||||
# Easier navigation: .., ..., ...., .....
|
# Easier navigation: .., ..., ...., .....
|
||||||
alias ..="cd .."
|
|
||||||
alias cd..="cd .."
|
alias cd..="cd .."
|
||||||
|
alias ..="cd .."
|
||||||
alias ...="cd ../.."
|
alias ...="cd ../.."
|
||||||
alias ....="cd ../../.."
|
alias ....="cd ../../.."
|
||||||
alias .....="cd ../../../.."
|
alias .....="cd ../../../.."
|
||||||
alias ......="cd ../../../../.."
|
alias ......="cd ../../../../.."
|
||||||
|
|
||||||
##* Colours!
|
# Colours!
|
||||||
alias ls="command eza"
|
|
||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
alias fgrep='fgrep --color=auto'
|
alias fgrep='fgrep --color=auto'
|
||||||
alias egrep='egrep --color=auto'
|
alias egrep='egrep --color=auto'
|
||||||
alias ip='ip --color=auto'
|
alias ip='ip --color=auto'
|
||||||
# Shortcuts
|
|
||||||
alias g="git"
|
# File movement
|
||||||
alias h="history"
|
alias backup="rsync -vrltD --progress --stats"
|
||||||
alias j="jobs"
|
alias mkdir='mkdir -pv' #Intuitive mkdir
|
||||||
|
|
||||||
# alternative to tail -f
|
# alternative to tail -f
|
||||||
alias lessf="less +F"
|
alias lessf="less +F"
|
||||||
@@ -26,15 +33,12 @@ alias lessf="less +F"
|
|||||||
# List all files colorized in long format
|
# List all files colorized in long format
|
||||||
alias l="eza -G --icons"
|
alias l="eza -G --icons"
|
||||||
alias ll="eza -l --icons"
|
alias ll="eza -l --icons"
|
||||||
alias lg="eza -lG"
|
alias la="eza -la --icons"
|
||||||
|
alias lg="eza -lG --icons"
|
||||||
alias lall="eza -lahF --icons --git"
|
alias lall="eza -lahF --icons --git"
|
||||||
alias lalg="eza -laGhF --icons --git"
|
alias lalg="eza -laGhF --icons --git"
|
||||||
alias latree="eza -laGghHT --git --icons"
|
alias latree="eza -laGghHT --git --icons"
|
||||||
# List all files colorized in long format, including dot files
|
alias lsd="eza -laD" # only dirs
|
||||||
alias la="eza -la"
|
|
||||||
|
|
||||||
# List only directories
|
|
||||||
alias lsd="eza -laD"
|
|
||||||
|
|
||||||
# Enable aliases to be sudo’ed
|
# Enable aliases to be sudo’ed
|
||||||
alias sudo='sudo '
|
alias sudo='sudo '
|
||||||
@@ -47,6 +51,7 @@ alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date
|
|||||||
|
|
||||||
# Dice for the undecided
|
# Dice for the undecided
|
||||||
alias dice='echo $[ 1 + $RANDOM % 6 ]'
|
alias dice='echo $[ 1 + $RANDOM % 6 ]'
|
||||||
|
alias d20='echo $[ 1 + $RANDOM % 20 ]'
|
||||||
|
|
||||||
# IP addresses
|
# IP addresses
|
||||||
alias myip="dig +short myip.opendns.com @resolver1.opendns.com"
|
alias myip="dig +short myip.opendns.com @resolver1.opendns.com"
|
||||||
@@ -61,8 +66,6 @@ alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.ar
|
|||||||
# Ring the terminal bell
|
# Ring the terminal bell
|
||||||
alias ding="tput bel"
|
alias ding="tput bel"
|
||||||
|
|
||||||
# Backs files up using rsync, not preserving linux perms (for external drives)
|
|
||||||
alias backup="rsync -vrltD --progress --stats"
|
|
||||||
# Intuitive map function
|
# Intuitive map function
|
||||||
# For example, to list all directories that contain a certain file:
|
# For example, to list all directories that contain a certain file:
|
||||||
# find . -name .gitattributes | map dirname
|
# find . -name .gitattributes | map dirname
|
||||||
@@ -71,11 +74,9 @@ alias map="xargs -n1"
|
|||||||
# Reload the shell (i.e. invoke as a login shell)
|
# Reload the shell (i.e. invoke as a login shell)
|
||||||
alias reload="exec $SHELL -l"
|
alias reload="exec $SHELL -l"
|
||||||
|
|
||||||
alias p="ping 1.1.1.1" #See if connection works
|
|
||||||
alias pp="prettyping 1.1.1.1"
|
alias pp="prettyping 1.1.1.1"
|
||||||
|
|
||||||
alias path='echo -e ${PATH//:/\\n}' #Print each PATH entry on a separate line
|
alias path='echo -e ${PATH//:/\\n}' #Print each PATH entry on a separate line
|
||||||
alias mkdir='mkdir -pv' #Intuitive mkdir
|
|
||||||
# get top process eating memory
|
# get top process eating memory
|
||||||
alias psmem='ps -e -orss=,args= | sort -b -k1 -nr'
|
alias psmem='ps -e -orss=,args= | sort -b -k1 -nr'
|
||||||
alias psmem10='ps -e -orss=,args= | sort -b -k1 -nr | head -10'
|
alias psmem10='ps -e -orss=,args= | sort -b -k1 -nr | head -10'
|
||||||
@@ -84,15 +85,10 @@ alias pscpu='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr'
|
|||||||
alias pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head -10'
|
alias pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head -10'
|
||||||
# top10 of the history
|
# top10 of the history
|
||||||
alias hist10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10'
|
alias hist10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10'
|
||||||
alias cantbebothered='git add -a && git commit -m $(curl -s http://whatthecommit.com/index.txt | uwuify | cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1) | lolcat ) && git push'
|
alias please='sudo !!'
|
||||||
alias please='sudo'
|
|
||||||
alias simon-says='sudo'
|
|
||||||
alias runhis="anyframe-widget-execute-history"
|
|
||||||
|
|
||||||
alias gitup='for dir in $(find . -name ".git"); do cd ${dir%/*}; pwd ; git pull ; cd -; done'
|
alias gitup='for dir in $(find . -name ".git"); do cd ${dir%/*}; pwd ; git pull ; cd -; done'
|
||||||
|
|
||||||
# Default xclip to use Ctrl-c/Ctrl-v clipboard
|
# Default xclip to use Ctrl-c/Ctrl-v clipboard
|
||||||
alias xclip="xclip -selection c"
|
alias xclip="xclip -selection c"
|
||||||
alias :q="exit"
|
|
||||||
alias mirrorup='sudo reflector --verbose -c Poland -c Germany -c France -l 25 -a 2 -p https --sort rate --save /etc/pacman.d/mirrorlist'
|
alias mirrorup='sudo reflector --verbose -c Poland -c Germany -c France -l 25 -a 2 -p https --sort rate --save /etc/pacman.d/mirrorlist'
|
||||||
alias lock="swaylock --screenshots --clock --indicator --indicator-radius 100 --indicator-thickness 7 --effect-blur 7x5 --effect-vignette 0.5:0.5 --ring-color bb00cc --key-hl-color 880033 --line-color 00000000 --inside-color 00000088 --separator-color 00000000 --grace 2 --fade-in 0.2"
|
alias lock="swaylock --screenshots --clock --indicator --indicator-radius 100 --indicator-thickness 7 --effect-blur 7x5 --effect-vignette 0.5:0.5 --ring-color bb00cc --key-hl-color 880033 --line-color 00000000 --inside-color 00000088 --separator-color 00000000 --grace 2 --fade-in 0.2"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ charset = utf-8
|
|||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
[*.{c,h}pp,tex]
|
[*.{c,h}pp,tex,lua,scad]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user