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 EDITOR nvim
|
||||||
set -x PAGER most
|
set -x PAGER most
|
||||||
set -x MANPAGER 'nvim +Man!'
|
set -x MANPAGER 'nvim +Man!'
|
||||||
|
set -x USE_CCACHE 1
|
||||||
set D ~
|
set D ~
|
||||||
|
|
||||||
test (hostname) = aperture && set D /mnt/LocalDiskD/
|
test (hostname) = aperture && set D /mnt/LocalDiskD/
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
ID="$(echo $1 | sed -n 's#.*\https\:\/\/drive\.google\.com/file/d/\([^.]*\)\/view.*#\1#;p')";
|
cook=/tmp/cookies
|
||||||
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')
|
link="https://docs.google.com/uc?export=download&id=$(echo $1 | cut -d/ -f6)"
|
||||||
aria2c --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$CODE&id=$ID" -c -x16 -s 16
|
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
|
#!/usr/bin/fish
|
||||||
set HIFI ~/Music/HiFi
|
set HIFI ~/Music/HiFi
|
||||||
set LOFI /tmp/vox/LoFi
|
set LOFI /tmp/foo
|
||||||
test $argv && set LOFI $argv
|
|
||||||
test -f /usr/share/man/man3/Parallel::ForkManager.3 || sudo eopkg it perl-parallel-forkmanager
|
test -f /usr/share/man/man3/Parallel::ForkManager.3 || sudo eopkg it perl-parallel-forkmanager
|
||||||
|
|
||||||
mkdir /tmp/vox
|
if test $argv
|
||||||
fusermount -u /tmp/vox
|
set LOFI $argv
|
||||||
ifuse --documents com.coppertino.VoxMobile /tmp/vox
|
else
|
||||||
|
mkdir $LOFI
|
||||||
|
fusermount -u $LOFI
|
||||||
|
ifuse --documents com.foobar2000.mobile $LOFI
|
||||||
|
end
|
||||||
|
|
||||||
if not test -d $LOFI
|
if not test -d $LOFI
|
||||||
cd $HIFI
|
cd $HIFI
|
||||||
fd -t d -x mkdir -p $LOFI/{}
|
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
|
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
|
acxi $args || wget https://github.com/smxi/acxi/raw/stable/acxi -O- -o/dev/null | perl -- - $args
|
||||||
|
|
||||||
fusermount -u /tmp/vox
|
fusermount -u $LOFI
|
||||||
rmdir /tmp/vox
|
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 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 -x oxipng
|
||||||
fd -e png -ejp{e,}g -X pingo -s9
|
|
||||||
fd -ejp{e,}g -x jpegoptim
|
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 webp -x cwebp -z 9 -mt {} -o {}
|
||||||
|
|
||||||
fd -e{epub,zip,cbz,jar,docx,odt,apk} -x advzip -z4
|
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 up
|
||||||
se it -c system.devel $audio $dev $gui $media $rice $sys $term $web
|
se it -c system.devel $audio $dev $gui $media $rice $sys $term $web
|
||||||
se rm $gnome firefox hexchat libreoffice-common onboard thunderbird
|
se rm $gnome firefox hexchat libreoffice-common onboard thunderbird
|
||||||
se rm --ignore-dependency plata-theme tracker
|
|
||||||
|
|
||||||
echo source ~/.config/bashrc > ~/.bashrc
|
echo source ~/.config/bashrc > ~/.bashrc
|
||||||
install -D <(echo set -g mouse on) ~/.config/tmux/tmux.conf
|
install -D <(echo set -g mouse on) ~/.config/tmux/tmux.conf
|
||||||
|
|
Loading…
Reference in a new issue