Updated config
This commit is contained in:
parent
285360a1dc
commit
557f33c14a
35 changed files with 159 additions and 694 deletions
|
@ -1,79 +1,111 @@
|
|||
# Git
|
||||
alias g "git"
|
||||
alias gc "git clone"
|
||||
alias gd "git diff --ignore-space-at-eol"
|
||||
alias gl "git log --oneline"
|
||||
alias gp "git pull"
|
||||
alias gs "git status"
|
||||
if command -q git
|
||||
alias g "git"
|
||||
alias gc "git clone"
|
||||
alias gd "git diff --ignore-space-at-eol"
|
||||
alias gl "git log --oneline"
|
||||
alias gp "git pull"
|
||||
alias gs "git status"
|
||||
alias home "git --git-dir=$HOME/.home/ --work-tree=$HOME"
|
||||
alias homeinit "git clone --bare https://git.urbach.dev/sys/home $HOME/.home && home checkout"
|
||||
alias h "home"
|
||||
alias hs "home status"
|
||||
alias hd "home diff --ignore-space-at-eol"
|
||||
alias hp "home pull"
|
||||
end
|
||||
|
||||
# Go
|
||||
alias gb "go build -v"
|
||||
alias godeps "go list -f '{{ join .Deps \"\n\"}}' ."
|
||||
alias gt "go test -v"
|
||||
alias gts "gotestsum"
|
||||
|
||||
# Home
|
||||
alias home "git --git-dir=$HOME/.home/ --work-tree=$HOME"
|
||||
alias homeinit "git clone --bare https://git.urbach.dev/sys/home $HOME/.home && home checkout"
|
||||
alias h "home"
|
||||
alias hs "home status"
|
||||
alias hd "home diff --ignore-space-at-eol"
|
||||
alias hp "home pull"
|
||||
if command -q go
|
||||
alias gb "go build -v"
|
||||
alias godeps "go list -f '{{ join .Deps \"\n\"}}' ."
|
||||
alias gt "go test -v"
|
||||
alias gts "gotestsum"
|
||||
end
|
||||
|
||||
# Hyperfine
|
||||
alias bench "hyperfine --shell=none"
|
||||
if command -q hyperfine
|
||||
alias bench "hyperfine --shell=none"
|
||||
end
|
||||
|
||||
# Kernel
|
||||
alias kerr "sudo dmesg --level=emerg,alert,crit,err"
|
||||
alias klog "sudo dmesg"
|
||||
if command -q dmesg
|
||||
alias kerr "sudo dmesg --level=emerg,alert,crit,err"
|
||||
alias klog "sudo dmesg"
|
||||
end
|
||||
|
||||
# List
|
||||
alias l "ls"
|
||||
alias ll "ls -l"
|
||||
alias l2 "ls -T -L2"
|
||||
alias lu "ls -l --total-size --sort=size --reverse --no-permissions --no-user --no-time"
|
||||
alias lp "ls -l --no-filesize --no-time"
|
||||
if command -q ls
|
||||
alias l "ls"
|
||||
alias ll "ls -l"
|
||||
alias l2 "ls -T -L2"
|
||||
alias lu "ls -l --total-size --sort=size --reverse --no-permissions --no-user --no-time"
|
||||
alias lp "ls -l --no-filesize --no-time"
|
||||
end
|
||||
|
||||
# Lsof
|
||||
alias tcp "lsof -PniTCP"
|
||||
alias udp "lsof -PniUDP"
|
||||
if command -q lsof
|
||||
alias tcp "lsof -PniTCP"
|
||||
alias udp "lsof -PniUDP"
|
||||
end
|
||||
|
||||
# Neovim
|
||||
alias e "nvim"
|
||||
alias n "nvim"
|
||||
if command -q nvim
|
||||
alias e "nvim"
|
||||
alias n "nvim"
|
||||
end
|
||||
|
||||
# Pacman
|
||||
alias p "pacman"
|
||||
alias pi "sudo pacman -S"
|
||||
alias pr "sudo pacman -Rs"
|
||||
alias pu "sudo pacman -Syu"
|
||||
alias pl "pacman -Qq"
|
||||
alias pe "pacman -Qe"
|
||||
alias pc "sudo pacman -Sc"
|
||||
alias paur "pacman -Qm"
|
||||
alias pfiles "pacman -Ql"
|
||||
alias porphan "pacman -Qtdq"
|
||||
alias powner "pacman -Qo"
|
||||
if command -q apk
|
||||
alias p "apk"
|
||||
alias pi "sudo apk add"
|
||||
alias pr "sudo apk del"
|
||||
alias pu "sudo apk update"
|
||||
alias pl "apk info"
|
||||
alias powner "apk info --who-owns"
|
||||
else if command -q pacman
|
||||
alias p "pacman"
|
||||
alias pi "sudo pacman -S"
|
||||
alias pr "sudo pacman -Rs"
|
||||
alias pu "sudo pacman -Syu"
|
||||
alias pl "pacman -Qq"
|
||||
alias pe "pacman -Qe"
|
||||
alias pc "sudo pacman -Sc"
|
||||
alias paur "pacman -Qm"
|
||||
alias pfiles "pacman -Ql"
|
||||
alias porphan "pacman -Qtdq"
|
||||
alias powner "pacman -Qo"
|
||||
end
|
||||
|
||||
# Sudo
|
||||
if command -q doas
|
||||
alias sudo "doas"
|
||||
end
|
||||
|
||||
# Systemctl
|
||||
alias start "sudo systemctl start"
|
||||
alias stop "sudo systemctl stop"
|
||||
alias enable "sudo systemctl enable"
|
||||
alias disable "sudo systemctl disable"
|
||||
alias restart "sudo systemctl restart"
|
||||
alias running "systemctl list-units --type=service --state=running"
|
||||
alias disabled "systemctl list-unit-files --type=service --state=disabled"
|
||||
alias enabled "systemctl list-unit-files --type=service --state=enabled"
|
||||
alias timers "systemctl list-timers"
|
||||
if command -q service
|
||||
alias services "service -l"
|
||||
else if command -q systemctl
|
||||
alias start "sudo systemctl start"
|
||||
alias stop "sudo systemctl stop"
|
||||
alias enable "sudo systemctl enable"
|
||||
alias disable "sudo systemctl disable"
|
||||
alias restart "sudo systemctl restart"
|
||||
alias running "systemctl list-units --type=service --state=running"
|
||||
alias disabled "systemctl list-unit-files --type=service --state=disabled"
|
||||
alias enabled "systemctl list-unit-files --type=service --state=enabled"
|
||||
alias timers "systemctl list-timers"
|
||||
alias bios "systemctl reboot --firmware-setup"
|
||||
end
|
||||
|
||||
# Tmux
|
||||
alias ta "tmux attach"
|
||||
alias td "tmux detach"
|
||||
alias tl "tmux ls"
|
||||
alias tk "tmux kill-server"
|
||||
if command -q tmux
|
||||
alias ta "tmux attach"
|
||||
alias td "tmux detach"
|
||||
alias tl "tmux ls"
|
||||
alias tk "tmux kill-server"
|
||||
end
|
||||
|
||||
# ...
|
||||
alias bios "systemctl reboot --firmware-setup"
|
||||
alias cfg "config"
|
||||
alias cls "clear"
|
||||
alias debug "blinkenlights"
|
||||
|
|
|
@ -3,10 +3,10 @@ if status is-interactive
|
|||
source $HOME/.config/fish/alias.fish
|
||||
end
|
||||
|
||||
# PATH: Add scripts
|
||||
# Add scripts to PATH
|
||||
fish_add_path $XDG_CONFIG_HOME/fish/scripts
|
||||
|
||||
# PATH: Add Go binaries
|
||||
# Add Go binaries to PATH
|
||||
if command -q go
|
||||
fish_add_path (go env GOPATH)/bin
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
function config
|
||||
$EDITOR $HOME/.config/$argv
|
||||
f $HOME/.config/$argv
|
||||
end
|
||||
|
|
|
@ -1,8 +1,19 @@
|
|||
function f
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||
yazi $argv --cwd-file="$tmp"
|
||||
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||
builtin cd -- "$cwd"
|
||||
function f --wraps nnn --description 'support nnn quit and change directory'
|
||||
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
|
||||
echo "nnn is already running"
|
||||
return
|
||||
end
|
||||
|
||||
if test -n "$XDG_CONFIG_HOME"
|
||||
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
|
||||
else
|
||||
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
|
||||
end
|
||||
|
||||
command nnn $argv
|
||||
|
||||
if test -e $NNN_TMPFILE
|
||||
source $NNN_TMPFILE
|
||||
rm -- $NNN_TMPFILE
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
|
@ -1,4 +1,4 @@
|
|||
function ls
|
||||
function ls --wraps eza
|
||||
if command -q eza
|
||||
eza --group-directories-first --time-style relative -T -L1 $argv
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue