mirror of
https://github.com/Phantop/dotfiles
synced 2024-12-23 21:56:45 +00:00
fish: Simplify drivedl, hitolo foobar, ccache
This commit is contained in:
parent
1d8d1dcd73
commit
942e682e88
|
@ -1,6 +1,7 @@
|
|||
set -x EDITOR nvim
|
||||
set -x PAGER most
|
||||
set -x MANPAGER 'nvim +Man!'
|
||||
set -x USE_CCACHE 1
|
||||
set D ~
|
||||
|
||||
test (hostname) = aperture && set D /mnt/LocalDiskD/
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
ID="$(echo $1 | sed -n 's#.*\https\:\/\/drive\.google\.com/file/d/\([^.]*\)\/view.*#\1#;p')";
|
||||
CODE=$(wget -q --show-progress --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate "https://docs.google.com/uc?export=download&id=$ID" -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')
|
||||
aria2c --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$CODE&id=$ID" -c -x16 -s 16
|
||||
cook=/tmp/cookies
|
||||
link="https://docs.google.com/uc?export=download&id=$(echo $1 | cut -d/ -f6)"
|
||||
code=$(wget --save-cookies $cook "$link" -O- | egrep -o confirm=[0-9A-Za-z_]+)
|
||||
aria2c --load-cookies $cook "$link&$code" -c -x16 -s 16
|
||||
|
|
|
@ -1,21 +1,24 @@
|
|||
#!/usr/bin/fish
|
||||
set HIFI ~/Music/HiFi
|
||||
set LOFI /tmp/vox/LoFi
|
||||
test $argv && set LOFI $argv
|
||||
set LOFI /tmp/foo
|
||||
test -f /usr/share/man/man3/Parallel::ForkManager.3 || sudo eopkg it perl-parallel-forkmanager
|
||||
|
||||
mkdir /tmp/vox
|
||||
fusermount -u /tmp/vox
|
||||
ifuse --documents com.coppertino.VoxMobile /tmp/vox
|
||||
if test $argv
|
||||
set LOFI $argv
|
||||
else
|
||||
mkdir $LOFI
|
||||
fusermount -u $LOFI
|
||||
ifuse --documents com.foobar2000.mobile $LOFI
|
||||
end
|
||||
|
||||
if not test -d $LOFI
|
||||
cd $HIFI
|
||||
fd -t d -x mkdir -p $LOFI/{}
|
||||
fd -e flac -x opusenc --bitrate 72 {} $LOFI/{.}.opus
|
||||
fd -e flac -x opusenc --bitrate 256 {} $LOFI/{.}.opus
|
||||
end
|
||||
|
||||
set args -s $HIFI -d $LOFI -o opus -q 72 --clean sync -F 8 -a mp3,m4a,opus
|
||||
set args -s $HIFI -d $LOFI -o opus -q 256 --clean sync -F 8 -a mp3,m4a,opus
|
||||
acxi $args || wget https://github.com/smxi/acxi/raw/stable/acxi -O- -o/dev/null | perl -- - $args
|
||||
|
||||
fusermount -u /tmp/vox
|
||||
rmdir /tmp/vox
|
||||
fusermount -u $LOFI
|
||||
rmdir $LOFI
|
||||
|
|
|
@ -3,8 +3,8 @@ 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 pingo -s9
|
||||
fd -ejp{e,}g -x jpegoptim
|
||||
fd -e png -ejp{e,}g -X pingo -s9
|
||||
fd -e webp -x cwebp -z 9 -mt {} -o {}
|
||||
|
||||
fd -e{epub,zip,cbz,jar,docx,odt,apk} -x advzip -z4
|
||||
|
|
|
@ -14,7 +14,6 @@ web="arcanist aria2 nicotine-plus qutebrowser openssh-server rclone subliminal s
|
|||
se up
|
||||
se it -c system.devel $audio $dev $gui $media $rice $sys $term $web
|
||||
se rm $gnome firefox hexchat libreoffice-common onboard thunderbird
|
||||
se rm --ignore-dependency plata-theme tracker
|
||||
|
||||
echo source ~/.config/bashrc > ~/.bashrc
|
||||
install -D <(echo set -g mouse on) ~/.config/tmux/tmux.conf
|
||||
|
|
Loading…
Reference in a new issue