Update aliases
This commit is contained in:
parent
e215b5ffdb
commit
5432499f56
19
aliases
19
aliases
|
@ -186,8 +186,9 @@ function dl_twitch_vid {
|
|||
# Download Twitch videos
|
||||
function dl_twitch_vid_compressed {
|
||||
local format="$1"
|
||||
local url="$2"
|
||||
shift 2
|
||||
local shortname="$2"
|
||||
local url="$3"
|
||||
shift 3
|
||||
local opts="$@"
|
||||
|
||||
make_vid_dir_and_cd_into $url
|
||||
|
@ -195,7 +196,12 @@ function dl_twitch_vid_compressed {
|
|||
return
|
||||
fi
|
||||
|
||||
local name_format="%(upload_date)s-%(title)s-twitch-%(id)s"
|
||||
if [[ $shortname -eq 0 ]]; then
|
||||
local name_format="%(upload_date)s-%(title)s-twitch-%(id)s"
|
||||
else
|
||||
local name_format="%(upload_date)s-shortname-twitch-%(id)s"
|
||||
fi
|
||||
|
||||
local filename=$(youtube-dl.exe --get-filename -o "$name_format.%(ext)s" $url)
|
||||
filename="${filename:0:4}-${filename:4:2}-${filename:6}"
|
||||
|
||||
|
@ -453,6 +459,7 @@ alias dc='gdc'
|
|||
alias dot='cd ~/.dotfiles'
|
||||
alias pdot='cd ~/.private-dotfiles'
|
||||
alias duh='du -csh'
|
||||
alias exp='explorer .'
|
||||
alias f='fg'
|
||||
alias history='fc -l 1'
|
||||
alias histroy='history'
|
||||
|
@ -507,8 +514,12 @@ alias tw-dl='youtube-dl.exe -f "1080" -o "%(upload_date)s-%(title)s-twitch-%(id)
|
|||
alias tw-dl2='youtube-dl.exe -o "%(upload_date)s-%(title)s-twitch-%(id)s.%(ext)s"'
|
||||
alias tw-download-custom='dl_twitch_vid '
|
||||
alias tw-download='dl_twitch_vid "1080p"'
|
||||
alias tw-download-1080='dl_twitch_vid "1080"'
|
||||
alias tw-download-60='dl_twitch_vid "1080p60"'
|
||||
alias tw-download-60-compressed='dl_twitch_vid_compressed "1080p60"'
|
||||
alias tw-download-60-compressed='dl_twitch_vid_compressed "1080p60" 0'
|
||||
alias tw-download-60-shortname-compressed='dl_twitch_vid_compressed "1080p60" 1'
|
||||
alias tw-download-compressed='dl_twitch_vid_compressed "1080p" 0'
|
||||
alias tw-download-shortname-compressed='dl_twitch_vid_compressed "1080p" 1'
|
||||
alias tw-download-720='dl_twitch_vid "720p-1"'
|
||||
alias tw-download-720-60='dl_twitch_vid "720p60"'
|
||||
alias tw-download-4k='dl_twitch_vid "2160p"'
|
||||
|
|
|
@ -20,11 +20,11 @@ else
|
|||
fi
|
||||
|
||||
error() {
|
||||
printf "${BOLD}${RED}$1${NORMAL}"
|
||||
printf "${BOLD}${RED}$1${NORMAL}\n"
|
||||
}
|
||||
|
||||
abort() {
|
||||
error "\nAborting...\n"
|
||||
error "\nAborting..."
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
|
17
vimrc
17
vimrc
|
@ -49,7 +49,8 @@ let g:campo_theme_use_rainbow_parens = 1
|
|||
"--------------------------------------------
|
||||
|
||||
" You can further customize things in a private vimrc. I use this
|
||||
" for things that I don't want included in my public dotfiles repo.
|
||||
" for things that I don't want included in my public dotfiles repo
|
||||
" such as temp file settings.
|
||||
source ~/.vimrc.private
|
||||
|
||||
"################################################################
|
||||
|
@ -250,8 +251,18 @@ set scrolloff=3 " keep more context when scrolling off the end
|
|||
set cursorline
|
||||
set cursorcolumn
|
||||
|
||||
" Store temporary files in a central spot. The location of the cache is
|
||||
" set in the vimrc.private file that is sourced near the top of this file.
|
||||
" Store swap, backup and undo files in a central spot. I have my settings in
|
||||
" a `vimrc.private` file that is sourced near the top of this file so
|
||||
" that my drive paths aren't in this config. If you want to set them
|
||||
" here then add:
|
||||
"
|
||||
" set directory=<dir path for swap files>
|
||||
" set backupdir=<dir path for backup files>
|
||||
" if has('persistent_undo')
|
||||
" set undodir=<dir path for undo files>
|
||||
" endif
|
||||
"
|
||||
" And make sure those directories exist before opening vim.
|
||||
set backup
|
||||
set backupcopy=yes
|
||||
:au BufWritePre * let &bex = '.' . strftime("%Y-%m-%d-%T") . '.bak'
|
||||
|
|
Loading…
Reference in New Issue
Block a user