Compare commits

..

10 Commits

14 changed files with 277 additions and 290 deletions

114
Brewfile
View File

@@ -1,114 +0,0 @@
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-drivers"
tap "homebrew/cask-fonts"
tap "homebrew/cask-versions"
tap "homebrew/core"
brew "autoconf"
brew "automake"
brew "openssl@1.1"
brew "brew-cask-completion"
brew "brew-gem"
brew "brew-pip"
brew "bsdmake"
brew "freetype"
brew "fontconfig"
brew "xz"
brew "python@3.9"
brew "pkg-config"
brew "cmake"
brew "cmatrix"
brew "ruby"
brew "cocoapods"
brew "coreutils"
brew "gnu-tar"
brew "dpkg"
brew "elinks"
brew "exiftool"
brew "harfbuzz"
brew "sdl2"
brew "ffmpeg"
brew "figlet"
brew "fortune"
brew "gcc"
brew "git"
brew "gnu-sed"
brew "go"
brew "hashcat"
brew "htop"
brew "imagemagick"
brew "jq"
brew "ldid"
brew "libusbmuxd"
brew "libimobiledevice"
brew "librsvg"
brew "llvm"
brew "lolcat"
brew "macvim"
brew "mas"
brew "nasm"
brew "node"
brew "nativefier"
brew "neofetch"
brew "nmap"
brew "openjdk"
brew "p7zip"
brew "pngcheck"
brew "rsync"
brew "sl"
brew "speedtest-cli"
brew "svg2png"
brew "telnet"
brew "tldr"
brew "tmux"
brew "tree"
brew "watch"
brew "wget"
brew "whois"
brew "youtube-dl"
brew "zsh"
brew "zsh-completions"
brew "zsh-history-substring-search"
brew "zsh-syntax-highlighting"
brew "zzz"
cask "alacritty"
cask "android-platform-tools"
cask "appcleaner"
cask "daisydisk"
cask "discord-canary"
cask "displaylink"
cask "displaylink-login-extension"
cask "dolphin-dev"
cask "firefox"
cask "font-fira-code"
cask "handbrake"
cask "hex-fiend"
cask "iina"
cask "makemkv"
cask "melonds"
cask "qbittorrent"
cask "rectangle"
cask "slack"
cask "steam"
cask "visual-studio-code"
cask "vlc"
cask "xquartz"
cask "zoom"
mas "1Password 7", id: 1333542190
mas "Dark Noise", id: 1465439395
mas "Dark Reader for Safari", id: 1438243180
mas "DaVinci Resolve", id: 571213070
mas "Deliveries", id: 290986013
mas "Developer", id: 640199958
mas "Flighty", id: 1358823008
mas "Jump Desktop", id: 524141863
mas "Keynote", id: 409183694
mas "Notability", id: 360593530
mas "Pages", id: 409201541
mas "Paste", id: 967805235
mas "TestFlight", id: 899247664
mas "The Unarchiver", id: 425424353
mas "Tripsy", id: 1429967544
mas "Wipr", id: 1320666476
mas "Xcode", id: 497799835
mas "Yoink", id: 457622435

24
aliases
View File

@@ -1,24 +0,0 @@
# Git
alias gcl='git clone'
alias gp='git push'
alias gs='git status'
# ls
alias ll='ls -alh'
# System Utils
alias brewup='cl && brew update && brew upgrade && brew upgrade --cask && brew cleanup -s && brew doctor --verbose | grep -A 1 --color=never "Homebrew Version" && brew autoremove'
alias cl='clear'
alias ta="tmux a -t"
alias tn="tmux new-session -s"
alias gcc="gcc -g"
alias wthr='curl wttr.in/san_luis_obispo'
alias nf='cl && neofetch && shownetinfo && batt'
alias hekate='python3 /Users/smparkin/Development/fusee-launcher/fusee-launcher.py /Users/smparkin/Development/fusee-launcher/hekate/hekate.bin'
alias src='omz reload'
# Music
alias amp='python3 ~/Development/abandoned/SSiTerm/music.py play'
alias amn='python3 ~/Development/abandoned/SSiTerm/music.py next'
alias amr='python3 ~/Development/abandoned/SSiTerm/music.py prev'
alias amv='python3 ~/Development/abandoned/SSiTerm/music.py playback --volume '

