bin: clean up some arguments

This commit is contained in:
Phantop 2023-09-17 16:58:45 -04:00
parent ed147f91df
commit ed63f598d4
4 changed files with 8 additions and 23 deletions

View File

@ -18,7 +18,7 @@ a base64d 'echo (echo $argv | base64 -d 2>/dev/null) | tee /dev/stderr 2>| clip;
a clip 'xsel -ib'
a cpugov 's cpupower frequency-set -g performance'
a dirdl 'wget -r -k -p -np -e robots=off'
a dl 'not test "$argv" && cd ~/Downloads || aria2c -c -{j,s,x}16'
a dl 'not test "$argv" && cd ~/Downloads || aria2c -c -{j,s,x}16 --http-accept-gzip'
a drivedl 'dl https://docs.google.com/uc?export=download&id=(echo $argv | cut -d/ -f6)&confirm=t'
a dot 'cd ~/.dotfiles'
a epubpack 'cd $argv && zip -0rX ../(basename $argv).epub mimetype *; cd ..;:'
@ -54,6 +54,7 @@ a venv 'python3 -m venv venv && source venv/bin/activate.fish && pip3 install -r
a vi nvim
a wallp 'gsettings set org.gnome.desktop.background picture-uri file://(realpath $argv);:'
a ydl 'yt-dlp'
a ytflux 'eval curl (cat ~/.miniflux)/entries?status=unread | jq .entries[].url | grep watch?v | xargs yt-dlp'
a 7zstd '7z a -m0=zstd -mx22 -mmt=8 -mfb=273 -md=1536m -ms=on (realpath $argv[1]).7z'
a compress '7z a -m0=flzma2 -mx9 -mmt=8 -mfb=273 -md=1536m -ms=on (realpath $argv[1]).7z'
@ -75,7 +76,7 @@ a transfer 'curl https://transfer.sh/(basename $argv) -T'
a history_find 'history -p (string sub -s 2 $argv[1]) | head -n1;:'
a history_last 'history -n1;:'
for i in (cat ~/.config/qutebrowser/quickmarks | cut -d ' ' -f1)
for i in (cut -d ' ' -f1 < ~/.config/qutebrowser/quickmarks)
a $i "qutebrowser / \":open $i\""
end

View File

@ -1,17 +1,8 @@
#!/bin/sh
sudo eopkg up -y
sudo eopkg dc -y
sudo eopkg rmo -y
sudo eopkg rdb -y
sudo eopkg clean -y
fc-cache -f
yay -Scc
fc-cache -frvs
rm -r ~/.cache ~/.wine ~/.local/pipx/.cache/
fish -c "j --purge"
docker system prune -f
docker image prune -a
sudo solbuild delete-cache
sudo rm -rf /var/lib/solbuild
sudo solbuild init -p unstable-x86_64
sudo journalctl --vacuum-size=1K
doas journalctl --vacuum-size=1K
bleachbit -c $(bleachbit -l|rg -v 'system.free_disk_space|system.memory')
sudo 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')

View File

@ -1,5 +1,5 @@
#!/bin/sh
in=$(mktemp)
cat /dev/stdin > "$in"
cat > "$in"
fzf --preview-window='up:99%' --preview "jq --color-output -r {q} $in $1"
rm -f "$in"

View File

@ -50,11 +50,4 @@ command Q q!
PaqSync
autocmd BufReadPost,FileReadPost *.bz3 call gzip#read("bzip3 -d")
let g:ale_linters = {'cpp': ['cc', 'clang', 'cppcheck']}
let g:ale_fixers = {'cpp': ['clang-format']}
let g:ale_linters_ignore = {'cpp': ['clangcheck', 'clangtidy']}
let g:ale_cpp_cc_options = "-std=c++17 -Wall"
let g:ale_cpp_clangd_options = "-std=c++17 -Wall"
let g:ale_c_cc_options = "-Wall -lm"
]]