1
0
forked from extern/nix-config

Migrate many aliases to abbreviations

This commit gets rid of unused aliases and in general makes everything a
lot cleaner. Since we use abbreviations to memorize the actual commands,
making an .aliases.sh file that supports multiple shells is no longer
needed. If you aren't using fish yet, I highly recommend it.
This commit is contained in:
Donovan Glover 2018-09-19 19:11:22 -04:00
parent a947b666fd
commit c332c118d4
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 21 additions and 46 deletions

View File

@ -1,49 +1,10 @@
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017-2018 Donovan Glover
alias c="clear"
alias c="clear" # Because 5 letters is too much
alias dog="pygmentize -g" # "dog" is a colorful version of cat
alias emacs="vim" # No need to start another operating system
# Make ls a lot easier to read (print directories first, just like ranger)
alias exa="exa --group-directories-first"
alias ls="exa"
alias l="ls -l"
# Use exa as a drop-in replacement for "tree" (faster, more colors, etc.)
alias tree="exa --long --tree -I 'node_modules|lib|.git'"
alias t="tree"
# Change the volume, e.g. vol 10%+, vol 10%-, vol 100%
alias vol="amixer set 'Master' "
# Quick and easy way to download the majority of online videos
alias dl="youtube-dl -f bestvideo+bestaudio"
# Easily set a new background (temporary)
alias back="feh --no-fehbg --bg-fill"
# Show the lines that are in <file2> but NOT in <file1>
alias compare="grep -nFxvf" # Usage: compare <file1> <file2>
# "dog" is a colorful version of cat
alias dog="pygmentize -g"
# Easily copy the contents of any file
alias copy="xclip -sel clip < "
####################################################################
# Launch aliases (allow us to easily open external programs)
####################################################################
alias f="launch feh --auto-zoom" # Easy image viewing with f
alias z="launch zathura" # Easy document browsing with z
alias m="launch mpv" # Easy media playing with m
alias lnox="launch inox" # Launch inox separate from the terminal
alias lfox="launch firefox" # Launch firefox separate from the terminal
####################################################################
# Fun aliases that don't serve any specific purpose
####################################################################
alias emacs="nvim" # No need to start another operating system
alias nano="nvim" # Why nano when you have vim?
alias vi="nvim" # Vim is vi improved, literally
# Use exa as a drop-in replacement for ls and tree (faster, more colors, etc.)
alias ls="exa --group-directories-first"
alias tree="exa --group-directories-first --long --tree -I 'node_modules|lib|.git'"

View File

@ -38,8 +38,22 @@ if not set -q set_abbr
abbr gss "git status"
abbr gr "git reset HEAD~" # Undo the last commit but keep changed files
abbr gre "git remote --verbose" # List all remotes
abbr grh "git reset head"
abbr grh "git reset HEAD"
abbr grr "git reset --hard HEAD~" # Remove the last commit and all changes with it
abbr dl "youtube-dl"
abbr back "feh --no-fehbg --bg-fill" # Change the background temporarily
abbr vol "amixer set 'Master' " # Change the volume, e.g. vol 10%+, vol 10%-, vol 100%
abbr copy "xclip -sel clip < " # Easily copy the contents of any file
abbr l "ls -l"
abbr t "tree"
abbr f "launch feh --auto-zoom" # Easy image viewing with f
abbr z "launch zathura" # Easy document browsing with z
abbr m "launch mpv" # Easy media playing with m
abbr lium "launch chromium" # Launch chromium separate from the terminal
abbr lfox "launch firefox" # Launch firefox separate from the terminal
end
# Start X at login