84
brew/italica Normal file
View File

@@ -0,0 +1,84 @@
brew "coreutils"
brew "openssl@3"
brew "esptool"
brew "fastfetch"
brew "mas"
brew "nmap"
brew "rsync"
brew "tree"
brew "yt-dlp"
brew "zsh-autosuggestions"
brew "zsh-syntax-highlighting"
cask "appcleaner"
cask "balenaetcher"
cask "bambu-studio"
cask "calibre"
cask "daisydisk"
cask "discord"
cask "docker"
cask "firefox"
cask "font-sf-mono"
cask "iina"
cask "istat-menus"
cask "iterm2"
cask "lm-studio"
cask "obsidian"
cask "openscad"
cask "prismlauncher"
cask "protonvpn"
cask "raspberry-pi-imager"
cask "raycast"
cask "rectangle"
cask "scroll-reverser"
cask "sf-symbols"
cask "steam"
cask "utm"
cask "visual-studio-code"
mas "Broadcasts", id: 1469995354
mas "Dark Reader for Safari", id: 1438243180
mas "Developer", id: 640199958
mas "Flighty", id: 1358823008
mas "Infuse", id: 1136220934
mas "Keynote", id: 409183694
mas "Kindle", id: 302584613
mas "Numbers", id: 409203825
mas "Pages", id: 409201541
mas "SponsorBlock", id: 1573461917
mas "TestFlight", id: 899247664
mas "The Unarchiver", id: 425424353
mas "Wipr", id: 1662217862
mas "WireGuard", id: 1451685025
mas "Xcode", id: 497799835
vscode "42crunch.vscode-openapi"
vscode "charliermarsh.ruff"
vscode "davidanson.vscode-markdownlint"
vscode "dbaeumer.vscode-eslint"
vscode "foxundermoon.shell-format"
vscode "gamunu.vscode-yarn"
vscode "george-alisson.html-preview-vscode"
vscode "github.copilot"
vscode "github.copilot-chat"
vscode "golang.go"
vscode "ms-azuretools.vscode-docker"
vscode "ms-python.debugpy"
vscode "ms-python.mypy-type-checker"
vscode "ms-python.python"
vscode "ms-python.vscode-pylance"
vscode "ms-vscode-remote.remote-containers"
vscode "ms-vscode-remote.remote-ssh"
vscode "ms-vscode-remote.remote-ssh-edit"
vscode "ms-vscode-remote.remote-wsl"
vscode "ms-vscode-remote.vscode-remote-extensionpack"
vscode "ms-vscode.cpptools"
vscode "ms-vscode.cpptools-extension-pack"
vscode "ms-vscode.cpptools-themes"
vscode "ms-vscode.remote-explorer"
vscode "ms-vscode.remote-server"
vscode "ms-vscode.vscode-typescript-next"
vscode "pkief.material-icon-theme"
vscode "redhat.vscode-yaml"
vscode "sswg.swift-lang"
vscode "swiftlang.swift-vscode"
vscode "vadimcn.vscode-lldb"
vscode "visualstudioexptteam.vscodeintellicode"
vscode "zainchen.json"

View File

