March 12th Update
This commit is contained in:
@@ -34,6 +34,11 @@ alias venv="source venv/bin/activate"
|
||||
# search functions
|
||||
alias grepa="grep -I -n --color=always -r --exclude-dir=venv --exclude-dir=node_modules"
|
||||
|
||||
# pipe yd-dlp to mpv
|
||||
ytmpv() {
|
||||
yt-dlp -q -o - "$1" | mpv -
|
||||
}
|
||||
|
||||
goto() {
|
||||
open="$(grepa "$@" | fzf --ansi -1)"
|
||||
if [ ! -z "$open" ]; then
|
||||
@@ -47,5 +52,3 @@ goto() {
|
||||
# NVM - Dynamic loading trick
|
||||
alias nvm="unalias nvm && [ -z $NVM_LOADED ] && export NVM_LOADED=1 && source /usr/share/nvm/init-nvm.sh ; nvm"
|
||||
alias node="unalias node && [ -z $NVM_LOADED ] && export NVM_LOADED=1 && source /usr/share/nvm/init-nvm.sh ; node"
|
||||
|
||||
source "$HOME/.swallow"
|
||||
|
22
home/swallow
22
home/swallow
@@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
MPV=/usr/bin/mpv
|
||||
|
||||
mpv() {
|
||||
EXT=${*##*.}
|
||||
|
||||
case "$*" in
|
||||
*--no-video*)
|
||||
$MPV $*
|
||||
;;
|
||||
*)
|
||||
case "$EXT" in
|
||||
ogg|opus|mp3)
|
||||
$MPV $*
|
||||
;;
|
||||
*)
|
||||
swallow $MPV $*
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
@@ -18,6 +18,8 @@ bindkey -v
|
||||
autoload -U history-search-end
|
||||
zle -N history-beginning-search-backward-end history-search-end
|
||||
zle -N history-beginning-search-forward-end history-search-end
|
||||
bindkey "^[OA" history-beginning-search-backward-end
|
||||
bindkey "^[OB" history-beginning-search-forward-end
|
||||
bindkey "^[[A" history-beginning-search-backward-end
|
||||
bindkey "^[[B" history-beginning-search-forward-end
|
||||
|
||||
|
Reference in New Issue
Block a user