mirror of
https://github.com/ForeverPyrite/dotfiles.git
synced 2025-12-10 01:08:06 +00:00
First real commit, for testing purposes.
Will add README.md and clean up obviously AI code later.
This commit is contained in:
49
fish/.config/fish/conf.d/aliases.fish
Normal file
49
fish/.config/fish/conf.d/aliases.fish
Normal file
@@ -0,0 +1,49 @@
|
||||
# ~/.config/fish/conf.d/aliases.fish
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Core "Rust-first" Command Replacements
|
||||
# ------------------------------------------------------------------------------
|
||||
# These override the standard Unix commands with our modern alternatives.
|
||||
# Note: Fish syntax doesn't use '=' for aliases.
|
||||
|
||||
alias cat "bat --paging=never" # Use bat to view files
|
||||
alias grep "rg" # Use ripgrep for searching
|
||||
alias ls "eza --icons --group-directories-first" # The new default `ls`
|
||||
alias find "fd" # fd-find. you're smart, you'll figure it out
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Enhanced `eza` Aliases
|
||||
# ------------------------------------------------------------------------------
|
||||
# Common shortcuts for different views.
|
||||
|
||||
# ll: long list, all files, show git status
|
||||
alias ll "eza -l -a --git --icons --group-directories-first"
|
||||
|
||||
# la: list all files (including dotfiles)
|
||||
alias la "eza -a --icons --group-directories-first"
|
||||
|
||||
# lt: tree view
|
||||
alias lt "eza --tree --level=2 --long --git --icons"
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Context-Aware Aliases (Docker)
|
||||
# ------------------------------------------------------------------------------
|
||||
# These aliases are only defined if the `docker` command is available.
|
||||
|
||||
if command -v docker &> /dev/null
|
||||
# Simple aliases for docker-compose
|
||||
alias dc "docker compose"
|
||||
alias dcb "docker compose build"
|
||||
alias dcu "docker compose up -d"
|
||||
alias dcl "docker compose logs -f"
|
||||
|
||||
# Your "full" command is better as a function for clarity
|
||||
# You can put this in functions.fish or define it right here!
|
||||
function dcf
|
||||
echo "==> Running 'docker compose up -d'..."
|
||||
docker compose up -d
|
||||
echo "==> Tailing logs with 'docker compose logs -f'..."
|
||||
docker compose logs -f
|
||||
end
|
||||
end
|
||||
18
fish/.config/fish/conf.d/functions.fish
Normal file
18
fish/.config/fish/conf.d/functions.fish
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
|
||||
# Sends a desktop notification after a command completes.
|
||||
# Usage: long_running_command; alert
|
||||
# Derived from the alias in the default .bashrc that I was interested in, probably will still never think to use it though lol
|
||||
function alert
|
||||
# $status contains the exit code of the last command
|
||||
set -l last_status $status
|
||||
|
||||
# Get the last command from history. Much cleaner than `history | tail | sed`.
|
||||
set -l last_cmd (history --max=1)
|
||||
|
||||
if test $last_status -eq 0
|
||||
notify-send --urgency=low --icon=terminal "✅ Command Succeeded" "$last_cmd"
|
||||
else
|
||||
notify-send --urgency=critical --icon=error "❌ Command Failed (Exit Code: $last_status)" "$last_cmd"
|
||||
end
|
||||
end
|
||||
1
fish/.config/fish/conf.d/rustup.fish
Normal file
1
fish/.config/fish/conf.d/rustup.fish
Normal file
@@ -0,0 +1 @@
|
||||
source "$HOME/.cargo/env.fish"
|
||||
37
fish/.config/fish/config.fish
Normal file
37
fish/.config/fish/config.fish
Normal file
@@ -0,0 +1,37 @@
|
||||
# ~/.config/fish/config.fish
|
||||
|
||||
# --- Environment Variables ---
|
||||
# Set a default editor (used by many command-line tools)
|
||||
set -x EDITOR nvim
|
||||
|
||||
# --- PATH Configuration ---
|
||||
# Add Cargo's bin directory to the path
|
||||
fish_add_path "$HOME/.cargo/bin"
|
||||
|
||||
# --- Tool Initialization ---
|
||||
# Starship Prompt
|
||||
starship init fish | source
|
||||
|
||||
# Zoxide (replaces cd)
|
||||
set -x FZF_DEFAULT_OPTS --tmux
|
||||
zoxide init fish | source
|
||||
|
||||
# Autin (rip unencrypted .bash_history)
|
||||
atuin init fish | source
|
||||
|
||||
# FZF Keybindings
|
||||
# This sources the file installed by `fzf --all`
|
||||
if test -f "$HOME/.fzf.fish"
|
||||
source "$HOME/.fzf.fish"
|
||||
end
|
||||
|
||||
|
||||
# --- ALIASES (The "Rust-first" way) ---
|
||||
# Use 'alias' for simple command replacements.
|
||||
# Note the syntax is 'alias new_command "old_command with args"'
|
||||
|
||||
alias ls 'eza --icons --group-directories-first' # a more feature-rich ls
|
||||
alias ll 'eza -l --icons --group-directories-first'
|
||||
alias la 'eza -la --icons --group-directories-first'
|
||||
alias cat 'bat --paging=never' # bat is a better cat
|
||||
alias grep 'rg' # ripgrep is a better grep
|
||||
32
fish/.config/fish/fish_variables
Normal file
32
fish/.config/fish/fish_variables
Normal file
@@ -0,0 +1,32 @@
|
||||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR __fish_initialized:3800
|
||||
SETUVAR fish_color_autosuggestion:555\x1ebrblack
|
||||
SETUVAR fish_color_cancel:\x2dr
|
||||
SETUVAR fish_color_command:blue
|
||||
SETUVAR fish_color_comment:red
|
||||
SETUVAR fish_color_cwd:green
|
||||
SETUVAR fish_color_cwd_root:red
|
||||
SETUVAR fish_color_end:green
|
||||
SETUVAR fish_color_error:brred
|
||||
SETUVAR fish_color_escape:brcyan
|
||||
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||
SETUVAR fish_color_host:normal
|
||||
SETUVAR fish_color_host_remote:yellow
|
||||
SETUVAR fish_color_normal:normal
|
||||
SETUVAR fish_color_operator:brcyan
|
||||
SETUVAR fish_color_param:cyan
|
||||
SETUVAR fish_color_quote:yellow
|
||||
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
|
||||
SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_status:red
|
||||
SETUVAR fish_color_user:brgreen
|
||||
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||
SETUVAR fish_pager_color_completion:normal
|
||||
SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di
|
||||
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||
SETUVAR fish_pager_color_selected_background:\x2dr
|
||||
SETUVAR fish_user_paths:/home/foreverpyrite/\x2ecargo/bin\x1e/root/\x2ecargo/bin\x1e/root/\x2efzf/bin\x1e/home/foreverpyrite/\x2efzf/bin
|
||||
3
fish/.config/fish/functions/fish_user_key_bindings.fish
Normal file
3
fish/.config/fish/functions/fish_user_key_bindings.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function fish_user_key_bindings
|
||||
fzf --fish | source
|
||||
end
|
||||
Reference in New Issue
Block a user