diff --git a/config/fish/config.fish b/config/fish/config.fish new file mode 100644 index 0000000..509eeea --- /dev/null +++ b/config/fish/config.fish @@ -0,0 +1,7 @@ +fish_vi_key_bindings + +# Initialize starship prompt +starship init fish | source + +# Load aliases if they exist +test -f ~/.config/fish/aliases.fish && source ~/.config/fish/aliases.fish diff --git a/config/fish/fish_variables b/config/fish/fish_variables new file mode 100644 index 0000000..f97c885 --- /dev/null +++ b/config/fish/fish_variables @@ -0,0 +1,32 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3800 +SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:normal +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_vi_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:yellow\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/green/\x2elocal/share/npm/bin diff --git a/config/fish/functions/fish_greeting.fish b/config/fish/functions/fish_greeting.fish new file mode 100644 index 0000000..018520b --- /dev/null +++ b/config/fish/functions/fish_greeting.fish @@ -0,0 +1,2 @@ +function fish_greeting +end diff --git a/config/fish/functions/fish_mode_prompt.fish b/config/fish/functions/fish_mode_prompt.fish new file mode 100644 index 0000000..428a658 --- /dev/null +++ b/config/fish/functions/fish_mode_prompt.fish @@ -0,0 +1,2 @@ +function fish_mode_prompt +end diff --git a/senpai.scfg b/config/senpai/senpai.scfg similarity index 100% rename from senpai.scfg rename to config/senpai/senpai.scfg diff --git a/starship.toml b/config/starship.toml similarity index 100% rename from starship.toml rename to config/starship.toml diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf new file mode 100644 index 0000000..2aeb5d1 --- /dev/null +++ b/config/tmux/tmux.conf @@ -0,0 +1,58 @@ +# Required for yazi +set -g allow-passthrough on +set -ga update-environment TERM +set -ga update-environment TERM_PROGRAM + +set -g default-terminal "tmux-256color" +set -ag terminal-overrides ",*:Tc" + +# set-option -g default-shell /usr/bin/fish +# set -g default-terminal "screen-256color" +# # set-window-option -g mode-keys vi + +# set-window-option -g automatic-rename on +set-window-option -g mode-keys vi + +# Blank space between status and bottom of window +set -Fg 'status-format[1]' '#{status-format[0]}' +set -g 'status-format[0]' '#[bg=black] ' +set -g status 2 + +# Smart pane switching with awareness of Vim splits. +# See: https://github.com/christoomey/vim-tmux-navigator +# Adapted to avoid fzf conflicts + +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ +| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" + +multiple_panes="[ $(tmux list-panes | wc -l) -gt 1 ]" + +bind-key -n 'C-h' if-shell "$is_vim && $multiple_panes" 'send-keys C-h' 'select-pane -L' +bind-key -n 'C-j' if-shell "$is_vim && $multiple_panes" 'send-keys C-j' 'select-pane -D' +bind-key -n 'C-k' if-shell "$is_vim && $multiple_panes" 'send-keys C-k' 'select-pane -U' +bind-key -n 'C-l' if-shell "$is_vim && $multiple_panes" 'send-keys C-l' 'select-pane -R' + + +# bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" + +bind a resize-pane -Z + +# Shift arrow to switch windows +bind -n C-S-Space previous-window +bind -n C-Space next-window + +# Remove escape delay +set -g escape-time 0 + +# Enable mouse scroll +set -g mouse on + +set-option -g status-right-length 140 +# set-option -g status-right "#(curl 'wttr.in/?format=%%c%%t%%20')|#[bg=default] %a %l:%M %p#[default]#(curl 'wttr.in/?format=%%20%%m%%20(%%M)%') |#(sugar --tmux)#[bg=default]" + +set-option -g status-left-length 140 +set-option -g status-left " Session: #[bold,fg=green,bg=black] #S #[fg=black,bg=green] " + +set-option -g status-justify centre +set-option -g window-status-current-format '#[bold,fg=green,bg=black] #{window_name} ' +set-option -g window-status-format '#{window_name}' diff --git a/config/wezterm/wezterm.lua b/config/wezterm/wezterm.lua new file mode 100644 index 0000000..474c398 --- /dev/null +++ b/config/wezterm/wezterm.lua @@ -0,0 +1,9 @@ +local wezterm = require 'wezterm' +local config = {} + +config.color_scheme = 'OceanicNext (base16)' +config.font = wezterm.font 'FiraCode Nerd Font Mono' +config.font_size = 12 +config.enable_tab_bar = false + +return config diff --git a/config/zed/keymap.json b/config/zed/keymap.json new file mode 100644 index 0000000..d8c95e3 --- /dev/null +++ b/config/zed/keymap.json @@ -0,0 +1,39 @@ +// Zed keymap +// +// For information on binding keys, see the Zed +// documentation: https://zed.dev/docs/key-bindings +// +// To see the default key bindings run `zed: open default keymap` +// from the command palette. +[ + { + // global mode + "bindings": { + "ctrl-z": "workspace::ToggleZoom", + "ctrl-s": "file_finder::Toggle", + "ctrl-c": "pane::CloseActiveItem", + "ctrl-h": "workspace::ActivatePaneLeft", + "ctrl-l": "workspace::ActivatePaneRight", + "ctrl-k": "workspace::ActivatePaneUp", + "ctrl-j": "workspace::ActivatePaneDown", + "ctrl-t": "terminal_panel::ToggleFocus", + "ctrl-shift-h": "workspace::ToggleLeftDock", + "ctrl-shift-j": "workspace::ToggleBottomDock", + "ctrl-shift-l": "workspace::ToggleRightDock", + "ctrl-n": "pane::ActivateNextItem", + "ctrl-p": "pane::ActivatePreviousItem" + } + }, + { + "context": "Editor", + "bindings": { + // "j k": ["workspace::SendKeystrokes", "escape"] + } + }, + { + "context": "Terminal", + "bindings": { + "ctrl-c": null + } + } +] diff --git a/config/zed/settings.json b/config/zed/settings.json new file mode 100644 index 0000000..4679074 --- /dev/null +++ b/config/zed/settings.json @@ -0,0 +1,86 @@ +// Zed settings +// +// For information on how to configure Zed, see the Zed +// documentation: https://zed.dev/docs/configuring-zed +// +// To see all of Zed's default settings without changing your +// custom settings, run `zed: open default settings` from the +// command palette (cmd-shift-p / ctrl-shift-p) + +{ + "lsp": { + "beancount": { + "initialization_options": { + "journal_file": "ledger.beancount" + } + } + }, + "ssh_connections": [ + { + "host": "dumpnet.chat", + "username": "root", + "projects": [] + } + ], + "context_servers": { + "mcp-server-context7": { + "settings": { + "default_minimum_tokens": "10000" + } + } + }, + "agent": { + "default_profile": "write", + "always_allow_tool_actions": true, + "dock": "bottom", + "default_model": { + "provider": "zed.dev", + "model": "claude-opus-4" + }, + }, + "features": { + "copilot": true, + "edit_prediction_provider": "copilot" + }, + "terminal": { + "dock": "right", + "shell": { "program": "fish" }, + "font_family": "FiraCode Nerd Font Mono", + "line_height": { + "custom": 1.52 + }, + "font_features": { + "liga": true + }, + "detect_venv": { + "on": { + "directories": [".env", "env", ".venv", "venv"], + "activate_script": "default" + } + } + }, + "telemetry": { + "metrics": false, + "diagnostics": false + }, + "languages": { + "YAML": { + "format_on_save": "off" + }, + "Python": { + "format_on_save": "off", + "formatter": null, + "remove_trailing_whitespace_on_save": false, + "ensure_final_newline_on_save": false + } + }, + "vim_mode": true, + "ui_font_family": "FiraCode Nerd Font Mono", + "ui_font_size": 16, + "buffer_font_size": 15.0, + "theme": { + "mode": "system", + "light": "One Dark", + "dark": "Base16 Materia" + } +} diff --git a/config/zed/snippets/beancount.json b/config/zed/snippets/beancount.json new file mode 100644 index 0000000..fd4ac70 --- /dev/null +++ b/config/zed/snippets/beancount.json @@ -0,0 +1,104 @@ +{ + ".beancount": { + "expense": { + "prefix": "exp", + "body": "Expenses:${1:Category}:${2:Subcategory}", + "description": "Expense account" + }, + "food": { + "prefix": "efood", + "body": "Expenses:Food:${1|EatingOut,Groceries,FastFood,Alcohol|}", + "description": "Food expense" + }, + "income": { + "prefix": "inc", + "body": "Income:${1:Source}:${2:Type}", + "description": "Income account" + }, + "assets": { + "prefix": "ast", + "body": "Assets:${1|Truist,DCCU,NFCU|}:${2|Checking,Savings,CC|}", + "description": "Asset account" + }, + "transaction": { + "prefix": "txn", + "body": [ + "${1:2024-01-01} * \"${2:Description}\"", + " ${3:Assets:Truist:Checking} ${4:-10.00} USD", + " ${5:Expenses:}${0}" + ], + "description": "Transaction template" + }, + "balance": { + "prefix": "bal", + "body": "${1:2024-01-01} balance ${2:Assets:Truist:Checking} ${3:0.00} USD", + "description": "Balance assertion" + }, + "pad": { + "prefix": "pad", + "body": "${1:2024-01-01} pad ${2:Assets:Truist:Savings} Equity:OpeningBalances", + "description": "Pad statement" + }, + "bills": { + "prefix": "ebills", + "body": "Expenses:Bills:${1|Mortgage,Gas,Utilities,Internet,Insurance|}", + "description": "Bills expense" + }, + "online": { + "prefix": "eonline", + "body": "Expenses:Online:${1|Subscriptions,Amazon|}", + "description": "Online expense" + }, + "healthcare": { + "prefix": "ehealth", + "body": "Expenses:Healthcare:${1|Diabetes,Dexter,PT|}", + "description": "Healthcare expense" + }, + "hobbies": { + "prefix": "ehobby", + "body": "Expenses:Hobbies:${1|Homegym,Photography,Luthiery,Woodworking|}", + "description": "Hobby expense" + }, + "vehicle": { + "prefix": "evehicle", + "body": "Expenses:Vehicle:${1|Gas,Maintenance|}", + "description": "Vehicle expense" + }, + "transfer": { + "prefix": "xfer", + "body": [ + "${1:2024-01-01} * \"${2:Transfer}\"", + " ${3:Assets:Truist:Savings} ${4:-500.00} USD", + " ${5:Assets:Truist:Checking} ${4:500.00} USD" + ], + "description": "Transfer between accounts" + }, + "paycheck": { + "prefix": "pay", + "body": [ + "${1:2024-01-01} * \"${2:DIR DEP Foresight Techno 2853 Ian D. Keane ACH CREDIT}\"", + " Assets:${3|Truist:Savings,Truist:Checking|} ${4:2000.00} USD", + " Income:Foresight:Payroll" + ], + "description": "Paycheck deposit" + }, + "rent": { + "prefix": "rent", + "body": [ + "${1:2024-01-01} * \"${2:Kristi Elrod PAYMENT ID}\"", + " Assets:Truist:${3|Checking,Savings|} ${4:600.00} USD", + " Income:Rent" + ], + "description": "Rent income" + }, + "mortgage": { + "prefix": "mort", + "body": [ + "${1:2024-01-01} * \"ONLINE TO ****9049 - ONLINE MORTGAGE LOAN PMT\"", + " Assets:Truist:Savings -${2:1712.05} USD", + " Expenses:Bills:Mortgage" + ], + "description": "Mortgage payment" + } + } +} diff --git a/dotfiles.org b/dotfiles.org index 5d6a294..bf8b962 100644 --- a/dotfiles.org +++ b/dotfiles.org @@ -55,229 +55,10 @@ This file contains all configurations across all my machines. Well, most of them Fish shell configuration using starship prompt. *** Main Configuration -#+begin_src fish :tangle ~/.config/fish/config.fish -fish_vi_key_bindings - -# Initialize starship prompt -starship init fish | source - -# Load aliases if they exist -test -f ~/.config/fish/aliases.fish && source ~/.config/fish/aliases.fish -#+end_src - -*** Mode Prompt -Disable default mode indicator since starship handles it -#+begin_src fish :tangle ~/.config/fish/functions/fish_mode_prompt.fish -function fish_mode_prompt -end -#+end_src - -*** Starship Prompt -Configure the starship prompt appearance and behavior -#+begin_src toml :tangle ~/.config/starship.toml -# Multi-line prompt with project context -format = """ -[╭─](bold blue) $directory\ -$fill\ -$git_branch$git_status$kubernetes$python$nodejs$rust$golang$docker_context -[╰─](bold blue)$character""" - -# Add fill module for right alignment -[fill] -symbol = " " -style = "bold blue" - -# Directory display with single-letter truncation -[directory] -style = "bold white" -truncation_length = 1 -truncate_to_repo = true -fish_style_pwd_dir_length = 1 -format = "[$path]($style)" - -# Command prompt character -[character] -success_symbol = "[❯](bold green)" -error_symbol = "[❯](bold red)" -vimcmd_symbol = "[❮](bold green)" - -# Git branch display -[git_branch] -format = "[$symbol$branch]($style)" -style = "bold purple" -symbol = " " # Git branch symbol - -# Git status indicators -[git_status] -format = '([\[$ahead_behind$staged$modified$deleted\]]($style) )' -style = "bold cyan" -# Repository status compared to remote -ahead = "⇡${count}" # Local repo has ${count} commits not pushed to remote -behind = "⇣${count}" # Remote has ${count} commits not in local repo -diverged = "⇕⇡${ahead_count}⇣${behind_count}" # Local and remote have diverged - -# Working tree status -staged = "+${count}" # Number of staged files -modified = "!${count}" # Number of files with unstaged changes -deleted = "✘${count}" # Number of deleted files -untracked = "" # Hide untracked files indicator (was "?${count}") - -# Note: Other git status symbols available but hidden for cleaner display: -# conflicted = "✖" # Merge conflicts -# stashed = "≡" # Stashed changes -# renamed = "»" # Renamed files - -# Kubernetes context -[kubernetes] -format = '[$symbol$context( \($namespace\))]($style) ' -style = "bold blue" -symbol = "☸ " -disabled = true # Default to disabled -detect_files = ["k8s", "kubernetes", "k3d.yaml", "kubeconfig.yaml"] # Only show in directories with these files - -# Python environment -[python] -format = '[$symbol$virtualenv]($style) ' -style = "bold yellow" -symbol = "🐍 " - -# Node.js -[nodejs] -format = '[$symbol($version )]($style)' -style = "bold green" -symbol = "⬢ " - -# Rust -[rust] -format = '[$symbol($version )]($style)' -style = "bold red" -symbol = "🦀 " - -# Docker -[docker_context] -format = '[$symbol$context]($style) ' -style = "bold blue" -symbol = "🐋 " - -# Golang -[golang] -format = '[$symbol($version )]($style)' -style = "bold cyan" -symbol = "Go " -#+end_src -error_symbol = "[❯](red)" -vimcmd_symbol = "[❮](green)" - -# Git branch display -[git_branch] -format = "[$branch]($style)" -style = "bright-black" - -# Git status indicators -[git_status] -format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" -style = "cyan" -conflicted = "✖" -untracked = "+" -modified = "!" -staged = "+" -renamed = "»" -deleted = "✘" -stashed = "≡" - -# Command duration -[cmd_duration] -min_time = 500 -format = "[$duration]($style) " - -# Username display -[username] -show_always = false -style_user = "white bold" -style_root = "red bold" - -# Hostname display -[hostname] -ssh_only = true -format = "[$hostname]($style) " -trim_at = "-" -style = "bold dimmed green" -#+end_src - -** Tmux -#+begin_src txt :tangle ~/.config/tmux/tmux.conf -# Required for yazi -set -g allow-passthrough on -set -ga update-environment TERM -set -ga update-environment TERM_PROGRAM - -# set-option -g default-shell /usr/bin/fish -# set -g default-terminal "screen-256color" -# # set-window-option -g mode-keys vi - -# set-window-option -g automatic-rename on -set-window-option -g mode-keys vi - -# Blank space between status and bottom of window -set -Fg 'status-format[1]' '#{status-format[0]}' -set -g 'status-format[0]' '#[bg=black] ' -set -g status 2 - -# Smart pane switching with awareness of Vim splits. -# See: https://github.com/christoomey/vim-tmux-navigator -# Adapted to avoid fzf conflicts - -is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ -| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" - -multiple_panes="[ $(tmux list-panes | wc -l) -gt 1 ]" - -bind-key -n 'C-h' if-shell "$is_vim && $multiple_panes" 'send-keys C-h' 'select-pane -L' -bind-key -n 'C-j' if-shell "$is_vim && $multiple_panes" 'send-keys C-j' 'select-pane -D' -bind-key -n 'C-k' if-shell "$is_vim && $multiple_panes" 'send-keys C-k' 'select-pane -U' -bind-key -n 'C-l' if-shell "$is_vim && $multiple_panes" 'send-keys C-l' 'select-pane -R' -# bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" - -bind a resize-pane -Z - -# Shift arrow to switch windows -bind -n C-S-Space previous-window -bind -n C-Space next-window - -# Remove escape delay -set -g escape-time 0 - -# Enable mouse scroll -set -g mouse on - -set-option -g status-right-length 140 -set-option -g status-right "#(curl 'wttr.in/?format=%%c%%t%%20')|#[bg=default] %a %l:%M %p#[default]#(curl 'wttr.in/?format=%%20%%m%%20(%%M)%') |#(sugar --tmux)#[bg=default]" - -set-option -g status-left-length 140 -set-option -g status-left " Session: #[bold,fg=green,bg=black] #S #[fg=black,bg=green] " - -set-option -g status-justify centre -set-option -g window-status-current-format '#[bold,fg=green,bg=black] #{window_name} ' -set-option -g window-status-format '#{window_name}' -#+end_src ** TODO Tmuxinator -* Wezterm -#+begin_src lua :tangle ~/.config/wezterm/wezterm.lua - local wezterm = require 'wezterm' - local config = {} - - config.color_scheme = 'OceanicNext (base16)' - config.font = wezterm.font 'FiraCode Nerd Font Mono' - config.font_size = 20 - config.enable_tab_bar = false - - - - return config -#+end_src * Text Editors ** Helix *** TODO Things to remap diff --git a/link.sh b/link.sh new file mode 100755 index 0000000..8756c77 --- /dev/null +++ b/link.sh @@ -0,0 +1,7 @@ +ln -s $PWD/config/starship.toml ~/.config +ln -s $PWD/vimrc ~/.vimrc +ln -s $PWD/config/wezterm ~/.config/ +ln -s $PWD/config/fish ~/.config +ln -s $PWD/config/tmux ~/.config +ln -s $PWD/config/senpai ~/.config +ln -s $PWD/config/zed/* ~/.config/zed