mirror of
https://github.com/Phantop/dotfiles
synced 2025-02-01 17:37:53 +00:00
bin: clean up simpler stuff to fish functions
This commit is contained in:
parent
939636914e
commit
eeb2d30b26
1
archpkgs
1
archpkgs
|
@ -25,6 +25,7 @@ clang
|
|||
cmake
|
||||
cpupower
|
||||
dart-sass
|
||||
doas-sudo-shim
|
||||
dolphin-emu
|
||||
dracula-gtk-theme-git
|
||||
dracula-kde-theme-git
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
#shellcheck disable=SC2046
|
||||
yay -Scc
|
||||
fc-cache -frvs
|
||||
rm -r ~/.cache/* ~/.wine/* ~/.local/pipx/.cache/
|
||||
fish -c "j --purge"
|
||||
doas journalctl --vacuum-size=1K
|
||||
bleachbit -c $(bleachbit -l|rg -v 'system.free_disk_space|system.memory')
|
||||
doas bleachbit -c $(bleachbit -l|rg -v 'system.free_disk_space|system.memory')
|
|
@ -6,4 +6,3 @@ for i in $(fd -t f); do
|
|||
mv "$i" "$1/$i"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
mkdir foo
|
||||
ifuse --documents com.foobar2000.mobile foo || exit 1
|
||||
# https://github.com/smxi/acxi/raw/stable/acxi
|
||||
acxi -s ~/Music/HiFi -d "$PWD/foo" -o opus -q 128 --clean sync -F 16 -c mp3,m4a,opus,ogg
|
||||
fusermount -u foo
|
||||
rmdir foo
|
5
bin/jqf
5
bin/jqf
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
in=$(mktemp)
|
||||
cat > "$in"
|
||||
fzf --preview-window='up:99%' --preview "jq --color-output -r {q} $in $1"
|
||||
rm -f "$in"
|
13
bin/nse
13
bin/nse
|
@ -1,13 +0,0 @@
|
|||
#!/bin/sh
|
||||
d=$(mktemp -d)
|
||||
bsdtar xf "$@" -C"$d"
|
||||
t=$(fd -e ncx . "$d")
|
||||
xml_grep content "$t" | uniq | grep content | cut -d\" -f2 |\
|
||||
sed -e 's#.*#<a href="&">&</a><br />#' -e 's#">[^/<]*/#">#'\
|
||||
-e 's/\.xhtml/\.html/g' > "$(dirname "$t")"/index.html
|
||||
fd -e xhtml . "$d" -x mv {} '{.}'.html
|
||||
if test -z "$BROWSER"; then
|
||||
BROWSER=netsurf
|
||||
fi
|
||||
eval "$BROWSER" "$(dirname "$t")"/index.html
|
||||
rm -rf "$d"
|
12
bin/optiall
12
bin/optiall
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh
|
||||
fd -e pdf -x qpdf --stream-data=compress --replace-input --compress-streams=y --recompress-flate --compression-level=9 --optimize-images {}
|
||||
|
||||
fd -e jpg -e jpeg -x jpegoptim
|
||||
fd -e webp -x cwebp -z 9 -mt {} -o {}
|
||||
|
||||
fd -t f -x advzip -z3
|
||||
fd -t f -x advdef -z3
|
||||
|
||||
fd -e mp3 -x mp3packer \; -x mv '{.}'-vbr.mp3 {}
|
||||
|
||||
fd -e so -x strip
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
fd -e pdf -x qpdf --stream-data=uncompress --replace-input --compress-streams=n --recompress-flate --compression-level=0 --optimize-images {}
|
||||
fd -e \~qpdf-orig -x rm
|
||||
fd -t f -x advzip -z0
|
||||
fd -e png -x advpng -z0
|
||||
fd -t f -x advdef -z0
|
9
fish/functions/clean.fish
Normal file
9
fish/functions/clean.fish
Normal file
|
@ -0,0 +1,9 @@
|
|||
function clean
|
||||
yay -Scc
|
||||
fc-cache -frvs
|
||||
rm -r ~/.cache/* ~/.wine/* ~/.local/pipx
|
||||
fish -c "j --purge"
|
||||
doas journalctl --vacuum-size=1K
|
||||
bleachbit -c (bleachbit -l|rg -v 'system.free_disk_space|system.memory')
|
||||
doas bleachbit -c (bleachbit -l|rg -v 'system.free_disk_space|system.memory')
|
||||
end
|
8
fish/functions/hitolo.fish
Normal file
8
fish/functions/hitolo.fish
Normal file
|
@ -0,0 +1,8 @@
|
|||
function hitolo
|
||||
mkdir /tmp/foo
|
||||
ifuse --documents com.foobar2000.mobile /tmp/foo || return 1
|
||||
# https://github.com/smxi/acxi/raw/stable/acxi
|
||||
acxi -s ~/Music/HiFi -d /tmp/foo -o opus -q 128 --clean sync -F 16 -c mp3,m4a,opus,ogg
|
||||
fusermount -u /tmp/foo
|
||||
rmdir /tmp/foo
|
||||
end
|
7
fish/functions/optiall.fish
Normal file
7
fish/functions/optiall.fish
Normal file
|
@ -0,0 +1,7 @@
|
|||
function optiall
|
||||
fd -e jpg -e jpeg -x jpegoptim
|
||||
fd -e mp3 -x mp3packer \; -x mv '{.}'-vbr.mp3 {}
|
||||
fd -e pdf -x qpdf --stream-data=compress --replace-input --compress-streams=y --recompress-flate --compression-level=9 --optimize-images {}
|
||||
fd -t f -x advdef -z3
|
||||
fd -t f -x advzip -z3
|
||||
end
|
7
fish/functions/undeflate.fish
Normal file
7
fish/functions/undeflate.fish
Normal file
|
@ -0,0 +1,7 @@
|
|||
function undefalte
|
||||
fd -t f -x advzip -z0
|
||||
fd -t f -x advdef -z0
|
||||
fd -e pdf -x qpdf --stream-data=uncompress --replace-input --compress-streams=n --recompress-flate --compression-level=0 --optimize-images {}
|
||||
fd -e \~qpdf-orig -x rm
|
||||
fd -e png -x advpng -z0
|
||||
end
|
Loading…
Reference in a new issue