@@ -1,65 +0,0 @@
function my_git_prompt() {
tester=$(git rev-parse --git-dir 2> /dev/null) || return
INDEX=$(git status --porcelain 2> /dev/null)
STATUS=""
# is branch ahead?
if $(echo "$(git log origin/$(git_current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
fi
# is branch behind?
if $(echo "$(git log HEAD..origin/$(git_current_branch) 2> /dev/null)" | grep '^commit' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
fi
# is anything staged?
if $(echo "$INDEX" | command grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
fi
# is anything unstaged?
if $(echo "$INDEX" | command grep -E -e '^[ MARC][MD] ' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
fi
# is anything untracked?
if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
fi
# is anything unmerged?
if $(echo "$INDEX" | command grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
fi
if [[ -n $STATUS ]]; then
STATUS=" $STATUS"
fi
echo "$ZSH_THEME_GIT_PROMPT_PREFIX$(my_current_branch)$STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
function my_current_branch() {
echo $(git_current_branch || echo "(no branch)")
}
function ssh_connection() {
if [[ -n $SSH_CONNECTION ]]; then
echo "%{$fg_bold[red]%}(ssh) "
fi
}
local ret_status="%(?:%{$fg_bold[green]%}:%{$fg_bold[red]%})%?%{$reset_color%}"
PROMPT=$'$(ssh_connection)%{$fg_bold[green]%}%n@%m%{$reset_color%}$(my_git_prompt) : $(shrink_path -f)\n[${ret_status}]  '
ZSH_THEME_PROMPT_RETURNCODE_PREFIX="%{$fg_bold[red]%}"
ZSH_THEME_GIT_PROMPT_PREFIX=" $fg[white] %{$fg_bold[yellow]%}"
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[magenta]%}↑"
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_bold[green]%}↓"
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●"
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[red]%}●"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[white]%}●"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[red]%}✕"
ZSH_THEME_GIT_PROMPT_SUFFIX=" $fg_bold[white]%{$reset_color%}"

View File

@@ -3,17 +3,23 @@
OSTYPE=$(uname -s)
if [ "$OSTYPE" = "Linux" ]; then
DISTRO=$(lsb_release -i -s)
if [ "$DISTRO" = "Ubuntu" ]; then
echo "Package manager: "
read packm
if [ "$packm" = "apt" ]; then
sudo apt update
sudo apt install coreutils vim zsh jq python3 python3-pip -y
sudo apt install coreutils vim zsh jq python3 -y
sudo apt upgrade -y
else
# pretty safe assumption that if not ubuntu its arch
elif [ "$packm" = "yum" ]; then
sudo yum update
sudo yum install coreutils vim zsh jq python3 -y
elif [ "$packm" = "pacman" ]; then
sudo pacman -Syu
sudo pacman -Sy coreutils vim zsh jq python3
else
echo "Unknown package manager, continuing..."
fi
elif [ "$OSTYPE" = "Darwin" ]; then
mkdir ~/Developer
echo "Install Homebrew? [y/n]"
read homebrew
if [ "$homebrew" = "y" ]; then
@@ -21,9 +27,9 @@ elif [ "$OSTYPE" = "Darwin" ]; then
echo "Restore from Brewfile? [y/n]"
read bundle
if [ "$bundle" = "y" ]; then
brew bundle install --file=Brewfile
brew bundle install --file=
else
brew install coreutils neofetch vim zsh jq python3
brew install coreutils fastfetch vim zsh jq python3 zsh-autosuggestions zsh-syntax-highlighting
fi
fi
fi
@@ -31,22 +37,17 @@ fi
# silence login message
touch ~/.hushlogin
# get ohmyzsh setup
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh/
# remove common files and symlink new files
rm ~/.zshrc ~/.vimrc ~/.tmux.conf
rm -r ~/.zshrc ~/.vimrc ~/.tmux.conf ~/.zsh.d ~/.gitconfig ~/.gitignore_global
mkdir ~/.zsh.d
ln -s ~/dotfiles/aliases ~/.zsh.d/aliases
ln -s ~/dotfiles/functions ~/.zsh.d/functions
ln -s ~/dotfiles/zshrc ~/.zshrc
ln -s ~/dotfiles/gitconfig ~/.gitconfig
ln -s ~/dotfiles/gitignore_global ~/.gitignore_global
ln -s ~/dotfiles/newstephen.zsh-theme ~/.oh-my-zsh/custom/themes/newstephen.zsh-theme
ln -s ~/dotfiles/tmux.conf ~/.tmux.conf
ln -s ~/dotfiles/vimrc ~/.vimrc
mkdir ~/Developer
ln -s ~/dotfiles/zsh/aliases ~/.zsh.d/aliases
ln -s ~/dotfiles/zsh/functions ~/.zsh.d/functions
ln -s ~/dotfiles/zsh/theme ~/.zsh.d/theme
ln -s ~/dotfiles/zsh/zshrc ~/.zshrc
ln -s ~/dotfiles/git/gitconfig ~/.gitconfig
ln -s ~/dotfiles/git/gitignore_global ~/.gitignore_global
ln -s ~/dotfiles/tmux/tmux.conf ~/.tmux.conf
ln -s ~/dotfiles/vim/vimrc ~/.vimrc
echo "Change shell to zsh? [y/n]"
read shell

View File

@@ -32,6 +32,8 @@ set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
set-option -g history-limit 50000
set -g default-terminal "screen-256color"
setw -g clock-mode-colour colour135

View File

21
zsh/aliases Normal file
View File

@@ -0,0 +1,21 @@
# Git
alias gcl='git clone'
alias gp='git push'
alias gs='git status'
# ls
alias ll='ls -lah'
alias l='ls -CF'
# System Utils
alias brewup='cl && brew update && brew upgrade && brew upgrade --cask && brew cleanup -s && brew doctor --verbose | grep -A 1 --color=never "Homebrew Version" && brew autoremove'
alias cl='clear'
alias wthr='curl wttr.in/san_luis_obispo'
alias nf='cl && fastfetch && shownetinfo && batt'
alias src='source ~/.zshrc'
alias fps='if [[ $(launchctl getenv MTL_HUD_ENABLED) -eq 1 ]]; then
launchctl unsetenv MTL_HUD_ENABLED && echo "Metal FPS disabled"
else
launchctl setenv MTL_HUD_ENABLED 1 && echo "Metal FPS enabled"
fi'

View File

@@ -14,7 +14,7 @@ function shownetinfo() {
ROUTR=$(system_profiler SPNetworkDataType | grep "Router:" | cut -c 19-30 | head -1)
LANIP=$(ifconfig | grep -v "127.0.0.1" | grep "inet " | head -1 | cut -d " " -f2)
if [ "$ROUTR" != "" ]; then
WANIP=$(gtimeout 0.25s curl -s ipv4.icanhazip.com)
WANIP=$(timeout 0.25s curl -s ipv4.icanhazip.com)
fi
fi
tput setaf 7; tput bold; echo -en "Net: "

72
zsh/theme Normal file
View File

@@ -0,0 +1,72 @@
git_branch_info() {
local git_status_full=$(git status --porcelain=v2 --branch -z 2>/dev/null)
[[ -n "$git_status_full" ]] || return
local branch=""
local status_indicators=""
local line
local -a status_lines=("${(0)git_status_full}")
for line in $status_lines; do
case $line in
\#' 'branch.head' '*) branch=${line##* }; continue ;;
\#' 'branch.ab' '*)
local -a counts=("${(s: :)line}")
[[ ${counts[3]#+} -gt 0 ]] && status_indicators+="%B%F{magenta}↑%f%b"
[[ ${counts[4]#-} -gt 0 ]] && status_indicators+="%B%F{green}↓%f%b"
;;
'?'*) ((untracked)) || { untracked=1; status_indicators+="%B%F{white}●%f%b" } ;;
'u'*) ((unmerged)) || { unmerged=1; status_indicators+="%B%F{red}✕%f%b" } ;;
[12]' '*)
if [[ ${line[3]} != "." && $staged -eq 0 ]]; then
staged=1
status_indicators+="%B%F{green}●%f%b"
fi
if [[ ${line[4]} != "." && $unstaged -eq 0 ]]; then
unstaged=1
status_indicators+="%B%F{red}●%f%b"
fi
;;
esac
done
[[ -n "$branch" ]] && echo " %B%F{white} %B%F{yellow}${branch}%f${status_indicators:+ $status_indicators}%B%F{white}%f "
}
local CACHED_PWD=""
local CACHED_SHORT_PWD=""
shrink_path() {
if [[ $CACHED_PWD != $PWD ]]; then
CACHED_PWD=$PWD
local directory=${PWD/#$HOME/\~}
if [[ $directory == '~' || $directory == '/' ]]; then
CACHED_SHORT_PWD=$directory
echo $CACHED_SHORT_PWD
return
fi
local parts=("${(@s:/:)directory}")
local output=()
for part in $parts[1,-2]; do
if [[ -n $part && $part != "~" ]]; then
output+=$part[1]
else
output+=$part
fi
done
output+=$parts[-1]
CACHED_SHORT_PWD=${(j:/:)output}
fi
echo $CACHED_SHORT_PWD
}
# SSH connection indicator
ssh_connection() {
if [[ -n $SSH_CONNECTION ]]; then
echo "%B%F{red}(ssh)%f%b "
fi
}
# Prompt configuration
PROMPT='$(ssh_connection)%B%F{green}%n@%m%f%b$(git_branch_info) %f%b: $(shrink_path)
[%(?:%B%F{green}%?%f%b:%B%F{red}%?%f%b)]  '
setopt PROMPT_SUBST

75
zsh/zshrc Normal file
View File

@@ -0,0 +1,75 @@
# Get basic stuff out of the way
source ~/.zsh.d/theme
source ~/.zsh.d/functions
source ~/.zsh.d/aliases
# History search with started text
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[[A" up-line-or-beginning-search # Up arrow
bindkey "^[[B" down-line-or-beginning-search # Down arrow
# Initialize completion system
autoload -U compinit && compinit
# Case insensitive completion
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
# Menu selection for completion
zstyle ':completion:*' menu select
zstyle ':completion:*' file-sort name
zstyle ':completion:*' list-colors ''
bindkey '^[[Z' reverse-menu-complete
# Configure history to be longer
HISTSIZE=10000000
SAVEHIST=10000000
export HISTFILE=~/.zsh_history
setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
setopt HIST_VERIFY # Don't execute immediately upon history expansion.
setopt HIST_BEEP # Beep when accessing nonexistent history.
# Use vim as editor
export EDITOR=vim
export VISUAL=vim
# Enable colors in ls
export CLICOLOR=1
# For Linux/BSD ls colors
if whence dircolors >/dev/null; then
eval "$(dircolors -b)"
alias ls='ls --color=auto'
else
# For macOS ls colors
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
alias ls='ls -G'
fi
if [ "$(uname)" = "Darwin" ]; then
# set up iterm integration
source ~/.iterm2_shell_integration.zsh
# source homebrew
eval "$(/opt/homebrew/bin/brew shellenv)"
# plugins
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi
# Added by LM Studio CLI (lms)
export PATH="$PATH:/Users/smparkin/.cache/lm-studio/bin"
# Created by `pipx` on 2025-02-08 01:15:05
export PATH="$PATH:/Users/smparkin/.local/bin"

65
zshrc
View File

@@ -1,65 +0,0 @@
# Path to your oh-my-zsh installation.
OSTYPE=$(uname -s)
if [ "$OSTYPE" = "Linux" ]; then
export ZSH="/home/smparkin/.oh-my-zsh"
elif [ "$OSTYPE" = "Darwin" ]; then
export ZSH="/Users/smparkin/.oh-my-zsh"
fi
# Set name of the theme to load
ZSH_THEME="newstephen"
# Hyphen-insensitive completion
HYPHEN_INSENSITIVE="true"
# Disable marking untracked files under git as dirty
DISABLE_UNTRACKED_FILES_DIRTY="true"
# Which plugins would you like to load?
plugins=(
colored-man-pages
iterm2
zsh-navigation-tools
shrink-path
)
source $ZSH/oh-my-zsh.sh
source ~/.zsh.d/functions
source ~/.zsh.d/aliases
if [ "$OSTYPE" = "Darwin" ]; then
source ~/.iterm2_shell_integration.zsh
fi
# configure homebrew for arm and x86
if [ "$OSTYPE" = "Darwin" ]; then
ARCH=$(uname -m)
if [ "$ARCH" = "arm64" ]; then
export EDITOR="/opt/homebrew/bin/vim"
export PATH="/opt/homebrew/bin:$PATH"
export PATH="/opt/homebrew/sbin:$PATH"
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
elif [ "$ARCH" = "x86_64" ]; then
export EDITOR="/usr/local/bin/vim"
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
fi
fi
export PATH="/Users/smparkin/Library/Python/2.7/bin:$PATH"
export PATH="/Users/smparkin/Library/Python/3.9/bin:$PATH"
export PATH="/opt/devkitpro/pacman/bin:$PATH"
export DEVKITPRO="/opt/devkitpro"
export DEVKITARM="/opt/devkitpro/devkitARM"
export DEVKITPPC="/opt/devkitpro/devkitPPC"
shownetinfo
if [ "$OSTYPE" = "Linux" ]; then
echo ""
elif [ "$OSTYPE" = "Darwin" ]; then
ssh-add -K ~/.ssh/id_rsa 2>/dev/null
LAPTOP=$(system_profiler SPHardwareDataType | grep "Model Name" | grep "Book")
if [ "$LAPTOP" != "" ]; then
batt
else
echo ""
fi
fi