1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-08 07:54:46 +00:00
dotfiles/bin/aliases

89 lines
3.8 KiB
Plaintext
Raw Normal View History

#!/usr/bin/fish
alias a 'alias -s'
2022-02-02 02:24:07 +00:00
set -U fish_features 3.0
2022-03-04 17:37:45 +00:00
rm -r ~/.config/fish/functions
a acmus 'timeout --foreground (math 3600 - (date +%s) % 3600) mpv --loop https://acmusicext.com/static/$argv/sunny/(date +%-I%p|tr APM apm).ogg'
2022-01-21 19:09:32 +00:00
a aliases 'v (env which aliases); command aliases'
a all2jxl 'fd -e{png,jpg} -x cjxl -e 8 -d 0 {} {.}.jxl && fd -e jxl -x rm {.}.{pn,jp}g'
a ao3 'grep -Eo works/[0-9]+ $argv | uniq | tr -d a-z | parallel aria2c "https://ao3.org/downloads{}/\*.epub" -d ao3; rm'
2022-02-02 02:24:07 +00:00
a base64d 'echo (echo $argv | base64 -d 2>/dev/null) | tee /dev/stderr 2>| clip;:'
a bax 'source (which bax) && bax'
a catbox 'curl https://catbox.moe/user/api.php -F reqtype=fileupload -F fileToUpload=@$argv;:'
a clip 'xclip -sel clip'
a cpugov 's cpupower frequency-set -g performance'
a dirdl 'wget -r -k -p --no-parent --no-clobber -e robots=off -R "index.html*"'
a dl 'not test "$argv" && cd ~/Downloads || aria2c -c -x16 -s16'
a dot 'cd ~/.dotfiles'
a ff 'fd -HILi -Edosdevices -E.git'
a g git
a giveme 's chown $USER'
2022-02-02 02:24:07 +00:00
a gsopti 'fd -e pdf -x gs -sDEVICE=pdfwrite -dNOPAUSE -sOutputFile={}1 {} && fd -e pdf -x mv {}1 {}'
a hardinfo 'inxi -SPARM -GCDN -v1 -xGCRS -Fxz'
2021-07-10 01:10:18 +00:00
a imgsum 'printf "$argv: " && identify -format "%#\n"'
a l ls
a la 'l -A'
2022-01-12 23:02:54 +00:00
a launcher 'rofi -combi-modi "drun,run" -show combi -modi "combi,window"'
a less 'eval $PAGER'
2022-01-12 23:02:54 +00:00
a listen 'pactl list | grep loop && set t un; pactl "$t"load-module module-loopback'
a ncdu 'ncdu --color off --graph-style hash'
2021-10-28 18:14:18 +00:00
a nix 'bax . ~/.nix-profile/etc/profile.d/nix.sh; command nix'
a off shutdown
2021-08-11 00:14:59 +00:00
a offh 'off (math "60*"$argv);:'
2021-10-08 19:24:27 +00:00
a open xdg-open
a pagedl 'wget -H -k -p --no-clobber -e robots=off'
a png2webp 'fd -e png -x cwebp -z 9 -mt {} -o {.}.webp && fd -e webp -x rm {.}.png'
a qutainer 'qutebrowser -B /tmp'
a rmdirs 'ff -t d -x rmdir -p'
2021-07-10 01:10:18 +00:00
a rmlinks 'ff -t l -x rm'
a qb 'qutebrowser --target auto'
2022-03-02 04:32:07 +00:00
a qbm 'qb (md2html $argv | psub -s .html);:'
a re 'systemctl reboot -i'
a s 'sudo env "PATH=$PATH"'
a se 's eopkg'
a spleet 'spleeter separate -o . -c flac'
2021-10-08 19:24:27 +00:00
a tar bsdtar
2022-01-12 23:02:54 +00:00
a tcsv 'curl -sL http://torrents-csv.ml/service/search?q="$argv"|jq ".[]|.name,.infohash,.seeders";:'
a temp 'curl temp.sh -T'
a tldrl 'curl -s https://raw.githubusercontent.com/tldr-pages/tldr/master/pages/{common,linux}/$argv.md;:'
a transfer 'curl https://transfer.sh/(basename $argv) -T'
2022-03-04 17:37:45 +00:00
a twitch 'mpv https://twitch.tv/$argv & disown ;:'
a twitch-dl 'ffmpeg -i (yt-dlp -e $argv[1]|tr / _) -c copy $argv[2..-1] "file:(yt-dlp -g $argv[1]).mkv"'
a untar 'tar xf'
a up 'se up --y'
a v vi
a vi nvim
2021-08-11 00:14:59 +00:00
a wallp 'gsettings set org.gnome.desktop.background picture-uri file://(realpath $argv);:'
2022-03-02 04:32:07 +00:00
a warcdl 'pagedl --warc-file=(basename $argv)'
a wm 'startx (which $argv[1]) $argv[2..-1]'
a ydl 'while not yt-dlp $argv; end;:'
a 7zstd '7z a -m0=zstd -mx22 -mmt=8 -mfb=273 -md=256m -ms=on (realpath $argv[1]).7z'
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'
2022-02-02 02:24:07 +00:00
a dwarfmount 'dwarfs -f $argv (mktemp -d | tee /dev/tty /dev/stderr 2>| clip);:'
a dwarfs 'dwarfs -o offset=auto -o tidy_strategy=swap'
a dwarfs2null 'dwarfsextract -o /dev/null -f ustar -i'
a dwarfs2tar 'dwarfsextract -o dwarfs-root.tar -f ustar -i'
a foldwarf 'appdwarf -f $argv .;:'
a redwarf 'mkdwarfs -o redwarf.dwarfs --recompress -i'
a squash 'mksquashfs . $PWD.squashfs -comp zstd -b 1M -Xcompression-level 22'
a undwarfs 'mkdir dwarfs-root; dwarfsextract -o dwarfs-root -i'
for i in (cat ~/.config/qutebrowser/quickmarks | cut -d ' ' -f1)
a $i "qb \":open -t $i\""
end
for i in deemix nsz scdl soundscrape spleeter
a $i "pipx run $i"
end
2022-03-02 04:32:07 +00:00
function alpine
set url https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64
set file (curl $url/latest-releases.yaml | grep file: | head -n1 | cut -d\ -f4)
mkdir alpine; curl $url/$file | tar xf - -Calpine
cp /etc/resolv.conf alpine/etc
proot -r alpine
end
funcsave alpine