1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-12-24 06:06:46 +00:00

fish: improve yt-dlp, zzexe prefix

This commit is contained in:
Phantop 2021-11-19 00:25:35 -05:00
parent b880f26eb8
commit 1d8d1dcd73
4 changed files with 13 additions and 5 deletions

View file

@ -49,7 +49,8 @@ a launcher 'rofi -combi-modi "drun,run" -show combi -modi "combi,window"'
a listen 'pactl list | grep loop && pactl unload-module module-loopback || pactl load-module module-loopback'
a symlinks 'fd -td -d1 . $D -x sh -c "rm ~/{/}; rmdir ~/{/}; ln -s {} ~/{/}"'
a tcsv 'curl -sL http://torrents-csv.ml/service/search?q="$argv"|jq ".[]|.name,.infohash,.seeders";:'
a ydl 'yt-dlp -ciw --write-sub --write-auto-sub --embed-subs --sub-lang=en -o "%(title)s.%(ext)s"'
a ydl 'yt-dlp -ciw --write-sub --write-auto-sub --embed-subs --sub-lang=en --compat-options no-keep-subs \
-S lang,quality,res,fps,hdr:12,acodec,size,br,vcodec,asr,proto,ext,hasaud,source,id -o "%(title)s.%(ext)s"'
a compress '7z a -m0=flzma2 -mx9 -mmt=8 -mfb=273 -md=256m -ms=on (realpath $argv[1]).7z'
a dwarf 'mkdwarfs -i . -o $PWD.dwarfs'

View file

@ -3,7 +3,7 @@ fd -e pdf -x cpdfsqueeze {} {}
fd -e pdf -x qpdf --stream-data=compress --replace-input --compress-streams=y --recompress-flate --compression-level=9 --optimize-images {}
fd -e png -x oxipng
fd -e png -ejp{e,}g -X pinga pingo -s9
fd -e png -ejp{e,}g -X pingo -s9
fd -ejp{e,}g -x jpegoptim
fd -e webp -x cwebp -z 9 -mt {} -o {}

View file

@ -5,7 +5,7 @@ gnome="$(echo eog file-roller gnome-{photos,mpv,terminal} nautilus rhythmbox)"
audio="audacious audacious-plugins audacity opus-tools quodlibet spek"
dev="ccache docker-compose git-extras llvm-clang neovim parallel solbuild tig upx"
gui="abiword caja gmic-gimp engrampa keepassxc kitty lutris vorta"
media="avidemux gaupol jpegoptim mpv playerctl usbmuxd viewnior zathura-poppler"
media="avidemux gaupol jpegoptim mpv playerctl usbmuxd viewnior yt-dlp zathura-poppler"
rice="ant-dracula-gtk-theme font-ubuntu-ttf rofi starship stow"
term="advancecomp autojump fd fish fzf innoextract most ncdu p7zip ranger ripgrep tmux"
sys="bleachbit corectrl ifuse linux-tools-cpupower python-wheel rsync tlp"
@ -28,7 +28,7 @@ un bloc97/Anime4k ~/.config/mpv/shaders
un mozilla/pdf.js ~/.local/share/qutebrowser/pdfjs
pip3 install adblock pipx-in-pipx readability-lxml sh
parallel pipx install ::: deemix soundscrape tldr yt-dlp
parallel pipx install ::: deemix soundscrape tldr
s usermod -aG docker $USER
s systemctl enable --now docker

View file

@ -5,6 +5,11 @@ if [ "$1" == "-d" ]; then
mv "$@"~ "$@"
chmod +x "$@"
else
if [ "$1" == "-p" ]; then
shift
prefix="$1 "
shift
fi
cat > "$@"~ << 'EOF'
#!/bin/sh
dir=`dirname $0`
@ -13,7 +18,9 @@ tail -n +11 $0 | zstd -cd > $out
chmod +x $out
ln -s $out $dir
trap "res=$?" 0 1 2 3 5 10 13 15
$dir/`basename $out` $@
EOF
echo $prefix'$dir/`basename $out` $@' >> "$@"~
cat >> "$@"~ << 'EOF'
rm $out $dir/`basename $out`
exit $res
EOF