Updated various configs

This commit is contained in:
2026-06-30 18:50:31 +08:00
parent 42f2931bac
commit 8dfcb8198a
4 changed files with 51 additions and 40 deletions
+31 -28
View File
@@ -2,35 +2,32 @@
set -gx EDITOR nvim
set -gx VISUAL nvim
# Better defaults
set -gx PAGER less
set -gx LESS "-R --use-color -Dd+r -Du+b"
# XDG paths
set -gx XDG_CONFIG_HOME "$HOME/.config"
set -gx XDG_DATA_HOME "$HOME/.local/share"
set -gx XDG_CACHE_HOME "$HOME/.cache"
# Local binaries
fish_add_path "$HOME/.local/bin"
fish_add_path "$HOME/.cargo/bin"
# Wayland-friendly defaults
set -gx MOZ_ENABLE_WAYLAND 1
set -gx QT_QPA_PLATFORM wayland
set -gx SDL_VIDEODRIVER wayland
set -gx CLUTTER_BACKEND wayland
# Fish behavior
set fish_greeting
# Vi-style bindings
fish_vi_key_bindings
if type -q eza
alias ls="eza --icons"
alias ll="eza -lah --icons --git"
alias la="eza -A --icons"
else
alias ls="ls --color=auto"
alias ll="ls -lah"
alias la="ls -A"
end
if type -q bat
alias cat="bat"
end
# Useful aliases
alias ls="ls --color=auto"
alias ll="ls -lah"
alias la="ls -A"
alias grep="grep --color=auto"
alias c="clear"
@@ -48,9 +45,15 @@ alias pacin="sudo pacman -S"
alias pacrm="sudo pacman -Rns"
alias pacq="pacman -Qs"
alias ls="eza --icons"
alias ll="eza -lah --icons --git"
alias cat="bat"
# Safer defaults
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
# Optional tools
if type -q thefuck
thefuck --alias | source
end
if type -q zoxide
zoxide init fish | source
@@ -60,18 +63,18 @@ if type -q fzf
fzf --fish | source
end
# Safer defaults
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
# Starship prompt
if type -q starship
starship init fish | source
end
# Start Sway on tty1 login
#
# These are real environment variables. They are inherited by Sway because
# Fish execs Sway after exporting them.
if status is-login
and test -z "$WAYLAND_DISPLAY"
and test "$XDG_VTNR" = "1"
exec sway
if test -z "$TMUX"; and test -z "$DISPLAY"; and test -z "$WAYLAND_DISPLAY"
if test (tty) = /dev/tty1
exec sway
end
end
end