summaryrefslogtreecommitdiff
path: root/dot-config/fish/conf.d
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-10-13 22:56:18 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-10-13 22:58:22 +0800
commit542fa9ffaef0691a3a9f4ffef65f12e22c57d849 (patch)
treee3f56a823778188e418eeec2642d5785d3ae3c0e /dot-config/fish/conf.d
parent0c7001019bb345d59892de88c355b653d2680fdb (diff)
bump
Diffstat (limited to 'dot-config/fish/conf.d')
-rw-r--r--dot-config/fish/conf.d/abbr.fish351
-rw-r--r--dot-config/fish/conf.d/env.fish107
-rw-r--r--dot-config/fish/conf.d/funcs.fish107
-rw-r--r--dot-config/fish/conf.d/git.abbr.fish261
-rw-r--r--dot-config/fish/conf.d/options.fish9
-rw-r--r--dot-config/fish/conf.d/pacman.abbr.fish65
-rw-r--r--dot-config/fish/conf.d/prompt.options.fish9
-rw-r--r--dot-config/fish/conf.d/z.fish63
8 files changed, 972 insertions, 0 deletions
diff --git a/dot-config/fish/conf.d/abbr.fish b/dot-config/fish/conf.d/abbr.fish
new file mode 100644
index 00000000..3d1cf214
--- /dev/null
+++ b/dot-config/fish/conf.d/abbr.fish
@@ -0,0 +1,351 @@
+abbr -a cleanram "sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches'"
+abbr -a trim_all "sudo fstrim -va"
+abbr -a mkgrub "sudo grub-mkconfig -o /boot/grub/grub.cfg"
+abbr -a nmap "sudo nmap"
+# alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
+abbr -a update-grub "sudo update-grub"
+abbr -a mtar "tar -zcvf"
+abbr -a utar "tar -zxvf"
+abbr -a z "zip -r"
+abbr -a uz unzip
+# alias unzip='ouch d'
+# alias compress='ouch c'
+# alias zip='ouch c'
+abbr -a zip "ouch c"
+abbr -a compress zip
+abbr -a sr "source ~/.config/zsh/env.zsh"
+abbr -a .. "cd .."
+abbr -a psg "ps aux | grep -v grep | grep -i -e VSZ -e"
+abbr -a mkdir "mkdir -p"
+abbr -a fm ranger
+
+abbr -a cat "bat --plain --pager=never"
+# alias grep='grep --color=auto'
+abbr -a grep "rg --no-heading --with-filename --smart-case -F"
+abbr -a mv "mv -v"
+abbr -a cp "cp --reflink=auto -vr"
+abbr -a rm "trash -v"
+
+abbr -a gpt sgpt
+abbr -a chat gpt
+abbr -a chatgpt chat
+# chatgpt
+#alias chatgpt='chatgpt-cli'
+
+# alias ls="exa --color=auto --icons" # lsd same
+#alias l="ls -l"
+#alias la="ls -a"
+#alias lla="ls -la"
+#alias lt="ls --tree"
+# alias cat="bat --color always --plain"
+
+# better ls
+if set -q DISPLAY
+ alias ls "eza --color=auto --icons=always --hyperlink"
+else
+ alias ls "eza --color=auto"
+end
+abbr -a l "ls -l"
+abbr -a ll "ls -l"
+abbr -a la "ls -a"
+abbr -a lla "ls -laa"
+abbr -a lah "ls -laah"
+abbr -a lm "ls -m"
+abbr -a lr "ls -R"
+abbr -a lg "ls -l --group-directories-first"
+
+# common alias
+# restart terminal
+abbr -a rel "exec /bin/zsh"
+abbr -a reload "exec /bin/zsh"
+abbr -a news "exec /bin/zsh"
+abbr -a refresh "exec /bin/zsh"
+abbr -a cls clear
+# better vims
+abbr -a record "asciinema rec"
+abbr -a rec "asciinema rec"
+# libreoffice
+abbr -a librewriter "libreoffice --writer"
+abbr -a librecalc "libreoffice --calc"
+abbr -a librebase "libreoffice --base"
+abbr -a libredraw "libreoffice --draw"
+abbr -a libreimpress "libreoffice --impress"
+abbr -a libremath "libreoffice --math"
+# noouput programe
+#alias nooutput='$1 > /dev/null 2>&1 &'
+# wps test
+abbr -a wps ttyper
+abbr -a wps-cli ttyper
+abbr -a wps-test ttyper
+# web2app
+abbr -a web2app "nativefier --name "
+# alias vim='kak'
+#alias vim='/home/system/scripts/vim'
+#alias vim='lvim'
+# copy/paste from terminal
+abbr -a copy wl-copy
+abbr -a paste wl-paste
+# port forwarding & webserver
+abbr -a cloudflarepf "cloudflared tunnel --url localhost:"
+abbr -a portforward "cloudflared tunnel --url localhost:"
+abbr -a ngrokpf "ngrok http "
+function webserver
+ echo clearing background jobs
+ fg &>/dev/null
+ echo starting python webserver and making it go to background
+ sudo python3 -m http.server 80 &
+ echo forwarding the python server with cloudflare and it might not sussess
+ cloudflared tunnel --url http://127.0.0.1:80
+ echo pulling out python server from background for quit
+ fg
+ fg &>/dev/null
+ fg &>/dev/null
+end
+abbr -a localwebserver "sudo python3 -m http.server 80"
+# vpn(hide.me)
+abbr -a open-vpn "systemctl start hide.me@free-us.hideservers.net"
+abbr -a start-vpn "systemctl start hide.me@free-us.hideservers.net"
+abbr -a close-vpn "systemctl stop hide.me@free-us.hideservers.net"
+abbr -a stop-vpn "systemctl stop hide.me@free-us.hideservers.net"
+# open
+abbr -a open xdg-open
+# image clear water mark
+abbr -a cwater-mark "lama-cleaner > /dev/null 2>&1 &"
+# stablediffusion
+function aimage
+ cd /mnt/DATA/Code/AI/stable-diffusion-webui
+ ./webui.sh --use-cpu all --no-half
+ cd -
+end
+abbr -a stablediffusion aimage
+# better python
+abbr -a python bpython
+abbr -a python3 bpython
+abbr -a pip "python -m pip"
+abbr -a pipreqr "pip3 install -r requirements.txt"
+abbr -a pipreqsi installpipreqs
+# better discord
+#alias discord='discord-screenaudio'
+# better wget
+abbr -a wget "aria2c -x 16"
+# audios
+abbr -a audio pulsemixer
+abbr -a audiod pipewire-pulse
+# alias audiod='pipewire*'
+abbr -a config-bspwm "vim ~/.config/bspwm/bspwmrc"
+abbr -a config-keybind "vim ~/.config/bspwm/sxhkdrc"
+abbr -a config-polybar "vim ~/.config/bspwm/themes/default/polybar/config.ini"
+# better less/cat
+# alias less='bat --pager=always --color always --plain' # moved into utility for auto sudo # nah, the one wont work with pipe
+# alias cat='bat --pager=never' # moved into utility for auto sudo # nah, wont work with pipe
+# better diff
+#alias diff='bat -d'
+# tars
+abbr -a tarxz "tar -xvJf"
+abbr -a targz "tar -xvzf"
+# faster(vim)
+abbr -a v vim
+## auto fuck
+# better finds
+#alias find='sudo find / | grep '
+#alias findhere='sudo find | grep '
+# ip
+abbr -a pubip "curl ifconfig.co"
+# port
+abbr -a getport "lsof -i"
+# map
+abbr -a map mapscii
+# disk analyser
+abbr -a diskana ncdu
+# must run as root commands
+abbr -a sudo "sudo "
+abbr -a root "/usr/bin/sudo -i"
+abbr -a "*" sudo
+abbr -a visudo "sudo visudo"
+abbr -a snap "sudo snap"
+abbr -a fucking sudo
+abbr -a howdy "sudo howdy"
+abbr -a gparted "sudo -E gparted"
+abbr -a gpart "sudo gpart"
+abbr -a gdisk "sudo gdisk"
+abbr -a cgdisk "sudo cgdisk"
+abbr -a cfdisk "sudo cfdisk"
+abbr -a fdisk "sudo fdisk"
+abbr -a blkid "sudo blkid"
+abbr -a service systemctl
+abbr -a mkinitcpio "sudo mkinitcpio"
+abbr -a bpytop "sudo bpytop"
+abbr -a debtap "sudo debtap"
+abbr -a rpm "sudo rpm"
+abbr -a journalctl "sudo journalctl"
+abbr -a powertop "sudo powertop"
+abbr -a upgrade-grub "grub-mkconfig -o /boot/grub/grub.cfg"
+#alias update-grub='sudo update-grub'
+abbr -a grub-mkconfig "sudo grub-mkconfig"
+abbr -a update-initramfs "mkinitcpio -P"
+abbr -a kgupdate "update-initramfs && grub-mkconfig -o /boot/grub/grub.cfg"
+abbr -a locale-gen "sudo locale-gen"
+abbr -a ufw "sudo ufw"
+abbr -a swapon "sudo swapon"
+abbr -a swapoff "sudo swapoff"
+abbr -a grpck "sudo grpck"
+abbr -a pwck "sudo pwck"
+#alias npm='sudo npm'
+abbr -a npm bun
+abbr -a npx bunx
+abbr -a powerpill "sudo powerpill"
+abbr -a timeshift "sudo timeshift"
+abbr -a mount "sudo mount"
+abbr -a umount "sudo umount"
+# user/group related command
+abbr -a usermod "sudo usermod"
+abbr -a useradd "sudo useradd"
+abbr -a userdel "sudo userdel"
+abbr -a pacdiff "sudo -E pacdiff"
+# change perms
+abbr -a chown "chown -v"
+abbr -a getown "sudo chown -R $USER:$USER"
+abbr -a getread "sudo chmod +r"
+abbr -a geturead "sudo chmod u+r"
+abbr -a getgread "sudo chmod g+r"
+abbr -a getexec "sudo chmod +x"
+abbr -a getuexec "sudo chmod u+x"
+abbr -a getgexec "sudo chmod g+x"
+abbr -a getwrite "sudo chmod +w"
+abbr -a getuwrite "sudo chmod u+w"
+abbr -a getgwrite "sudo chmod g+w"
+abbr -a pipes "pipes.sh"
+# better cd
+abbr -a bcd fzf
+# view keybinds
+abbr -a keybind xev
+# bettercap
+abbr -a bettercap "sudo bettercap"
+abbr -a update "topgrade -y --no-retry"
+abbr -a upgrade update
+# alias for nix(package manager)
+#alias nix-install='nix-env -iA nixpkgs.'
+abbr -a nix-remove "nix-env -e"
+# pipes.sh config
+abbr -a pipes.sh "pipes.sh -r 0"
+# installrequirements(with pip)(from requirements.txt)
+abbr -a installrequirements "pip install -r requirements.txt"
+# alias for python
+abbr -a py python3
+# more humenize
+abbr -a df "df -h"
+abbr -a du "du -h"
+#alias free='free -h'
+# alias grep='grep --color=always'
+abbr -a frep "grep -ir"
+
+# vim:ft=zsh
+# doesn't work in zshenv
+
+# idk Y but it will say no correct
+abbr -a j "nocorrect j"
+abbr -a killall "nocorrect killall"
+abbr -a mysql mysql
+
+# alias sys='nu -c sys'
+abbr -a usys "systemctl --user"
+abbr -a sysu "systemctl --user"
+abbr -a sys systemctl
+abbr -a process "nu -c ps"
+
+# compiles
+abbr -a compile-run compile-run
+abbr -a cmp compile
+abbr -a cmpr compilerun
+# disasm
+abbr -a disasm "objdump -d"
+abbr -a discompile "objdump -d"
+#alias mpv='mpv --no-audio-display --hwdec=vaapi'
+abbr -a backup "rsync --archive --quiet --backup --partial --copy-links --cvs-exclude"
+# sent text via ix
+abbr -a sendraw ix
+abbr -a sentext ix
+# custom chat server
+abbr -a joinchat "nc 127.0.0.1 8000"
+# license
+abbr -a license "/usr/bin/cat /mnt/DATA/Code/license.txt"
+# alias license.short="sed -n '2p' /mnt/DATA/Code/license.txt"
+function license.short
+ sed -n '634,648p' /mnt/DATA/Code/license.txt
+end
+# browsh
+function browsh
+ echo "export "(env | grep --color=never LANG=)"" >$HOME/.cache/browsh.LANGcache
+ set LANG EN
+ command browsh
+ eval (cat $HOME/.cache/browsh.LANGcache)
+ rm $HOME/.cache/browsh.LANGcache
+end
+# metasploit framework
+function msfconsole
+ msfd; and /usr/bin/msfconsole; or echo "[*] msfd faild to start"
+end
+# process related stuff
+abbr -a processfind "ps -aux | grep -v grep | grep"
+abbr -a processf processfind
+abbr -a pf processfind
+
+# alias code='cursor'
+
+# help
+abbr -a help tldr
+
+abbr -a mt memento-timeline
+
+# xdg-ninja suggested
+abbr -a svn 'svn --config-dir $XDG_CONFIG_HOME/subversion'
+
+# server stuff
+function getfs
+ scp -P 2002 -R ssh.littleblack111.com:$argv .
+end
+function putfile
+ scp -P 2002 -R $argv ssh.littleblack111.com:~
+end
+function putfs
+ scp -P 2002 -R $argv ssh.littleblack111.com:~/server/public-fs
+end
+
+# colors
+# alias ping='prettyping'
+# alias make='colormake'
+
+# video screen cast using v4l2
+abbr -a camscreen "wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video9 -x yuv420p"
+abbr -a screencam "wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video9 -x yuv420p"
+abbr -a camerascreen "wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video9 -x yuv420p"
+abbr -a screencamera "wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video9 -x yuv420p"
+abbr -a image-clean "iopaint start --host 0.0.0.0 --enable-anime-seg --enable-realesrgan --realesrgan-device cuda --enable-restoreformer --restoreformer-device cuda --enable-gfpgan --gfpgan-device cuda --disable-nsfw-checker --inbrowser --model-dir \$XDG_DATA_HOME/AI/IOPaint/modules"
+
+# hyprland overlay
+abbr -a hyproverlay "hyprctl keyword debug:overlay true"
+abbr -a dhyproverlay "hyprctl keyword debug:overlay false"
+abbr -a hyproverlayd "hyprctl keyword debug:overlay false"
+
+abbr -a cavabg "alacritty --class winwrap -e cava"
+abbr -a bgcava "alacritty --class winwrap -e cava"
+
+# cpu freq
+abbr -a cpuperf "sudo cpupower frequency-set -g performance"
+abbr -a cpups "sudo cpupower frequency-set -g powersave"
+
+# better time benchmark
+abbr -a time "hyperfine --warmup 3 -N"
+
+function '??'
+ set file (mktemp)
+ gh copilot suggest -t shell $argv --shell-out $file
+ eval (cat $file)
+ rm $file
+end
+
+abbr -a icat "kitten icat"
+
+abbr -a mkcd "nocorrect mkcd"
+
+abbr -a cd z
diff --git a/dot-config/fish/conf.d/env.fish b/dot-config/fish/conf.d/env.fish
new file mode 100644
index 00000000..e6d4b973
--- /dev/null
+++ b/dot-config/fish/conf.d/env.fish
@@ -0,0 +1,107 @@
+##
+## PATH & ENV Var
+##
+
+# PNPM, Qt/QML, Wine
+set -x PNPM_HOME "$HOME/.local/share/pnpm"
+set -x QML_IMPORT_PATH /usr/lib/qt6/qml
+set -x WINEPREFIX /opt/windows.wine
+
+# PATHs (Fish keeps PATH as a list; prepend/append with -xg to export globally)
+# Preserve order as in your zsh config
+set -xg PATH $PNPM_HOME $PATH
+set -xg PATH $HOME/scripts $PATH
+set -xg PATH $HOME/scripts/bin $PATH
+set -xg PATH $PATH $HOME/.local/bin
+set -xg PATH $HOME/.cargo/bin $PATH
+set -xg PATH $PATH /snap/bin
+set -xg PATH $PATH $HOME/.cache/.bun/bin
+set -xg PATH $PATH $HOME/go/bin
+set -xg PATH $PATH /home/system/.spicetify
+
+# GPG_TTY and SUDO_PROMPT
+# Fish: tty is a builtin; emulate ${TTY:-$(tty)}
+if set -q TTY
+ set -x GPG_TTY "$TTY"
+else
+ set -x GPG_TTY (tty)
+end
+set -x SUDO_PROMPT "pass: "
+
+# Term/browser/editor
+set -x TERMINAL kitty
+set -x BROWSER zen-browser
+set -x VISUAL hx
+set -x EDITOR "$VISUAL"
+
+# XDG base dirs
+set -x XDG_CONFIG_HOME "$HOME/.config"
+set -x XDG_CACHE_HOME "$HOME/.cache"
+set -x XDG_DATA_HOME "$HOME/.local/share"
+set -x XDG_STATE_HOME "$HOME/.local/state"
+set -x XDG_CONFIG_DIRS /etc/xdg
+set -x XDG_DATA_DIRS "/usr/local/share:/usr/share:/var/lib/flatpak/exports/share:$XDG_DATA_HOME/flatpak/exports/share"
+set -x XDG_RUNTIME_DIR "/run/user/(id -u)"
+set -x XDG_DESKTOP_DIR "$HOME/Desktop"
+set -x XDG_DOWNLOAD_DIR "$HOME/Downloads"
+set -x XDG_TEMPLATES_DIR "$HOME/Templates"
+set -x XDG_PUBLICSHARE_DIR "$HOME/Public"
+set -x XDG_DOCUMENTS_DIR "$HOME/Documents"
+set -x XDG_MUSIC_DIR "$HOME/Music"
+set -x XDG_PICTURES_DIR "$HOME/Pictures"
+set -x XDG_VIDEOS_DIR "$HOME/Videos"
+
+# Pager/editor helpers
+set -x MANPAGER 'nvim +Man! +"set nocul" +"set noshowcmd" +"set noruler" +"set noshowmode" +"set laststatus=0" +"set showtabline=0" +"set nonumber"'
+set -x DIFFPROG 'nvim -d'
+# set -x MANPAGER "lvim +Man"
+
+# If using nvim as MANPAGER, optional LESS termcaps (kept commented as in your file)
+# if test (echo $MANPAGER | awk '{print $1}') = nvim
+# set -x LESS "--RAW-CONTROL-CHARS"
+# # set -x MANPAGER "less -s -M +Gg"
+# set -x LESS_TERMCAP_mb \e'[1;32m'
+# set -x LESS_TERMCAP_md \e'[1;32m'
+# set -x LESS_TERMCAP_me \e'[0m'
+# set -x LESS_TERMCAP_se \e'[0m'
+# set -x LESS_TERMCAP_so \e'[01;33m'
+# set -x LESS_TERMCAP_ue \e'[0m'
+# set -x LESS_TERMCAP_us \e'[1;4;31m'
+# end
+
+# less source highlight
+set -x LESSOPEN "| /usr/bin/source-highlight-esc.sh %s"
+set -x LESS "-R "
+
+# FZF bases (kept commented)
+# set -x FZF_DEFAULT_OPTS "
+# --color fg:#cdd6f4
+# --color fg+:#cdd6f4
+# --color bg:#1e1e2e
+# --color bg+:#313244
+# --color hl:#f38ba8
+# --color hl+:#f38ba8
+# --color info:#cba6f7
+# --color prompt:#cba6f7
+# --color spinner:#f5e0dc
+# --color pointer:#f5e0dc
+# --color marker:#f5e0dc
+# --color border:#1e1e2e
+# --color header:#f38ba8
+# --prompt ' '
+# --pointer ' λ'
+# --layout=reverse
+# --border horizontal
+# --height 40
+# "
+
+# LS_COLORS (huge; intentionally kept commented as in your file)
+# set -x LS_COLORS '...'
+
+# set -x LANG "zh_CN.UTF-8"
+
+# vim:ft=zsh:nowrap (left as comment for fidelity)
+
+# source $HOME/.config/zsh/env.local.zsh
+# In Fish, source a Fish file instead if you have one:
+# test -f $HOME/.config/fish/env.local.fish; and source $HOME/.config/fish/env.local.fish
diff --git a/dot-config/fish/conf.d/funcs.fish b/dot-config/fish/conf.d/funcs.fish
new file mode 100644
index 00000000..82c8411b
--- /dev/null
+++ b/dot-config/fish/conf.d/funcs.fish
@@ -0,0 +1,107 @@
+# vim with auto sudo
+function vim
+ if test (count $argv) -eq 0
+ if not test -w (pwd)
+ printf "Opening vim with sudo...\n"
+ sudo -E $EDITOR
+ return
+ else
+ printf "Opening vim...\n"
+ $EDITOR
+ return
+ end
+ end
+
+ if not test -e $argv[1]
+ printf "%s doesn't exist\ntouch File '%s'?(y/N)" $argv[1] $argv[1]
+ read -l choice
+ if test "$choice" = y -o "$choice" = Y
+ echo
+ if not test -w (dirname $argv[1])
+ printf "Opening vim with sudo...\n"
+ sudo -E $EDITOR $argv[1]
+ if not test -e $argv[1]
+ printf "File \"%s\" is isn't saved, auto deleted...\n" $argv[1]
+ return
+ end
+ return
+ else
+ printf "Opening vim...\n"
+ $EDITOR $argv[1]
+ if not test -e $argv[1]
+ printf "File \"%s\" is isn't saved, auto deleted...\n" $argv[1]
+ return
+ end
+ return
+ end
+ else
+ printf '\nExiting...\n'
+ return
+ end
+ end
+
+ if not test -w $argv[1]
+ printf "Opening vim with sudo...\n"
+ sudo -E $EDITOR $argv[1]
+ return
+ else if test -e $argv[1]
+ printf "Opening vim...\n"
+ $EDITOR $argv[1]
+ return
+ end
+end
+
+function unzip
+ ouch d --dir (string replace -r '\.[^./]+$' '' -- $argv[1]) $argv
+end
+
+function path
+ echo (pwd)/$argv[1]
+end
+
+function vimake
+ if test -e Makefile
+ $EDITOR Makefile
+ else
+ printf "No Makefile"
+ end
+end
+
+function vimpkg
+ if test -e PKGBUILD
+ nvim PKGBUILD
+ else
+ printf "No PKGBUILD"
+ end
+end
+
+function installpipreqs
+ if test -e requirements.txt
+ pip install -r requirements.txt
+ else
+ echo "There isn't a requirements.txt"
+ end
+end
+
+function killzombie
+ set -l pid (ps -A -ostat,ppid | awk '/[zZ]/ && !a[$2]++ {print $2}')
+ if test -z "$pid"
+ echo "No zombie processes found."
+ else
+ set -l cmd (ps -p $pid -o cmd | sed '1d')
+ echo "Found zombie process PID: $pid"
+ echo "$cmd"
+ echo "Kill it? Return to continue… (ctrl+c to cancel)"
+ read -l
+ sudo kill -9 $pid
+ end
+end
+
+function createrepo
+ gh repo create $argv[1] --add-readme --license gpl-3.0 $argv[2..-1] --public
+ # tea repo create --name $1 --init --readme Default --license gpl3 --branch main ${@:2}
+end
+
+function tempsend
+ bw send $argv ^/dev/null | jq -r '.accessUrl'
+end
diff --git a/dot-config/fish/conf.d/git.abbr.fish b/dot-config/fish/conf.d/git.abbr.fish
new file mode 100644
index 00000000..5a37d812
--- /dev/null
+++ b/dot-config/fish/conf.d/git.abbr.fish
@@ -0,0 +1,261 @@
+
+#!/bin/bash
+
+set -x LOG_HASH "%C(always,yellow)%h%C(always,reset)"
+set -x LOG_RELATIVE_TIME "%C(always,green)(%ar)%C(always,reset)"
+set -x LOG_AUTHOR "%C(always,blue)<%an>%C(always,reset)"
+set -x LOG_REFS "%C(always,red)%d%C(always,reset)"
+set -x LOG_SUBJECT "%s"
+
+set -x LOG_FORMAT "$LOG_HASH}$LOG_AUTHOR}$LOG_RELATIVE_TIME}$LOG_SUBJECT $LOG_REFS"
+
+set -x BRANCH_PREFIX "%(HEAD)"
+set -x BRANCH_REF "%(color:red)%(color:bold)%(refname:short)%(color:reset)"
+set -x BRANCH_HASH "%(color:yellow)%(objectname:short)%(color:reset)"
+set -x BRANCH_DATE "%(color:green)(%(committerdate:relative))%(color:reset)"
+set -x BRANCH_AUTHOR "%(color:blue)%(color:bold)<%(authorname)>%(color:reset)"
+set -x BRANCH_CONTENTS "%(contents:subject)"
+
+set -x BRANCH_FORMAT "}$BRANCH_PREFIX}$BRANCH_REF}$BRANCH_HASH}$BRANCH_DATE}$BRANCH_AUTHOR}$BRANCH_CONTENTS"
+
+function show_git_head
+ pretty_git_log -1
+ git show -p --pretty="tformat:"
+end
+
+function pretty_git_log
+ git log --since="12 months ago" --graph --pretty="tformat:$LOG_FORMAT" $argv | pretty_git_format | git_page_maybe
+end
+
+function pretty_git_log_all
+ git log --all --since="12 months ago" --graph --pretty="tformat:$LOG_FORMAT" $argv | pretty_git_format | git_page_maybe
+end
+
+function gb
+ git branch -v --color=always --format=$BRANCH_FORMAT --sort=-committerdate $argv | pretty_git_format
+end
+
+function pretty_git_format
+ sed -Ee 's/(^[^)]*) ago\)/\1)/' \
+ | sed -Ee 's/(^[^)]*), [[:digit:]]+ .*months?\)/\1)/' \
+ | sed -Ee 's/ seconds?\)/s\)/' \
+ | sed -Ee 's/ minutes?\)/m\)/' \
+ | sed -Ee 's/ hours?\)/h\)/' \
+ | sed -Ee 's/ days?\)/d\)/' \
+ | sed -Ee 's/ weeks?\)/w\)/' \
+ | sed -Ee 's/ months?\)/M\)/' \
+ | sed -Ee 's/<Andrew Burgess>/<me>/' \
+ | sed -Ee 's/<([^ >]+) [^>]*>/<\1>/' \
+ | column -s '}' -t
+end
+
+#alias tree='tree -a -I .git'
+# alias commit="git add . && git commit -m"
+# alias push="git push"
+abbr -a git-rm "git ls-files --deleted -z | xargs -0 git rm"
+# alias g=git
+#alias ga='git add'
+# alias gaa='git add --all'
+# alias gam='git am'
+# alias gama='git am --abort'
+# alias gamc='git am --continue'
+# alias gams='git am --skip'
+# alias gamscp='git am --show-current-patch'
+# alias gap='git apply'
+# alias gapa='git add --patch'
+# alias gapt='git apply --3way'
+# alias gau='git add --update'
+# alias gav='git add --verbose'
+# alias gb='git branch'
+# alias gbD='git branch -D'
+# alias gba='git branch -a'
+# alias gbd='git branch -d'
+# alias gbda='git branch --no-color --merged | command grep -vE "^([+*]|\s*($(git_main_branch)|$(git_develop_branch))\s*$)" | command xargs git branch -d 2>/dev/null'
+# alias gbl='git blame -b -w'
+# alias gbnm='git branch --no-merged'
+# alias gbr='git branch --remote'
+# alias gbs='git bisect'
+# alias gbsb='git bisect bad'
+# alias gbsg='git bisect good'
+# alias gbsr='git bisect reset'
+# alias gbss='git bisect start'
+#alias gc='git commit -v'
+# alias 'gc!'='git commit -v --amend'
+# alias gca='git commit -v -a'
+# alias 'gca!'='git commit -v -a --amend'
+# alias gcam='git commit -a -m'
+# alias 'gcan!'='git commit -v -a --no-edit --amend'
+# alias 'gcans!'='git commit -v -a -s --no-edit --amend'
+# alias gcas='git commit -a -s'
+# alias gcasm='git commit -a -s -m'
+# alias gcb='git checkout -b'
+# alias gcd='git checkout $(git_develop_branch)'
+# alias gcf='git config --list'
+# alias gclr='git clone --recurse-submodules'
+# alias gcld='git clone --depth'
+# alias gclean='git clean -id'
+# alias gcm='git checkout $(git_main_branch)'
+# alias gcmsg='git commit -m'
+# alias 'gcn!'='git commit -v --no-edit --amend'
+# alias gco='git checkout'
+# alias gcor='git checkout --recurse-submodules'
+# alias gcount='git shortlog -sn'
+# alias gcp='git cherry-pick'
+# alias gcpa='git cherry-pick --abort'
+# alias gcpc='git cherry-pick --continue'
+# alias gcs='git commit -S'
+# alias gcsm='git commit -s -m'
+# alias gcss='git commit -S -s'
+# alias gcssm='git commit -S -s -m'
+abbr -a gd "git diff"
+# alias gdca='git diff --cached'
+# alias gdct='git describe --tags $(git rev-list --tags --max-count=1)'
+# alias gdcw='git diff --cached --word-diff'
+# alias gds='git diff --staged'
+# alias gdt='git diff-tree --no-commit-id --name-only -r'
+# alias gdup='git diff @{upstream}'
+# alias gdw='git diff --word-diff'
+# alias gf='git fetch'
+# alias gfa='git fetch --all --prune --jobs=10'
+# alias gfg='git ls-files | grep'
+# alias gfo='git fetch origin'
+# alias gg='git gui citool'
+# alias gga='git gui citool --amend'
+# alias ggpull='git pull origin "$(git_current_branch)"'
+# alias ggpur=ggu
+# alias ggpush='git push origin "$(git_current_branch)"'
+# alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
+# alias ghh='git help'
+# alias gignore='git update-index --assume-unchanged'
+# alias gignored='git ls-files -v | grep "^[[:lower:]]"'
+# alias git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk'
+# alias gk='\gitk --all --branches &!'
+# alias gke='\gitk --all $(git log -g --pretty=%h) &!'
+# alias gl='git pull'
+# alias glg='git log --stat'
+# alias glgg='git log --graph'
+# alias glgga='git log --graph --decorate --all'
+# alias glgm='git log --graph --max-count=10'
+# alias glgp='git log --stat -p'
+# alias glo='git log --oneline --decorate'
+# alias globurl='noglob urlglobber '
+# alias glod='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'\'
+# alias glods='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'\'' --date=short'
+# alias glog='git log --oneline --decorate --graph'
+# alias gloga='git log --oneline --decorate --graph --all'
+# alias glol='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'\'
+# alias glola='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'\'' --all'
+# alias glols='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'\'' --stat'
+# alias glp=_git_log_prettily
+# alias glum='git pull upstream $(git_main_branch)'
+# alias gm='git merge'
+# alias gma='git merge --abort'
+# alias gmom='git merge origin/$(git_main_branch)'
+# alias gmtl='git mergetool --no-prompt'
+# alias gmtlvim='git mergetool --no-prompt --tool=vimdiff'
+# alias gmum='git merge upstream/$(git_main_branch)'
+# alias gpd='git push --dry-run'
+# alias gpf='git push --force-with-lease'
+# alias 'gpf!'='git push --force'
+# alias gpoat='git push origin --all && git push origin --tags'
+# alias gpr='git pull --rebase'
+# alias gpristine='git reset --hard && git clean -dffx'
+# alias gpsup='git push --set-upstream origin $(git_current_branch)'
+# alias gpu='git push upstream'
+# alias gpv='git push -v'
+# alias gpd='git push origin --delete'
+abbr -a gr "git remote"
+# alias gra='git remote add'
+# alias grb='git rebase'
+# alias grwh='git rm --cached `git ls-files -i -c --exclude-from=.gitignore`'
+# alias grwhx='git ls-files -i -c --exclude-from=.gitignore | xargs git rm --cached'
+# alias grad='git rm -r --cached . && git add .'
+# alias grba='git rebase --abort'
+# alias grbc='git rebase --continue'
+# alias grbd='git rebase $(git_develop_branch)'
+# alias grbi='git rebase -i'
+# alias grbm='git rebase $(git_main_branch)'
+# alias grbo='git rebase --onto'
+# alias grbom='git rebase origin/$(git_main_branch)'
+# alias grbs='git rebase --skip'
+# alias grep='grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}'
+# alias grev='git revert'
+# alias grh='git reset'
+# alias grhh='git reset --hard'
+# alias grm='git rm'
+# alias grmc='git rm --cached'
+# alias grmv='git remote rename'
+# alias groh='git reset origin/$(git_current_branch) --hard'
+# alias grrm='git remote remove'
+# alias grs='git restore'
+# alias grset='git remote set-url'
+# alias grss='git restore --source'
+# alias grst='git restore --staged'
+# alias grt='cd "$(git rev-parse --show-toplevel || echo .)"'
+# alias gru='git reset --'
+# alias grup='git remote update'
+# alias grv='git remote -v'
+# alias gsb='git status -sb'
+# alias gsd='git svn dcommit'
+# alias gsh='git show'
+# alias gsi='git submodule init'
+# alias gsps='git show --pretty=short --show-signature'
+# alias gsr='git svn rebase'
+# alias gss='git status -s'
+# alias gst='git status'
+# alias gsta='git stash push'
+# alias gstaa='git stash apply'
+# alias gstall='git stash --all'
+# alias gstc='git stash clear'
+# alias gstd='git stash drop'
+# alias gstl='git stash list'
+# alias gstp='git stash pop'
+# alias gsts='git stash show --text'
+# alias gstu='gsta --include-untracked'
+# alias gsu='git submodule update'
+# alias gsw='git switch'
+# alias gswc='git switch -c'
+# alias gswd='git switch $(git_develop_branch)'
+# alias gswm='git switch $(git_main_branch)'
+# alias gtl='gtl(){ git tag --sort=-v:refname -n -l "${1}*" }; noglob gtl'
+# alias gts='git tag -s'
+# alias gtv='git tag | sort -V'
+# alias gunignore='git update-index --no-assume-unchanged'
+# alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
+# alias gup='git pull --rebase'
+# alias gupa='git pull --rebase --autostash'
+# alias gupav='git pull --rebase --autostash -v'
+# alias gupv='git pull --rebase -v'
+# alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
+# alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m "--wip-- [skip ci]"'
+# alias gcl='git clone --recurse-submodules'
+abbr -a gl "git log --decorate --graph"
+function gcl
+ git clone --recurse-submodules $argv; or gh repo clone $argv -- --recurse-submodules
+end
+# alias gi='git init'
+# alias gl='git log'
+#alias ga='git add'
+# alias gc='git commit -am'
+abbr -a gc "git commit --verbose -S -m"
+abbr -a gcnm 'git commit --verbose --allow-empty-message -S -m ""'
+abbr -a gca "git commit --verbose -S -am"
+# alias gp='git push origin main'
+# alias gp='git remote | xargs -L1 git push --all' # moved to funcs
+abbr -a gp 'git remote | xargs -L1 git push'
+abbr -a gpd 'git remote | xargs -L1 git push --delete'
+# alias gpf='git push --force-with-lease'
+abbr -a gitp 'git remote | xargs -L1 git pull'
+abbr -a gs "git status"
+abbr -a gitrm "git rm --cached -rf"
+# alias gsb='git switch'
+# alias gcb='git checkout -b'
+# alias gu='ga && gc update && git push'
+function ghcl
+ gh repo clone $argv -- --recurse-submodules
+end
+# alias ghdb='git push origin --delete'
+# alias ghcr='gh repo create'
+# alias ghpr='gh pr'
+# alias ghis='gh issue'
+abbr -a bisectundo 'git bisect log | head -n -2 > /tmp/fixed_bisect.log ; git bisect replay /tmp/fixed_bisect.log'
diff --git a/dot-config/fish/conf.d/options.fish b/dot-config/fish/conf.d/options.fish
new file mode 100644
index 00000000..21783bad
--- /dev/null
+++ b/dot-config/fish/conf.d/options.fish
@@ -0,0 +1,9 @@
+if ! status is-interactive
+ return
+end
+
+# set fish_cursor_default line blink
+set fish_cursor_default block
+set fish_cursor_insert line blink
+set fish_cursor_external block
+set fish_cursor_visual block
diff --git a/dot-config/fish/conf.d/pacman.abbr.fish b/dot-config/fish/conf.d/pacman.abbr.fish
new file mode 100644
index 00000000..8e146978
--- /dev/null
+++ b/dot-config/fish/conf.d/pacman.abbr.fish
@@ -0,0 +1,65 @@
+# pacman/yay helpers
+
+abbr -a pacman-key "sudo pacman-key"
+abbr -a add-pacman-repository "sudo add-pacman-repository"
+abbr -a downgrade "sudo downgrade"
+# better pacman
+#abbr -a pacman "paru"
+abbr -a pacman "yay "
+#abbr -a pacman "pamac"
+#abbr -a pacman "sudo pacman"
+#abbr -a apt "pamac" # idk there is a package called apt lmao
+
+# full system upgrade/update
+abbr -a mirror "sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
+abbr -a mirrord "sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
+abbr -a mirrors "sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
+abbr -a mirrora "sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
+# abbr -a update 'sudo npm update -g & nix-env -u & brew upgrade & flatpak update -y & tldr -u & yay -Syu --noconfirm --disable-download-timeout' # pipx upgrade-all
+
+# more pacman alis
+alias packagelistignoreall 'paru --color always -Sl | sed -e "s: :/:; s/ unknown-version//; /已安装/d" | fzf --multi --ansi --preview "yay -Si {1}" | cut -d" " -f1 | xargs -ro yay -S'
+alias package "paru --color always -Sl \
+ | fzf --multi --ansi --preview 'yay -Si {2}' \
+ | awk '{print $2}' \
+ | xargs -r yay -S --noconfirm"
+# abbr -a packagelist 'paru --color always -Sl | sed -e "s: :/:; /unknown-version/d" | fzf --multi --ansi --preview "yay -Si {1}" | cut -d" " -f1 | xargs -ro yay -S'
+alias packagef "/usr/bin/cat /tmp/yaySl | cut -d' ' -f2 | fzf --multi --ansi --preview 'yay -Si {1}' | xargs -ro paru -S --skipreview --needed"
+abbr -a pi "pacman --noconfirm -S --needed"
+abbr -a pic "pacman --noconfirm -S --needed --ask 4"
+abbr -a pico "pacman --noconfirm -S --overwrite \"*\" --needed --ask 4"
+abbr -a picdep "pacman --noconfirm -Sd --needed --ask 4 --nodeps"
+abbr -a pidep "pacman --noconfirm -S --asdeps --needed"
+abbr -a pindep "pacman --noconfirm -Sd --nodeps"
+abbr -a pif "pacman --noconfirm --force -S --needed"
+abbr -a pifd "pacman -Sd --needed --nodeps"
+abbr -a pio "pacman --noconfirm -S --overwrite \"*\" --needed"
+abbr -a prio "pacman --noconfirm -S --overwrite \"*\""
+abbr -a priob "pacman --noconfirm -S --overwrite \"*\" --rebuild"
+#abbr -a ps "pacman --noconfirm -S --needed"
+abbr -a pr "pacman --noconfirm -Rns"
+abbr -a prndep "pacman --noconfirm -Rnsd --nodeps"
+abbr -a pri "pacman --noconfirm -S"
+abbr -a prib "pacman --noconfirm -S --rebuild"
+abbr -a pc "pacman -Scc"
+abbr -a clean "pacman -Scc"
+abbr -a pf "pacman --noconfirm "
+abbr -a p pacman
+abbr -a autoremove 'pacman -Rcns (pacman -Qdtq)'
+abbr -a pd downgrade
+#abbr -a pi 'nocorrect pi'
+#abbr -a pr 'nocorrect pr'
+#abbr -a p 'nocorrect p'
+#abbr -a pacman 'nocorrect pacman'
+
+abbr -a pacin 'pacman -Slq | fzf -m --preview \'cat <(pacman -Si {1}) <(pacman -Fl {1} | awk "{print \$2}")\' | xargs -ro sudo pacman -S'
+abbr -a paruin 'paru -Slq | fzf -m --preview \'cat <(paru -Si {1}) <(paru -Fl {1} | awk "{print \$2}")\' | xargs -ro paru -S'
+abbr -a pacrem 'pacman -Qq | fzf --multi --preview \'pacman -Qi {1}\' | xargs -ro sudo pacman -Rns'
+# abbr -a pac 'pacman -Q | fzf'
+abbr -a parucom "paru -Gc"
+abbr -a parupd "paru -Qua"
+abbr -a pacupd "pacman -Qu"
+abbr -a parucheck "paru -Gp"
+abbr -a cleanpac 'sudo pacman -Rns (pacman -Qtdq); and paru -c'
+abbr -a installed "grep -i installed /var/log/pacman.log"
+# abbr -a pacman "sudo pacman"
diff --git a/dot-config/fish/conf.d/prompt.options.fish b/dot-config/fish/conf.d/prompt.options.fish
new file mode 100644
index 00000000..cc226746
--- /dev/null
+++ b/dot-config/fish/conf.d/prompt.options.fish
@@ -0,0 +1,9 @@
+# git
+set -g __fish_git_prompt_show_informative_status 1
+set -g __fish_git_prompt_showdirtystate 1
+set -g __fish_git_prompt_showuntrackedfiles 1
+set -g __fish_git_prompt_showupstream auto
+set -g __fish_git_prompt_showstashstate 1
+set -g __fish_git_prompt_showcolorhints 1
+
+set -g fish_prompt_pwd_dir_length 0
diff --git a/dot-config/fish/conf.d/z.fish b/dot-config/fish/conf.d/z.fish
new file mode 100644
index 00000000..59c960fc
--- /dev/null
+++ b/dot-config/fish/conf.d/z.fish
@@ -0,0 +1,63 @@
+if test -z "$Z_DATA"
+ if test -z "$XDG_DATA_HOME"
+ set -U Z_DATA_DIR "$HOME/.local/share/z"
+ else
+ set -U Z_DATA_DIR "$XDG_DATA_HOME/z"
+ end
+ set -U Z_DATA "$Z_DATA_DIR/data"
+end
+
+if test ! -e "$Z_DATA"
+ if test ! -e "$Z_DATA_DIR"
+ mkdir -p -m 700 "$Z_DATA_DIR"
+ end
+ touch "$Z_DATA"
+end
+
+if test -z "$Z_CMD"
+ set -U Z_CMD z
+end
+
+set -U ZO_CMD "$Z_CMD"o
+
+if test ! -z $Z_CMD
+ function $Z_CMD -d "jump around"
+ __z $argv
+ end
+end
+
+if test ! -z $ZO_CMD
+ function $ZO_CMD -d "open target dir"
+ __z -d $argv
+ end
+end
+
+if not set -q Z_EXCLUDE
+ set -U Z_EXCLUDE "^$HOME\$"
+else if contains $HOME $Z_EXCLUDE
+ # Workaround: migrate old default values to a regex (see #90).
+ set Z_EXCLUDE (string replace -r -- "^$HOME\$" '^'$HOME'$$' $Z_EXCLUDE)
+end
+
+# Setup completions once first
+__z_complete
+
+function __z_on_variable_pwd --on-variable PWD
+ __z_add
+end
+
+function __z_uninstall --on-event z_uninstall
+ functions -e __z_on_variable_pwd
+ functions -e $Z_CMD
+ functions -e $ZO_CMD
+
+ if test ! -z "$Z_DATA"
+ printf "To completely erase z's data, remove:\n" >/dev/stderr
+ printf "%s\n" "$Z_DATA" >/dev/stderr
+ end
+
+ set -e Z_CMD
+ set -e ZO_CMD
+ set -e Z_DATA
+ set -e Z_EXCLUDE
+end