#W# Initial Commit: No Flake Config

This commit is contained in:
WarrentyExpired 2026-07-31 12:23:39 -04:00
commit c463cec3e2
74 changed files with 14898 additions and 0 deletions

View file

@ -0,0 +1,56 @@
if status is-interactive
# -------------------------------------------------------------------------
# Environment Variables
# -------------------------------------------------------------------------
set fish_greeting ""
set -gx DOTNET_ROOT $HOME/.dotnet
fish_add_path $DOTNET_ROOT
fish_add_path $DOTNET_ROOT
set -gx DOTNET_SYSTEM_NET_DISABLEIPV6 1
# -------------------------------------------------------------------------
# Keybindings
# -------------------------------------------------------------------------
bind \cd\cd\cd delete-or-exit
bind \cf 'ts; commandline -f repaint'
# -------------------------------------------------------------------------
# Shell Aliases
# -------------------------------------------------------------------------
# NixOS & Home Manager
#alias rebuild="sudo nixos-rebuild switch"
alias rebuild="nh os switch -f '<nixpkgs/nixos>'"
alias hms="home-manager switch"
# SSH Connections
alias sshavatar="ssh warrentyexpired@192.168.88.111"
alias sshvaultnas="ssh warrentyexpired@192.168.88.100"
alias sshservarr="ssh warrentyexpired@192.168.88.101"
alias sshdocker="ssh warrentyexpired@192.168.88.102"
alias sshlive="ssh mementoadmin@uo-memento.com"
alias sshproxy="ssh warrentyexpired@192.168.88.200"
# Shortcuts & Utilities
alias stff="mpv --autofit=10%"
alias s="goto s"
alias g="goto g"
alias l="goto l"
alias mv="mv -i --backup=t"
alias cat="bat"
# eza conditional setup
if type -q eza
alias ls='eza --color=always --group-directories-first --icons'
alias ll='eza -a --color=always --group-directories-first --icons'
alias la='eza -al --group-directories-first --icons'
alias lt='eza -aT --level=2 --group-directories-first --icons'
alias l.='eza -ad .* --group-directories-first --icons'
else
printf "You may want to install eza\n"
end
# -------------------------------------------------------------------------
# Shell Abbreviations
# -------------------------------------------------------------------------
abbr -a sshracknerd 'mosh -p 60001 192.227.229.130 --ssh="ssh -p 5522"'
end

View file

@ -0,0 +1,4 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:4300
SETUVAR fish_user_paths:/home/warrentyexpired/\x2edotnet

View file

@ -0,0 +1,28 @@
function fish_prompt
set -l white (set_color white)
set -l brwhite (set_color brwhite)
set -l green (set_color green)
set -l red (set_color red)
set -l blue (set_color blue)
# Line 1: ┌─ [user] @ [host]
echo -s $white"┌─ ["$green$USER$white"] "$brwhite"@ " $white"["$red$hostname$white"]"
# Line 2: ├─ [directory]
set -l full_path (string replace -r "^$HOME" "~" $PWD)
echo -s $white"├─ ["$blue$full_path$white"]"
# Line 3: └─ [(git_branch)] or [$]
echo -n $white"└─ ["
set -l git_info (gitinfo 2>/dev/null)
if test -n "$git_info"
echo -n $git_info
else
echo -n $brwhite"\$"
end
echo -n $white"]"
# Final prompt symbol and reset
echo -n $brwhite" "
set_color normal
end

View file

@ -0,0 +1,19 @@
function gitinfo
if git rev-parse --is-inside-work-tree >/dev/null 2>&1
set -l branch (git branch --show-current)
set -l staged ""
set -l dirty ""
set -l untracked ""
if not git diff --quiet
set dirty (set_color yellow)"*"
end
if not git diff --cached --quiet
set staged (set_color green)"+"
end
set -l untracked_files (git ls-files --others --exclude-standard)
if test -n "$untracked_files"
set untracked (set_color red)" *"
end
echo (set_color magenta)"($branch)"$staged$dirty$untracked(set_color normal)
end
end

View file

