2021-01-07 14:23:59 +00:00
|
|
|
#!/usr/bin/fish
|
2022-03-21 03:12:23 +00:00
|
|
|
rm -r ~/.config/fish/*
|
2023-01-29 21:30:32 +00:00
|
|
|
stow --no-folding -d ~/.dotfiles -t ~/.config/fish fish
|
2022-03-21 03:12:23 +00:00
|
|
|
|
2024-08-13 21:53:38 +00:00
|
|
|
fish_add_path -U /opt/homebrew/{opt/{file-formula/,coreutils/libexec/gnu},}bin
|
2025-04-22 20:58:00 +00:00
|
|
|
fish_add_path -U ~/.cargo/bin /go/bin /usr/lib64/ccache/bin
|
2024-07-05 21:14:38 +00:00
|
|
|
fish_add_path -U ~/.local/appdwarf/{,apps{,/bin}}
|
2025-04-22 20:58:00 +00:00
|
|
|
fish_add_path -U ~/{.dotfiles,.local,Games}/bin
|
2024-07-05 21:14:38 +00:00
|
|
|
|
|
|
|
|
set -Ux EDITOR nvim
|
|
|
|
|
set -Ux GTK_THEME Dracula
|
|
|
|
|
set -Ux MANPAGER 'nvim +Man!'
|
2024-10-25 16:13:44 +00:00
|
|
|
set -Ux NNN_FIFO /tmp/nnn.fifo
|
|
|
|
|
set -Ux NNN_PLUG 'f:fzcd;i:imgur;j:autojump;m:nmount;p:preview-tui;s:imgview'
|
2024-07-05 21:14:38 +00:00
|
|
|
set -Ux PAGER most
|
|
|
|
|
set -Ux QT_QPA_PLATFORMTHEME qt5ct
|
|
|
|
|
set -Ux USE_CCACHE 1
|
|
|
|
|
|
|
|
|
|
set -U fish_features all
|
|
|
|
|
set -U fish_greeting
|
|
|
|
|
set -U fish_color_command --bold
|
|
|
|
|
set -U fish_color_comment red
|
|
|
|
|
set -U fish_color_end brmagenta
|
|
|
|
|
set -U fish_color_error brred
|
|
|
|
|
set -U fish_color_escape 'bryellow' '--bold'
|
|
|
|
|
set -U fish_color_match --background=brblue
|
|
|
|
|
set -U fish_color_operator bryellow
|
|
|
|
|
set -U fish_color_param cyan
|
|
|
|
|
set -U fish_color_quote yellow
|
|
|
|
|
set -U fish_color_redirection brblue
|
|
|
|
|
set -U fish_color_status red
|
|
|
|
|
set -U fish_color_user brgreen
|
|
|
|
|
set -U fish_color_valid_path --underline
|
|
|
|
|
set -U fish_pager_color_prefix 'white' '--bold' '--underline'
|
|
|
|
|
|
2022-03-21 03:12:23 +00:00
|
|
|
curl -sL https://git.io/fisher | source
|
2024-08-25 12:38:28 +00:00
|
|
|
fisher install {jorgebucaran/replay,PatrickF1/fzf,mattmc3/dict}.fish
|
2024-07-05 21:14:38 +00:00
|
|
|
|
2022-11-13 20:22:41 +00:00
|
|
|
ln -s /usr/share/autojump/autojump.fish ~/.config/fish/conf.d
|
2024-07-16 22:02:30 +00:00
|
|
|
ln -s /opt/homebrew/share/autojump/autojump.fish ~/.config/fish/conf.d/autojump.mac.fish
|
2022-11-13 20:22:41 +00:00
|
|
|
starship init fish --print-full-init > ~/.config/fish/conf.d/starship.fish
|
2021-01-07 14:23:59 +00:00
|
|
|
|
2024-07-05 21:14:38 +00:00
|
|
|
fish_update_completions
|
|
|
|
|
|
2022-03-21 03:12:23 +00:00
|
|
|
alias a 'alias -s'
|
|
|
|
|
a acmus 'timeout (math 60 - (date +%M))m mpv --loop https://acmusicext.com/static/$argv/sunny/(date +%-I%P).ogg'
|
2024-07-16 22:02:30 +00:00
|
|
|
a aliases 'v (which config.fish); config.fish'
|
2025-02-09 01:25:31 +00:00
|
|
|
a all2jxl 'fd -e{gif,jpeg,jpg,png,ppm} -x cjxl -e 8 -d 0 {} {.}.jxl \; -x rm'
|
2023-01-24 01:33:22 +00:00
|
|
|
a awall 'xwinwrap -fdt -fs -- mpv -wid WID ~/Pictures/Wall/Anim/$argv* --loop --no-osc'
|
2025-06-25 21:26:46 +00:00
|
|
|
a avg 'jq -s add/length'
|
2022-02-02 02:24:07 +00:00
|
|
|
a base64d 'echo (echo $argv | base64 -d 2>/dev/null) | tee /dev/stderr 2>| clip;:'
|
2023-04-08 19:28:19 +00:00
|
|
|
a clip 'xsel -ib'
|
2021-01-24 05:49:08 +00:00
|
|
|
a cpugov 's cpupower frequency-set -g performance'
|
2024-05-04 23:29:48 +00:00
|
|
|
a curlflux 'eval curl (cat ~/.config/miniflux)/$argv[1] $argv[2..-1];:'
|
2024-10-01 02:56:38 +00:00
|
|
|
a def 'curl dict://dict.org/d:$argv;:'
|
2022-10-18 14:28:37 +00:00
|
|
|
a dirdl 'wget -r -k -p -np -e robots=off'
|
2025-03-01 02:10:24 +00:00
|
|
|
a dl 'test -z "$argv" && cd ~/Downloads || aria2c -c -{j,s,x}16 --http-accept-gzip'
|
2021-01-07 14:23:59 +00:00
|
|
|
a dot 'cd ~/.dotfiles'
|
2023-10-13 15:31:32 +00:00
|
|
|
a drivedl 'dl https://docs.google.com/uc?export=download&id=(echo $argv | cut -d/ -f6)&confirm=t'
|
2022-09-11 23:38:40 +00:00
|
|
|
a epubpack 'cd $argv && zip -0rX ../(basename $argv).epub mimetype *; cd ..;:'
|
2021-01-24 05:49:08 +00:00
|
|
|
a ff 'fd -HILi -Edosdevices -E.git'
|
2024-04-07 17:19:30 +00:00
|
|
|
a fichub 'lynx -dump https://fichub.net/legacy/epub_export?q=$argv | grep epub? | cut -d. -f2- | dl -i-;:'
|
2023-10-26 05:58:32 +00:00
|
|
|
a fumount 'fusermount -u'
|
2021-01-07 14:23:59 +00:00
|
|
|
a g git
|
2025-02-26 02:31:13 +00:00
|
|
|
a gdl gallery-dl
|
2023-06-03 20:29:18 +00:00
|
|
|
a gittop 'cd (git root)'
|
2021-01-07 14:23:59 +00:00
|
|
|
a giveme 's chown $USER'
|
2022-03-21 03:12:23 +00:00
|
|
|
a gsopti 'fd -e pdf -x gs -sDEVICE=pdfwrite -dNOPAUSE -sOutputFile={}1 {} \; -x mv {}1 {}'
|
2021-01-07 14:23:59 +00:00
|
|
|
a hardinfo 'inxi -SPARM -GCDN -v1 -xGCRS -Fxz'
|
2024-06-20 18:18:28 +00:00
|
|
|
a htmldecode 'python3 -c "import html, sys; print(html.unescape(sys.stdin.read()))"'
|
2021-07-10 01:10:18 +00:00
|
|
|
a imgsum 'printf "$argv: " && identify -format "%#\n"'
|
2023-10-13 15:31:32 +00:00
|
|
|
a kittab 'kitty @ launch --type=tab --cwd $PWD'
|
2021-01-07 14:23:59 +00:00
|
|
|
a l ls
|
2021-12-31 19:29:17 +00:00
|
|
|
a la 'l -A'
|
2023-08-31 17:11:55 +00:00
|
|
|
a launcher 'rofi -combi-modi drun,run,window -modi combi -show'
|
2022-01-12 23:02:54 +00:00
|
|
|
a listen 'pactl list | grep loop && set t un; pactl "$t"load-module module-loopback'
|
2024-01-31 14:58:38 +00:00
|
|
|
a lock 'budgie-screensaver-command -l'
|
2024-03-16 20:14:12 +00:00
|
|
|
a magdl 'dl --seed-time=0 magnet:?xt=urn:btih:$argv;:'
|
2025-04-29 20:22:37 +00:00
|
|
|
a mangadex 'gdl --chapter-filter "language == \'English\'"'
|
2024-10-22 05:04:31 +00:00
|
|
|
a mvd mullvad
|
2023-03-27 15:33:00 +00:00
|
|
|
a nix '. ~/.nix-profile/etc/profile.d/nix.fish; command nix'
|
2024-06-30 14:07:06 +00:00
|
|
|
a nnn 'nnn -A'
|
2022-03-21 03:12:23 +00:00
|
|
|
a nsmd 'netsurf (md2html $argv | psub -s .html);:'
|
2023-10-13 15:31:32 +00:00
|
|
|
a nsp 'netsurf (pandoc $argv -s -t html | psub -s .html);:'
|
2021-01-07 14:23:59 +00:00
|
|
|
a off shutdown
|
2025-05-09 16:27:32 +00:00
|
|
|
a outfox 'firejail --private=~/Games/outfox --noprofile ./OutFox'
|
2025-02-26 02:31:13 +00:00
|
|
|
a pbdl 'gdl (trurl -s host=www.tumblr.com $argv);:'
|
2024-02-29 18:14:48 +00:00
|
|
|
a pill 's powerpill -Syu'
|
2022-03-21 03:12:23 +00:00
|
|
|
a png2webp 'fd -e png -x cwebp -z 9 -mt {} -o {.}.webp \; -x rm'
|
2024-07-17 15:02:07 +00:00
|
|
|
a py3 python3
|
|
|
|
|
a py py3
|
2023-10-13 15:31:32 +00:00
|
|
|
a qb 'qutebrowser --target auto'
|
2022-10-06 18:53:03 +00:00
|
|
|
a qutainer 'qutebrowser --temp-basedir'
|
2023-10-13 15:31:32 +00:00
|
|
|
a re 'systemctl reboot -i'
|
2024-09-02 04:32:03 +00:00
|
|
|
a remap 'xremap --mouse --ignore "ELAN0676:00 04F3:3195 Touchpad" ~/.config/xremap.yml'
|
2021-09-25 05:28:09 +00:00
|
|
|
a rmdirs 'ff -t d -x rmdir -p'
|
2021-07-10 01:10:18 +00:00
|
|
|
a rmlinks 'ff -t l -x rm'
|
2024-06-29 03:08:14 +00:00
|
|
|
a rssb 'curl rss-bridge.github.io/rss-bridge/General/Public_Hosts | pup text{} | grep https | shuf -n1 | clip'
|
2025-05-23 04:20:00 +00:00
|
|
|
a s sudo
|
2024-10-10 01:36:51 +00:00
|
|
|
a scale 'dconf write /org/gnome/desktop/interface/text-scaling-factor'
|
2025-04-22 20:58:00 +00:00
|
|
|
a smt 'echo on | s tee /sys/devices/system/cpu/smt/control'
|
2024-05-04 23:29:48 +00:00
|
|
|
a sre 'systemctl soft-reboot'
|
2023-02-05 21:11:52 +00:00
|
|
|
a sus 'systemctl suspend'
|
2025-06-13 18:25:19 +00:00
|
|
|
a sxiv nsxiv
|
2021-10-08 19:24:27 +00:00
|
|
|
a tar bsdtar
|
2024-04-07 17:19:30 +00:00
|
|
|
a tcsv 'curl https://torrents-csv.com/service/search?q=(echo $argv | tr " " +) | jless;:'
|
2024-06-20 18:18:28 +00:00
|
|
|
a up 's pacman -Syu'
|
2024-02-29 18:14:48 +00:00
|
|
|
a urldecode 'python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()))"'
|
2021-01-07 14:23:59 +00:00
|
|
|
a v vi
|
2022-03-21 03:12:23 +00:00
|
|
|
a venv 'python3 -m venv venv && source venv/bin/activate.fish && pip3 install -r requirements.txt'
|
2021-01-07 14:23:59 +00:00
|
|
|
a vi nvim
|
2024-07-17 15:02:07 +00:00
|
|
|
a vwhich 'v (which $argv);:'
|
2021-08-11 00:14:59 +00:00
|
|
|
a wallp 'gsettings set org.gnome.desktop.background picture-uri file://(realpath $argv);:'
|
2024-06-20 18:18:28 +00:00
|
|
|
a ya 'yay -a'
|
2023-04-08 19:28:19 +00:00
|
|
|
a ydl 'yt-dlp'
|
2024-08-25 12:38:28 +00:00
|
|
|
a ydlh 'ydl -S height:$argv[1] $argv[2..-1];:'
|
2021-08-10 00:46:26 +00:00
|
|
|
|
2023-01-18 22:05:43 +00:00
|
|
|
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'
|
2024-01-31 14:58:38 +00:00
|
|
|
a dwarf 'mkdwarfs -i . -o $PWD.dwarfs -f --categorize=pcmaudio -C pcmaudio/waveform::flac:level=8'
|
2022-02-02 02:24:07 +00:00
|
|
|
a dwarfmount 'dwarfs -f $argv (mktemp -d | tee /dev/tty /dev/stderr 2>| clip);:'
|
2023-02-27 04:48:17 +00:00
|
|
|
a dwarfs 'dwarfs -o offset=auto -o tidy_strategy=swap -o workers=(nproc)'
|
2022-10-03 03:02:15 +00:00
|
|
|
a dwarfs2null 'dwarfsextract -o /dev/null -f gnutar -i'
|
|
|
|
|
a dwarfs2tar 'dwarfsextract -o dwarfs-root.tar -f gnutar -i'
|
2021-02-25 21:54:50 +00:00
|
|
|
a redwarf 'mkdwarfs -o redwarf.dwarfs --recompress -i'
|
|
|
|
|
a squash 'mksquashfs . $PWD.squashfs -comp zstd -b 1M -Xcompression-level 22'
|
2021-03-06 23:40:15 +00:00
|
|
|
a undwarfs 'mkdir dwarfs-root; dwarfsextract -o dwarfs-root -i'
|
2022-05-19 03:47:32 +00:00
|
|
|
a xcompress 'fxz -T0 -9 -k'
|
2021-01-07 14:23:59 +00:00
|
|
|
|
2023-09-07 16:53:42 +00:00
|
|
|
a catbox 'curl https://catbox.moe/user/api.php -F reqtype=fileupload -F fileToUpload=@$argv;:'
|
2024-07-01 15:25:20 +00:00
|
|
|
a temp 'curl https://temp.sh/upload -F file=@$argv;:'
|
2023-09-07 16:53:42 +00:00
|
|
|
a tldr 'curl -s https://raw.githubusercontent.com/tldr-pages/tldr/main/pages/{common,linux}/$argv.md;:'
|
|
|
|
|
|
2023-06-01 14:57:08 +00:00
|
|
|
a history_find 'history -p (string sub -s 2 $argv[1]) | head -n1;:'
|
|
|
|
|
a history_last 'history -n1;:'
|
|
|
|
|
|
2025-02-09 01:25:31 +00:00
|
|
|
if type arista-python || type arista-ssh
|
2025-02-11 04:42:53 +00:00
|
|
|
a abuild 'a4c build --platform x86_64_el9 --service workspace'
|
2025-01-17 16:58:12 +00:00
|
|
|
a adef 'a grok -d'
|
2025-01-03 22:00:31 +00:00
|
|
|
a amk 'a ws make -p (basename (git root || pwd))'
|
2025-03-28 20:56:40 +00:00
|
|
|
a artic 'gb artic --schedule now'
|
2025-01-03 22:00:31 +00:00
|
|
|
a assh 'arista-ssh login -p google'
|
|
|
|
|
a bump 'gb commit -a --amend --no-edit'
|
2025-06-13 18:25:45 +00:00
|
|
|
a bug 'a reproduce --grabParams=--pool=any'
|
2025-02-26 02:31:13 +00:00
|
|
|
a clake 'curl -L http://joblog/$argv | copen -;:'
|
2025-06-13 18:25:45 +00:00
|
|
|
a cleansrc 'pushd /src; fgit status | grep untracked | string escape | cut -d\\\\ -f5 | xargs rm -r; popd'
|
2025-01-03 22:00:31 +00:00
|
|
|
a copen 'code -r'
|
|
|
|
|
a dt 'a dt'
|
|
|
|
|
a dut 'dt gd | head -n1 | cut -d/ -f3'
|
|
|
|
|
a expire 'a mts supersede -R "Tests scheduled by MATT have expired."'
|
2025-06-13 18:25:45 +00:00
|
|
|
a expireall 'muts | parallel expire -p'
|
2025-01-03 22:00:31 +00:00
|
|
|
a freshen 'sudo swi freshen /images/EOS.swi'
|
|
|
|
|
a gb 'a git'
|
2025-06-13 18:25:45 +00:00
|
|
|
a gbc 'gb create eos-trunk -n (date +%Y-%m-%d)'
|
|
|
|
|
a job 'bug -j'
|
|
|
|
|
a lake 'curl -sL http://joblog/$argv;:'
|
2025-03-28 20:56:40 +00:00
|
|
|
a lunch 'gb launch --schedule build --testing none'
|
2025-04-22 20:58:00 +00:00
|
|
|
a logscan 'a job logscan --jobId'
|
2025-03-28 20:56:40 +00:00
|
|
|
a mock 'gb mock --schedule now'
|
2025-06-13 18:25:45 +00:00
|
|
|
a muts 'a mut status -u --json | jq -r .[].name[]'
|
2025-07-01 15:23:04 +00:00
|
|
|
a oc 'gnmi -addr (dut) -username admin get /$argv | tail -n+2;:'
|
2025-01-03 22:00:31 +00:00
|
|
|
a pb 'curl -F c=@- pb/'
|
2025-03-28 20:56:40 +00:00
|
|
|
a prop 'ART_DISPLAY_PROPERTIES=$argv[1] dt info -s $argv[2] | grep $argv[1];:'
|
2025-01-03 22:00:31 +00:00
|
|
|
a pydt 'dt pyshell'
|
|
|
|
|
a reagent 'echo "edut.restartAgent(\'$argv\')" | pydt;:'
|
2025-02-26 02:31:13 +00:00
|
|
|
a rebase 'gb update --sync --rebase-topics'
|
2025-01-17 16:58:12 +00:00
|
|
|
a redt 'dt off $argv && dt on'
|
2025-06-13 18:25:45 +00:00
|
|
|
a rejects 'muts | parallel a mts show -s rejected -p'
|
2025-01-03 22:00:31 +00:00
|
|
|
a revdiff 'curl -L reviewboard/r/$argv/diff/raw'
|
|
|
|
|
a revfiles 'revdiff $argv | cut -f1 | sed -n "s|+++ |/|p";:'
|
2025-01-17 16:58:12 +00:00
|
|
|
a san 'echo "edut.cleanconfig()" | pydt'
|
2025-01-03 22:00:31 +00:00
|
|
|
a startoc 'dt ssh run "en ; conf ; management api gnmi ; transport grpc default"'
|
|
|
|
|
a tcam 'echo "edut.setTcamProfile(\'$argv\')" | pydt;:'
|
2025-06-13 18:25:45 +00:00
|
|
|
a trace 'lake $argv | trace.awk;:'
|
2025-01-03 22:00:31 +00:00
|
|
|
a topic 'gb checkout'
|
2025-06-13 18:25:45 +00:00
|
|
|
a vlake 'v http://joblog/$argv;:'
|
2025-01-03 22:00:31 +00:00
|
|
|
end
|
2024-07-23 23:54:45 +00:00
|
|
|
|
2023-09-17 20:58:45 +00:00
|
|
|
for i in (cut -d ' ' -f1 < ~/.config/qutebrowser/quickmarks)
|
2023-10-13 15:31:32 +00:00
|
|
|
a $i "qutebrowser / \":open $i\""
|
2021-01-07 14:23:59 +00:00
|
|
|
end
|
|
|
|
|
|
2025-05-23 04:20:00 +00:00
|
|
|
for i in deemix encodec eventeditor getjump git-sim mathicsscript pdf2docx portablemc ratarmount scdl spleeter trafilatura
|
2025-02-09 01:25:31 +00:00
|
|
|
a $i "uvx $i"
|
2021-01-07 14:23:59 +00:00
|
|
|
end
|
2025-02-26 02:31:13 +00:00
|
|
|
a in2csv 'uvx --from csvkit in2csv'
|
|
|
|
|
a mathics 'uvx --from mathics-django mathicsserver'
|
|
|
|
|
a jitios 'sudo uvx SideJITServer'
|