@ -0,0 +1,78 @@
function goto
set -l gotoConfig "$HOME/.config/goto/bookmarks"
set -l gotoDir "$HOME/.config/goto"
mkdir -p "$gotoDir"
touch "$gotoConfig"
set -l command $argv[1]
set -l bookmark_name $argv[2]
if test -z "$command"
echo "Usage: goto s <name> (save current directory)"
echo " goto g <name> (go to saved directory)"
echo " goto d <name> (delete a bookmark)"
echo " goto l (list all bookmarks)"
echo " goto e (edit bookmarks file)"
return
end
switch $command
case s # Save bookmarks
if test -z "$bookmark_name"
echo "Error: Must provide a bookmark name to save."
return 1
end
sed -i "/^$bookmark_name:/d" "$gotoConfig"
echo "$bookmark_name:"(pwd) >> "$gotoConfig"
echo "Bookmark $bookmark_name saved to: "(pwd)
case g # Go to bookmark
if test -z "$bookmark_name"
echo "Error: Must provide a bookmark name to go to."
return 1
end
set -l target_path (grep "^$bookmark_name:" "$gotoConfig" | cut -d ':' -f 2)
if test -z "$target_path"
echo "Error: Bookmark $bookmark_name not found."
return 1
end
if test -d "$target_path"
cd "$target_path"
echo "Jumping to: $target_path"
else
echo "Error: Directory $target_path does not exist or is not a directory"
end
case d # Delete bookmark
if test -z "$bookmark_name"
echo "Error: Must provide a bookmark name to delete."
return 1
end
if grep -q "^$bookmark_name:" "$gotoConfig"
sed -i "/^$bookmark_name:/d" "$gotoConfig"
echo "Bookmark $bookmark_name deleted."
else
echo "Error: Bookmark $bookmark_name not found."
return 1
end
case e # Edit bookmarks file
if set -q EDITOR
$EDITOR "$gotoConfig"
else
nano "$gotoConfig"
end
case l # List bookmarks
if not test -s "$gotoConfig"
echo "No bookmarks saved yet."
return 0
end
echo "___ Bookmarks (Stored in: $gotoDir) ___"
column -t -s ':' "$gotoConfig"
case '*'
echo "Invalid command: $command"
goto # Show usage
end
end

View file

@ -0,0 +1,21 @@
function lookfor --description "Lookfor (d)irectory, (f)ile (a)ll (pattern)"
if test (count $argv) -lt 2
echo "Usage: lookfor (f)ile|(d)irectory|(a)ll \"pattern\""
return 1
end
set -l type_flag $argv[1]
set -l pattern $argv[2]
switch $type_flag
case f
find . -type f -name "*$pattern*" 2>/dev/null
case d
find . -type d -name "*$pattern*" 2>/dev/null
case a
find . -name "*$pattern*" 2>/dev/null
case *
echo "Invalid type: $type_flag. Use f for file or d for directory."
return 1
end
end

View file

@ -0,0 +1,67 @@
function ts --description "Tmux session manager with fuzzy search and quick jump"
echo -e ""
# 1. Show Active Sessions
set -l active_sessions (tmux list-sessions 2>/dev/null)
if test -n "$active_sessions"
echo -e (set_color 99ff99)"󱫟 Active Sessions:"(set_color normal)
for line in $active_sessions
echo -e " $line"
end
echo ""
else
echo -e (set_color 555555)"(No active sessions)"(set_color normal)
echo ""
end
# 2. Provide choices
echo -e (set_color 00afaf)"󰒓 Select an option:"(set_color normal)
echo -e " [1] Pick from active sessions (Fuzzy search)"
echo -e " [2] Create NEW custom session"
echo -e " [w] Enter Tmuxinator Workspaces"
echo -e " [d] Detach from current session"
echo -e " [x] Kill a session"
echo -e " [Enter] Quick jump to "(set_color -o)"Main"(set_color normal)
echo ""
read -l -P "Choice > " choice
switch "$choice"
case 1
set -l session (tmux list-sessions -F "#{session_name}" 2>/dev/null | fzf --exit-0 --height=15% --reverse --header="Select Session")
if test -n "$session"
if set -q TMUX
tmux switch-client -t "$session"
else
tmux attach-session -t "$session"
end
end
case 2
read -l -P "Enter name for new session: " new_name
if test -n "$new_name"
env -u TMUX tmux new-session -d -s "$new_name" 2>/dev/null
if set -q TMUX
tmux switch-client -t "$new_name"
else
tmux attach-session -t "$new_name"
end
end
case d D
if set -q TMUX; tmux detach-client; else; echo "You aren't in a tmux session!"; end
case w W
if type -q tmuxinator
tmuxinator start Workspace
else
echo (set_color red)"Error: tmuxinator is not installed."(set_color normal)
end
case x X
set -l session (tmux list-sessions -F "#{session_name}" 2>/dev/null | fzf --exit-0 --height=15% --reverse --header="Select Session to KILL")
if test -n "$session"
tmux kill-session -t "$session"
echo "Killed session: $session"
ts
end
case "" "*"
env -u TMUX tmux new-session -d -s Main 2>/dev/null
if set -q TMUX; tmux switch-client -t Main; else; tmux attach-session -t Main; end
end
commandline -f repaint
end