diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..3104008 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,43 @@ +# Repository Guidelines + +## Project Structure & Module Organization +This repository is a GNU Stow-managed dotfiles monorepo. Each top-level folder is a stow package that maps into `$HOME` (for example `zsh/`, `nvim/`, `kitty/`, `git/`, `ghostty/`, `atuin/`). Package internals usually live under `.config/...`. +Automation and diagnostics live in `scripts/`, with macOS-specific helpers in `scripts/mac/`. +Primary entrypoints: +- `install.sh`: bootstrap and stow on macOS +- `Brewfile`: package dependencies +- `README.md` + per-package `README.md`: component docs + +## Build, Test, and Development Commands +- `./install.sh` — full local bootstrap (Homebrew, stow, Neovim sync). +- `brew bundle --file Brewfile` — install/update declared CLI tools. +- `stow -R zsh nvim kitty git` — restow selected packages after edits. +- `./scripts/health-check.sh` — validate symlinks, dependencies, and setup health. +- `./scripts/benchmark.sh` or `./scripts/profile-zsh-startup.sh` — measure shell startup performance. +- `zsh -n zsh/.zshenv zsh/.zshrc` — syntax-check Zsh config changes. + +## Coding Style & Naming Conventions +Follow `.editorconfig`: +- 2 spaces for most files (Shell, JSON, YAML, Markdown) +- 4 spaces for Python +- tabs for Go and Makefiles +Use LF endings, trim trailing whitespace (except Markdown), and always end files with a newline. +Name scripts with lowercase kebab-case (for example `toggle-dark-mode.sh`). Keep paths portable (`$HOME`, not hardcoded `/Users/`). + +## Testing Guidelines +There is no single unit-test framework; use targeted validation: +- Run `./scripts/health-check.sh` after structural changes. +- Run `zsh -n ...` and `./scripts/test-completion-demo.sh` for shell/completion edits. +- Run `nvim --headless "+Lazy! sync" +qa` after Neovim plugin/config updates. +- Re-run relevant package README steps you changed. + +## Commit & Pull Request Guidelines +History favors short, imperative commit subjects (for example `fix ghostty theme sync`, `docs: standardize README`). Keep commits focused to one logical area/package. +PRs should include: +- concise summary of changed packages +- verification commands executed +- linked issue (if applicable) +- screenshots/terminal captures for UI-facing changes (Kitty/Ghostty/Neovim themes). + +## Security & Configuration Tips +Do not commit secrets, tokens, or machine-specific credentials. Prefer environment-based configuration (for example `direnv`) and sanitize personal paths before committing. diff --git a/btop/.config/btop/btop.conf b/btop/.config/btop/btop.conf index ed6249b..1d1b7da 100644 --- a/btop/.config/btop/btop.conf +++ b/btop/.config/btop/btop.conf @@ -1,18 +1,18 @@ -#? Config file for btop v. 1.4.5 +#? Config file for btop v.1.4.6 #* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. #* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" color_theme = "Default" #* If the theme set background should be shown, set to False if you want terminal background transparency. -theme_background = False +theme_background = false #* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false. -truecolor = True +truecolor = true #* Set to true to force tty mode regardless if a real tty has been detected or not. #* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols. -force_tty = False +force_tty = false #* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets. #* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box. @@ -22,10 +22,13 @@ presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:defaul #* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists. #* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. -vim_keys = False +vim_keys = false #* Rounded corners on boxes, is ignored if TTY mode is ON. -rounded_corners = True +rounded_corners = true + +#* Use terminal synchronized output sequences to reduce flickering on supported terminals. +terminal_sync = true #* Default symbols to use for graph creation, "braille", "block" or "tty". #* "braille" offers the highest resolution but might not be included in all fonts. @@ -57,37 +60,40 @@ update_ms = 100 proc_sorting = "cpu lazy" #* Reverse sorting order, True or False. -proc_reversed = False +proc_reversed = false #* Show processes as a tree. -proc_tree = False +proc_tree = false #* Use the cpu graph colors in the process list. -proc_colors = True +proc_colors = true #* Use a darkening gradient in the process list. -proc_gradient = True +proc_gradient = true #* If process cpu usage should be of the core it's running on or usage of the total available cpu power. -proc_per_core = False +proc_per_core = false #* Show process memory as bytes instead of percent. -proc_mem_bytes = True +proc_mem_bytes = true #* Show cpu graph for each process. -proc_cpu_graphs = True +proc_cpu_graphs = true #* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate) -proc_info_smaps = False +proc_info_smaps = false #* Show proc box on left side of screen instead of right. -proc_left = False +proc_left = false #* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop). -proc_filter_kernel = False +proc_filter_kernel = false #* In tree-view, always accumulate child process resources in the parent process. -proc_aggregate = False +proc_aggregate = false + +#* Should cpu and memory usage display be preserved for dead processes when paused. +keep_dead_proc_usage = false #* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. #* Select from a list of detected attributes from the options menu. @@ -98,28 +104,28 @@ cpu_graph_upper = "Auto" cpu_graph_lower = "Auto" #* Toggles if the lower CPU graph should be inverted. -cpu_invert_lower = True +cpu_invert_lower = true #* Set to True to completely disable the lower CPU graph. -cpu_single_graph = False +cpu_single_graph = false #* Show cpu box at bottom of screen instead of top. -cpu_bottom = False +cpu_bottom = false #* Shows the system uptime in the CPU box. -show_uptime = True +show_uptime = true #* Shows the CPU package current power consumption in watts. Requires running `make setcap` or `make setuid` or running with sudo. -show_cpu_watts = True +show_cpu_watts = true #* Show cpu temperature. -check_temp = True +check_temp = true #* Which sensor to use for cpu temperature, use options menu to select from list of available sensors. cpu_sensor = "Auto" #* Show temperatures for cpu cores also if check_temp is True and sensors has been found. -show_coretemp = True +show_coretemp = true #* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core. #* Use lm-sensors or similar to see which cores are reporting temperatures on your machine. @@ -131,17 +137,17 @@ cpu_core_map = "" temp_scale = "celsius" #* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024. -base_10_sizes = True +base_10_sizes = true #* Show CPU frequency. -show_cpu_freq = True +show_cpu_freq = true #* Draw a clock at top of screen, formatting according to strftime, empty string to disable. #* Special formatting: /host = hostname | /user = username | /uptime = system uptime clock_format = "%X" #* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort. -background_update = True +background_update = true #* Custom cpu model name, empty string to disable. custom_cpu_name = "" @@ -151,43 +157,43 @@ custom_cpu_name = "" disks_filter = "" #* Show graphs instead of meters for memory values. -mem_graphs = True +mem_graphs = true #* Show mem box below net box instead of above. -mem_below_net = False +mem_below_net = false #* Count ZFS ARC in cached and available memory. -zfs_arc_cached = True +zfs_arc_cached = true #* If swap memory should be shown in memory box. -show_swap = True +show_swap = true #* Show swap as a disk, ignores show_swap value above, inserts itself after first disk. -swap_disk = True +swap_disk = true #* If mem box should be split to also show disks info. -show_disks = True +show_disks = true #* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar. -only_physical = True +only_physical = true #* Read disks list from /etc/fstab. This also disables only_physical. -use_fstab = True +use_fstab = true #* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool) -zfs_hide_datasets = False +zfs_hide_datasets = false #* Set to true to show available disk space for privileged users. -disk_free_priv = False +disk_free_priv = false #* Toggles if io activity % (disk busy time) should be shown in regular disk usage view. -show_io_stat = True +show_io_stat = true #* Toggles io mode for disks, showing big graphs for disk read/write speeds. -io_mode = False +io_mode = false #* Set to True to show combined read/write io graphs in io mode. -io_graph_combined = False +io_graph_combined = false #* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ". #* Example: "/mnt/media:100 /:20 /boot:1". @@ -199,10 +205,10 @@ net_download = 100 net_upload = 100 #* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest. -net_auto = True +net_auto = true #* Sync the auto scaling for download and upload to whichever currently has the highest scale. -net_sync = True +net_sync = true #* Starts with the Network Interface specified here. net_iface = "" @@ -211,14 +217,17 @@ net_iface = "" base_10_bitrate = "Auto" #* Show battery stats in top right if battery is present. -show_battery = True +show_battery = true #* Which battery to use if multiple are present. "Auto" for auto detection. selected_battery = "Auto" #* Show power stats of battery next to charge indicator. -show_battery_watts = True +show_battery_watts = true -#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". +#* Set loglevel for "~/.local/state/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". #* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. log_level = "WARNING" + +#* Automatically save current settings to config file on exit. +save_config_on_exit = true diff --git a/ghostty/.config/ghostty/config b/ghostty/.config/ghostty/config index 7677a6b..051f2bb 100644 --- a/ghostty/.config/ghostty/config +++ b/ghostty/.config/ghostty/config @@ -6,51 +6,59 @@ # =========================== # APPEARANCE & THEME # =========================== -theme = dracula -shell-integration = zsh +#theme = Gruvbox Dark +#theme = Apple System Colors Light +#theme = Catppuccin Latte +theme = light:Builtin Light,dark:Nord #background-opacity = 0.95 # =========================== # FONT CONFIGURATION # =========================== font-family = "JetBrainsMono Nerd Font Mono" -font-size = 14 +font-size = 15 adjust-cell-height = 20% adjust-cell-width = 2% # Retina display font rendering (equivalent to kitty's macos_thicken_font 0.25) font-thicken = true -font-thicken-strength = 70 # =========================== # CURSOR CONFIGURATION # =========================== cursor-style = block cursor-style-blink = false - +adjust-cursor-thickness = 2 # =========================== # WINDOW & LAYOUT # =========================== window-width = 120 window-height = 35 window-decoration = true +window-save-state = always +window-padding-x = 6 +window-padding-y = 4 +window-padding-balance = true +split-divider-color = #88c0d0 +# split-divider-color = #ff2020 # neon red # =========================== # PERFORMANCE SETTINGS # =========================== -confirm-close-surface = false +confirm-close-surface = always quit-after-last-window-closed = true shell-integration = zsh # =========================== # SCROLLBACK # =========================== -scrollback-limit = 10000 +scrollback-limit = 100000 # =========================== # MOUSE & INTERACTION # =========================== mouse-hide-while-typing = true +copy-on-select = true link-url = true clipboard-trim-trailing-spaces = true @@ -58,7 +66,7 @@ clipboard-trim-trailing-spaces = true # MACOS SETTINGS # =========================== macos-option-as-alt = true -macos-titlebar-style = tabs +macos-titlebar-style = native # =========================== # RESIZE BEHAVIOR @@ -70,14 +78,14 @@ resize-overlay-position = center # =========================== # CLIPBOARD # =========================== -clipboard-read = ask +clipboard-read = allow clipboard-write = allow # =========================== # SHADERS # =========================== custom-shader-animation = always -custom-shader = shaders/cursor_tail.glsl +custom-shader = shaders/cursor_warp.glsl # =========================== # KEYBINDINGS # =========================== @@ -95,4 +103,11 @@ keybind = cmd+minus=decrease_font_size:1 keybind = cmd+zero=reset_font_size keybind = cmd+c=copy_to_clipboard keybind = cmd+v=paste_from_clipboard -keybind = shift+enter=text:\n +keybind = ctrl+shift+r=reload_config + +# Split pane management +keybind = cmd+d=new_split:right +keybind = cmd+shift+d=new_split:down +keybind = cmd+left_bracket=goto_split:previous +keybind = cmd+right_bracket=goto_split:next +keybind = cmd+shift+enter=toggle_split_zoom diff --git a/git/.gitconfig b/git/.gitconfig index 5c4a45b..d553a11 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -1,14 +1,20 @@ [user] -email = 104200+abkolan@users.noreply.github.com -name = abkolan - -[credential] -helper = -helper = /usr/local/share/gcm-core/git-credential-manager - +email = 246795909+abhilast@users.noreply.github.com +name = abhilast [pull] rebase = true [include] path = ~/.gitconfig.d/aliases path = ~/.gitconfig.d/tools +[init] + defaultBranch = main +[color] + ui = auto +[diff] + mnemonicPrefix = true +[credential] + helper = + helper = /usr/local/share/gcm-core/git-credential-manager +[credential "https://dev.azure.com"] + useHttpPath = true diff --git a/git/.gitconfig.d/aliases b/git/.gitconfig.d/aliases index 99c00a5..28326df 100644 --- a/git/.gitconfig.d/aliases +++ b/git/.gitconfig.d/aliases @@ -19,6 +19,8 @@ # Diff shortcuts d = diff dc = diff --cached + dt = difftool + dtc = difftool --cached # Branch management brd = branch -d diff --git a/git/.gitconfig.d/tools b/git/.gitconfig.d/tools index 514a3ca..333cd09 100644 --- a/git/.gitconfig.d/tools +++ b/git/.gitconfig.d/tools @@ -1,18 +1,27 @@ [diff] - tool = nvimdiff + tool = difftastic algorithm = histogram colorMoved = default -[merge] - tool = nvimdiff - conflictstyle = diff3 +[difftool] + prompt = false + +[difftool "difftastic"] + cmd = difft "$LOCAL" "$REMOTE" [difftool "nvimdiff"] cmd = nvim -d $LOCAL $REMOTE +[merge] + tool = nvimdiff + conflictstyle = diff3 + [mergetool "nvimdiff"] cmd = nvim -d $LOCAL $MERGED $REMOTE +[pager] + difftool = true + [core] # Use delta for better diffs pager = delta diff --git a/kitty/.config/kitty/current-theme.conf b/kitty/.config/kitty/current-theme.conf deleted file mode 100644 index e4890fd..0000000 --- a/kitty/.config/kitty/current-theme.conf +++ /dev/null @@ -1,54 +0,0 @@ -# Tomorrow Night - Optimized for Reading -# Matched to iTerm2 settings with thin strokes - -# Core colors from iTerm2 config -background #1d1f21 -foreground #c5c8c6 -cursor #c5c8c6 -cursor_text_color #1d1f21 - -# Selection colors -selection_background #373b41 -selection_foreground #c5c8c6 - -# The 16 terminal colors (Tomorrow Night palette) -# Black -color0 #1d1f21 -color8 #969896 - -# Red -color1 #cc6666 -color9 #cc6666 - -# Green -color2 #b5bd68 -color10 #b5bd68 - -# Yellow -color3 #f0c674 -color11 #f0c674 - -# Blue -color4 #81a2be -color12 #81a2be - -# Magenta -color5 #b294bb -color13 #b294bb - -# Cyan -color6 #8abeb7 -color14 #8abeb7 - -# White -color7 #c5c8c6 -color15 #ffffff - -# Tab bar colors -active_tab_foreground #1d1f21 -active_tab_background #c5c8c6 -inactive_tab_foreground #969896 -inactive_tab_background #282a2e - -# URL underline color -url_color #81a2be \ No newline at end of file diff --git a/kitty/.config/kitty/diff.conf b/kitty/.config/kitty/diff.conf new file mode 100644 index 0000000..5fec447 --- /dev/null +++ b/kitty/.config/kitty/diff.conf @@ -0,0 +1,19 @@ +foreground #f8f8f2 +background #282a36 +title_fg #f8f8f2 +title_bg #282a36 +margin_bg #6272a4 +margin_fg #44475a +removed_bg #ff5555 +highlight_removed_bg #ff5555 +removed_margin_bg #ff5555 +added_bg #50fa7b +highlight_added_bg #50fa7b +added_margin_bg #50fa7b +filler_bg #44475a +hunk_margin_bg #44475a +hunk_bg #bd93f9 +search_bg #8be9fd +search_fg #282a36 +select_bg #f1fa8c +select_fg #282a36 diff --git a/kitty/.config/kitty/dracula.conf b/kitty/.config/kitty/dracula.conf new file mode 100644 index 0000000..8f05c52 --- /dev/null +++ b/kitty/.config/kitty/dracula.conf @@ -0,0 +1,66 @@ +# https://draculatheme.com/kitty +# +# Installation instructions: +# +# cp dracula.conf ~/.config/kitty/ +# echo "include dracula.conf" >> ~/.config/kitty/kitty.conf +# +# Then reload kitty for the config to take affect. +# Alternatively copy paste below directly into kitty.conf + +foreground #f8f8f2 +background #282a36 +selection_foreground #ffffff +selection_background #44475a + +url_color #8be9fd + +# black +color0 #21222c +color8 #6272a4 + +# red +color1 #ff5555 +color9 #ff6e6e + +# green +color2 #50fa7b +color10 #69ff94 + +# yellow +color3 #f1fa8c +color11 #ffffa5 + +# blue +color4 #bd93f9 +color12 #d6acff + +# magenta +color5 #ff79c6 +color13 #ff92df + +# cyan +color6 #8be9fd +color14 #a4ffff + +# white +color7 #f8f8f2 +color15 #ffffff + +# Cursor colors +cursor #f8f8f2 +cursor_text_color background + +# Tab bar colors +active_tab_foreground #282a36 +active_tab_background #f8f8f2 +inactive_tab_foreground #282a36 +inactive_tab_background #6272a4 + +# Marks +mark1_foreground #282a36 +mark1_background #ff5555 + +# Splits/Windows +active_border_color #f8f8f2 +inactive_border_color #6272a4 diff --git a/kitty/.config/kitty/gruvbox_dark.conf b/kitty/.config/kitty/gruvbox_dark.conf new file mode 100644 index 0000000..369da8d --- /dev/null +++ b/kitty/.config/kitty/gruvbox_dark.conf @@ -0,0 +1,49 @@ +# gruvbox dark by morhetz, https://github.com/morhetz/gruvbox +# This work is licensed under the terms of the MIT license. +# For a copy, see https://opensource.org/licenses/MIT. + +background #282828 +foreground #ebdbb2 + +cursor #928374 + +selection_foreground #928374 +selection_background #3c3836 + +color0 #282828 +color8 #928374 + +# red +color1 #cc241d +# light red +color9 #fb4934 + +# green +color2 #98971a +# light green +color10 #b8bb26 + +# yellow +color3 #d79921 +# light yellow +color11 #fabd2d + +# blue +color4 #458588 +# light blue +color12 #83a598 + +# magenta +color5 #b16286 +# light magenta +color13 #d3869b + +# cyan +color6 #689d6a +# lighy cyan +color14 #8ec07c + +# light gray +color7 #a89984 +# dark gray +color15 #928374 diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf index e2587df..bab33f4 100644 --- a/kitty/.config/kitty/kitty.conf +++ b/kitty/.config/kitty/kitty.conf @@ -199,6 +199,9 @@ # This value will be dynamically adjusted when switching themes text_composition_strategy 1.7 0 +# Astigmatism: Enforce minimum contrast ratio (WCAG AA standard) +text_fg_override_threshold 4.5 ratio + #: Control how kitty composites text glyphs onto the background color. #: The default value of platform tries for text rendering as close to #: "native" for the platform kitty is running on as possible. @@ -2015,7 +2018,7 @@ macos_option_as_alt right #: Disable this if you want kitty top-level OS windows to not be #: resizable on macOS. -macos_thicken_font 0.25 +#macos_thicken_font 0.25 #: Draw an extra border around the font with the given width, to #: increase legibility at small font sizes on macOS. For example, a @@ -2835,11 +2838,11 @@ map ctrl+alt+g goto_layout grid # BEGIN_KITTY_FONTS -font_family family="JetBrainsMono Nerd Font Mono" +font_family family="JetBrainsMono Nerd Font Mono" style=Medium bold_font family='JetBrainsMono Nerd Font Mono' style=Bold italic_font auto bold_italic_font auto -font_size 14.0 +font_size 16.0 # Line height optimization for better reading # 1.2 gives comfortable spacing without being too sparse @@ -2863,8 +2866,8 @@ font_features JetBrainsMonoNerdFontMono-Regular +zero +cv14 # BEGIN_KITTY_THEME -# 3024 Day -include current-theme.conf +# Dracula +include gruvbox_dark.conf # END_KITTY_THEME diff --git a/kitty/.config/kitty/theme-specific-settings.conf b/kitty/.config/kitty/theme-specific-settings.conf deleted file mode 100644 index a88e4f6..0000000 --- a/kitty/.config/kitty/theme-specific-settings.conf +++ /dev/null @@ -1,51 +0,0 @@ -# Theme-Specific Text Rendering Settings -# These values work best for different theme types - -# ============================================================================ -# DARK THEME SETTINGS -# ============================================================================ -# Use with dark backgrounds for optimal readability -# text_composition_strategy 0.4 0 -# -# - 0.4 gamma = Thin strokes (matches iTerm2 "Thin Strokes = Always") -# - Good for dark themes on Retina displays -# - Prevents text from appearing too thick/blurry - -# ============================================================================ -# LIGHT THEME SETTINGS -# ============================================================================ -# Use with light backgrounds for optimal readability -# text_composition_strategy 1.7 0 -# -# - 1.7 gamma = Normal/thicker strokes -# - Better contrast on white backgrounds -# - Easier to read in bright conditions/outdoors -# - Prevents text from being too thin/faint - -# ============================================================================ -# ALTERNATIVE VALUES TO TRY -# ============================================================================ - -# For Dark Themes: -# - 0.2: Ultra-thin (may be too thin for some) -# - 0.4: Thin (recommended, matches iTerm2) -# - 0.6: Slightly thin -# - 0.8: Near normal - -# For Light Themes: -# - 1.2: Slightly thick -# - 1.5: Medium thickness -# - 1.7: Normal thickness (recommended) -# - 2.0: Bold appearance -# - 2.2: Extra bold (good for very bright conditions) - -# ============================================================================ -# HOW TO APPLY MANUALLY -# ============================================================================ -# -# In Kitty, you can test different values live: -# 1. Press Ctrl+Shift+F2 to open Kitty shell -# 2. Type: set-spacing text_composition_strategy VALUE 0 -# 3. Example: set-spacing text_composition_strategy 1.7 0 -# -# Or edit kitty.conf directly and reload with Ctrl+Shift+F5 \ No newline at end of file diff --git a/kitty/.config/kitty/themes/github-light.conf b/kitty/.config/kitty/themes/github-light.conf deleted file mode 100644 index 2c5f557..0000000 --- a/kitty/.config/kitty/themes/github-light.conf +++ /dev/null @@ -1,54 +0,0 @@ -# GitHub Light - Optimized for Outdoor/High Glare Reading -# High contrast light theme for maximum readability in bright conditions - -# Core colors -background #ffffff -foreground #24292e -cursor #044289 -cursor_text_color #ffffff - -# Selection colors -selection_background #c8e1ff -selection_foreground #24292e - -# The 16 terminal colors (GitHub palette) -# Black -color0 #24292e -color8 #586069 - -# Red -color1 #d73a49 -color9 #cb2431 - -# Green -color2 #28a745 -color10 #22863a - -# Yellow -color3 #dbab09 -color11 #b08800 - -# Blue -color4 #0366d6 -color12 #005cc5 - -# Magenta -color5 #5a32a3 -color13 #6f42c1 - -# Cyan -color6 #0598bc -color14 #1b7c83 - -# White -color7 #6a737d -color15 #959da5 - -# Tab bar colors -active_tab_foreground #ffffff -active_tab_background #0366d6 -inactive_tab_foreground #586069 -inactive_tab_background #f6f8fa - -# URL underline color -url_color #0366d6 \ No newline at end of file diff --git a/kitty/.config/kitty/themes/tomorrow-night-optimized.conf b/kitty/.config/kitty/themes/tomorrow-night-optimized.conf deleted file mode 100644 index e4890fd..0000000 --- a/kitty/.config/kitty/themes/tomorrow-night-optimized.conf +++ /dev/null @@ -1,54 +0,0 @@ -# Tomorrow Night - Optimized for Reading -# Matched to iTerm2 settings with thin strokes - -# Core colors from iTerm2 config -background #1d1f21 -foreground #c5c8c6 -cursor #c5c8c6 -cursor_text_color #1d1f21 - -# Selection colors -selection_background #373b41 -selection_foreground #c5c8c6 - -# The 16 terminal colors (Tomorrow Night palette) -# Black -color0 #1d1f21 -color8 #969896 - -# Red -color1 #cc6666 -color9 #cc6666 - -# Green -color2 #b5bd68 -color10 #b5bd68 - -# Yellow -color3 #f0c674 -color11 #f0c674 - -# Blue -color4 #81a2be -color12 #81a2be - -# Magenta -color5 #b294bb -color13 #b294bb - -# Cyan -color6 #8abeb7 -color14 #8abeb7 - -# White -color7 #c5c8c6 -color15 #ffffff - -# Tab bar colors -active_tab_foreground #1d1f21 -active_tab_background #c5c8c6 -inactive_tab_foreground #969896 -inactive_tab_background #282a2e - -# URL underline color -url_color #81a2be \ No newline at end of file diff --git a/linearmouse/.config/linearmouse/linearmouse.json b/linearmouse/.config/linearmouse/linearmouse.json index 72769c2..90b7427 100644 --- a/linearmouse/.config/linearmouse/linearmouse.json +++ b/linearmouse/.config/linearmouse/linearmouse.json @@ -1,12 +1,13 @@ { + "$schema" : "https:\/\/schema.linearmouse.app\/0.10.1", "schemes" : [ { "if" : { "device" : { - "productID" : "0x28e", - "vendorID" : "0x3f0", "category" : "mouse", - "productName" : "HyperX Pulsefire Haste Wireless" + "productID" : "0x28e", + "productName" : "HyperX Pulsefire Haste Wireless", + "vendorID" : "0x3f0" } }, "pointer" : { @@ -17,62 +18,62 @@ { "if" : { "device" : { - "productName" : "Magic Mouse", - "vendorID" : "0x4c", + "category" : "mouse", "productID" : "0x269", + "productName" : "Magic Mouse", "serialNumber" : "10-cf-0f-e7-3c-18", - "category" : "mouse" + "vendorID" : "0x4c" } }, "pointer" : { + "acceleration" : 3, "disableAcceleration" : false, - "speed" : 0, - "acceleration" : 3 + "speed" : 0 }, "scrolling" : { + "acceleration" : 1, "speed" : { - "vertical" : 8, - "horizontal" : 0.1 - }, - "acceleration" : 1 + "horizontal" : 0.1, + "vertical" : 8 + } } }, { "if" : { + "app" : "com.google.Chrome", "device" : { + "category" : "mouse", "productID" : "0x269", - "serialNumber" : "10-cf-0f-e7-3c-18", - "vendorID" : "0x4c", "productName" : "Magic Mouse", - "category" : "mouse" - }, - "app" : "com.google.Chrome" + "serialNumber" : "10-cf-0f-e7-3c-18", + "vendorID" : "0x4c" + } }, "pointer" : { "acceleration" : 2 }, "scrolling" : { - "speed" : { - "horizontal" : 0.1 - }, "acceleration" : { "horizontal" : 0.25 + }, + "speed" : { + "horizontal" : 0.1 } } }, { "if" : { "device" : { - "serialNumber" : "10:CF:0F:E7:3C:18", "category" : "mouse", - "vendorID" : "0x4c", "productID" : "0x269", - "productName" : "AB’s Magic Mouse" + "productName" : "AB’s Magic Mouse", + "serialNumber" : "10:CF:0F:E7:3C:18", + "vendorID" : "0x4c" } }, "pointer" : { - "acceleration" : 0.675, - "speed" : 0.05 + "acceleration" : 4.2429, + "speed" : 0.2446 }, "scrolling" : { "acceleration" : { @@ -80,6 +81,5 @@ } } } - ], - "$schema" : "https:\/\/schema.linearmouse.app\/0.10.0" + ] } \ No newline at end of file diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index c013bf7..96fad0a 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -2,9 +2,8 @@ "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "de10d8414235b0a8cabfeba60d07c24304e71f5c" }, "NvChad": { "branch": "v2.5", "commit": "29ebe31ea6a4edf351968c76a93285e6e108ea08" }, - "base46": { "branch": "v3.0", "commit": "cee12a263602cc97652d3dd55f0fc5e171012967" }, - "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, - "claude-code.nvim": { "branch": "main", "commit": "c9a31e51069977edaad9560473b5d031fcc5d38b" }, + "base46": { "branch": "v3.0", "commit": "45b336ec52615dd1a3aa47848d894616dd6293a5" }, + "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, @@ -18,7 +17,7 @@ "guihua.lua": { "branch": "master", "commit": "87bea7b98429405caf2a0ce4d029b027bb017c70" }, "harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, "mason.nvim": { "branch": "main", "commit": "9e25c98d4826998460926f8c5c2284848d80ae89" }, "menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" }, "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" }, @@ -27,7 +26,7 @@ "neotest-go": { "branch": "main", "commit": "92950ad7be2ca02a41abca5c6600ff6ffaf5b5d6" }, "neotest-python": { "branch": "master", "commit": "ed9b4d794b89044cc32e5476e637936331473c6e" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, + "nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" }, "nvim-dap": { "branch": "master", "commit": "a479e25ed5b5d331fb46ee4b9e160ff02ac64310" }, "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, "nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" }, @@ -35,8 +34,8 @@ "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" }, "nvim-lspconfig": { "branch": "master", "commit": "9b90d9945a8f23b23b2a22fc20c76337039ea499" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-tree.lua": { "branch": "master", "commit": "dd2364d6802f7f57a98acb8b545ed484c6697626" }, - "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-tree.lua": { "branch": "master", "commit": "a0db8bf7d6488b1dcd9cb5b0dfd6684a1e14f769" }, + "nvim-treesitter": { "branch": "main", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-ufo": { "branch": "main", "commit": "80fe8215ba566df2fbf3bf4d25f59ff8f41bc0e1" }, "nvim-web-devicons": { "branch": "master", "commit": "3362099de3368aa620a8105b19ed04c2053e38c0" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, @@ -53,12 +52,12 @@ "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, - "ui": { "branch": "v3.0", "commit": "dc4950f5bd4117e2da108b681506c908b93d4a62" }, + "ui": { "branch": "v3.0", "commit": "ebf58649bc5c759ee6c730c87d8d2d4dd4124c0d" }, "vim-helm": { "branch": "master", "commit": "cc5ac22444332381f38084a6c7f023c25eef6201" }, "vim-markdown": { "branch": "master", "commit": "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51" }, "vim-terraform": { "branch": "master", "commit": "520498fab16a3a11f2ae1b8cb65e0a1684bc317a" }, - "volt": { "branch": "main", "commit": "7b8c5e790120d9f08c8487dcb80692db6d2087a1" }, - "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, + "volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }, "yaml-companion.nvim": { "branch": "main", "commit": "131b0d67bd2e0f1a02e0daf2f3460482221ce3c0" }, "yaml.nvim": { "branch": "main", "commit": "09bbf7d936606d97f2c1d2e51171a602bc76b65e" } } diff --git a/nvim/.config/nvim/lua/chadrc.lua b/nvim/.config/nvim/lua/chadrc.lua index def6584..0ea0310 100644 --- a/nvim/.config/nvim/lua/chadrc.lua +++ b/nvim/.config/nvim/lua/chadrc.lua @@ -4,7 +4,7 @@ local M = {} -- 1) Base theme and highlights M.base46 = { - theme = "tomorrow_night", + theme = "default-light", -- hl_override = { -- Comment = { italic = true }, -- ["@comment"] = { italic = true }, diff --git a/nvim/.config/nvim/lua/configs/lspconfig.lua b/nvim/.config/nvim/lua/configs/lspconfig.lua index ac06375..328ea6c 100644 --- a/nvim/.config/nvim/lua/configs/lspconfig.lua +++ b/nvim/.config/nvim/lua/configs/lspconfig.lua @@ -1,12 +1,9 @@ require("nvchad.configs.lspconfig").defaults() -local lspconfig = require "lspconfig" -local nvlsp = require "nvchad.configs.lspconfig" - -- DevOps and Infrastructure LSP servers local servers = { "html", - "cssls", + "cssls", "pyright", -- Python "gopls", -- Go "terraformls", -- Terraform @@ -21,43 +18,56 @@ local servers = { -- Enable servers with default config (only if installed) for _, lsp in ipairs(servers) do - local ok, _ = pcall(function() - lspconfig[lsp].setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, - } + pcall(function() + vim.lsp.enable(lsp) end) - if not ok then - vim.notify("LSP server " .. lsp .. " not found. Install it with :MasonInstall " .. lsp, vim.log.levels.WARN) +end + +-- Python specific configuration +-- Helper function to get pipenv python path from a specific directory +local function get_python_path(workspace) + local cwd = workspace or vim.fn.getcwd() + + -- Try pipenv first (run in the workspace directory) + local cmd = string.format("cd '%s' && pipenv --venv 2>/dev/null", cwd) + local handle = io.popen(cmd) + if handle then + local venv_path = handle:read("*a"):gsub("%s+", "") + handle:close() + if venv_path ~= "" and venv_path ~= "nil" then + local python_path = venv_path .. "/bin/python" + -- Verify the python executable exists + if vim.fn.filereadable(python_path) == 1 then + return python_path + end + end end + + -- Fallback to system python + return vim.fn.exepath("python3") or vim.fn.exepath("python") or "python" end --- Python specific configuration (only if installed) -pcall(function() - lspconfig.pyright.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, - settings = { - python = { - analysis = { - autoSearchPaths = true, - diagnosticMode = "workspace", - useLibraryCodeForTypes = true, - typeCheckingMode = "basic" - } +vim.lsp.config("pyright", { + on_new_config = function(config, root_dir) + -- Dynamically set python path based on workspace root + local python_path = get_python_path(root_dir) + config.settings.python = config.settings.python or {} + config.settings.python.pythonPath = python_path + end, + settings = { + python = { + analysis = { + autoSearchPaths = true, + diagnosticMode = "workspace", + useLibraryCodeForTypes = true, + typeCheckingMode = "basic" } } } -end) +}) --- Go specific configuration (only if installed) -pcall(function() - lspconfig.gopls.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, +-- Go specific configuration +vim.lsp.config("gopls", { settings = { gopls = { analyses = { @@ -69,25 +79,15 @@ pcall(function() completeUnimported = true, }, }, -} -end) +}) --- Terraform configuration (only if installed) -pcall(function() - lspconfig.terraformls.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, +-- Terraform configuration +vim.lsp.config("terraformls", { filetypes = { "terraform", "hcl" }, -} -end) +}) --- JSON configuration (only if installed) -pcall(function() - lspconfig.jsonls.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, +-- JSON configuration +vim.lsp.config("jsonls", { settings = { json = { schemas = (function() @@ -101,15 +101,10 @@ pcall(function() validate = { enable = true }, }, }, -} -end) +}) --- SQL LSP configuration (only if installed) -pcall(function() - lspconfig.sqls.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, +-- SQL LSP configuration +vim.lsp.config("sqls", { settings = { sqls = { connections = { @@ -126,15 +121,10 @@ pcall(function() }, }, }, -} -end) +}) --- Docker LSP configuration (only if installed) -pcall(function() - lspconfig.dockerls.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, +-- Docker LSP configuration +vim.lsp.config("dockerls", { settings = { docker = { languageserver = { @@ -144,17 +134,7 @@ pcall(function() }, }, }, -} -end) - --- Docker Compose LSP (only if installed) -pcall(function() - lspconfig.docker_compose_language_service.setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, -} -end) +}) -- YAML Language Server is configured separately -- See configs/yamlls.lua for the configuration diff --git a/nvim/.config/nvim/lua/configs/yamlls.lua b/nvim/.config/nvim/lua/configs/yamlls.lua index 1c4758c..8423a83 100644 --- a/nvim/.config/nvim/lua/configs/yamlls.lua +++ b/nvim/.config/nvim/lua/configs/yamlls.lua @@ -2,40 +2,8 @@ local M = {} function M.setup() - local lspconfig = require("lspconfig") - local nvlsp = require("nvchad.configs.lspconfig") - -- YAML Language Server with Kubernetes schemas - lspconfig.yamlls.setup({ - on_attach = function(client, bufnr) - nvlsp.on_attach(client, bufnr) - -- Enable completion explicitly - vim.bo[bufnr].omnifunc = "v:lua.vim.lsp.omnifunc" - end, - on_init = nvlsp.on_init, - capabilities = vim.tbl_deep_extend("force", nvlsp.capabilities, { - textDocument = { - completion = { - completionItem = { - documentationFormat = { "markdown", "plaintext" }, - snippetSupport = true, - preselectSupport = true, - insertReplaceSupport = true, - labelDetailsSupport = true, - deprecatedSupport = true, - commitCharactersSupport = true, - tagSupport = { valueSet = { 1 } }, - resolveSupport = { - properties = { - "documentation", - "detail", - "additionalTextEdits", - }, - }, - }, - }, - }, - }), + vim.lsp.config("yamlls", { filetypes = { "yaml", "yaml.docker-compose", "yaml.gitlab" }, settings = { redhat = { @@ -77,6 +45,8 @@ function M.setup() }, }, }) + + vim.lsp.enable("yamlls") end return M diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 677e489..9af10fc 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -223,8 +223,21 @@ return { "rcarriga/nvim-dap-ui", }, config = function() - local path = vim.fn.expand("~/.local/share/nvim/mason/packages/debugpy/venv/bin/python") - require("dap-python").setup(path) + -- Try to get pipenv python path + local function get_python_path() + local handle = io.popen("pipenv --venv 2>/dev/null") + if handle then + local venv_path = handle:read("*a"):gsub("%s+", "") + handle:close() + if venv_path ~= "" then + return venv_path .. "/bin/python" + end + end + -- Fallback to debugpy from mason + return vim.fn.expand("~/.local/share/nvim/mason/packages/debugpy/venv/bin/python") + end + + require("dap-python").setup(get_python_path()) end, }, @@ -239,11 +252,25 @@ return { "nvim-neotest/neotest-go", }, config = function() + -- Get pipenv python path for tests + local function get_python_path() + local handle = io.popen("pipenv --venv 2>/dev/null") + if handle then + local venv_path = handle:read("*a"):gsub("%s+", "") + handle:close() + if venv_path ~= "" then + return venv_path .. "/bin/python" + end + end + return "python" + end + require("neotest").setup({ adapters = { require("neotest-python")({ dap = { justMyCode = false }, runner = "pytest", + python = get_python_path(), }), require("neotest-go")({ experimental = { diff --git a/scripts/mac/rc-toggle-dock.sh b/scripts/mac/rc-toggle-dock.sh new file mode 100755 index 0000000..39e4488 --- /dev/null +++ b/scripts/mac/rc-toggle-dock.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Required parameters: +# @raycast.schemaVersion 1 +# @raycast.title Toggle Dock +# @raycast.mode compact + +# Optional parameters: +# @raycast.icon 🤖 + +# Documentation: +# @raycast.description Toggle Dock Location + +# Script to toggle the Dock position between bottom and right on Mac +# Get the current Dock position +current_position=$(defaults read com.apple.dock orientation) + +# Toggle Dock position between bottom and right +if [ "$current_position" = "bottom" ]; then + echo "Switching Dock to the right..." + defaults write com.apple.dock orientation -string right +else + echo "Switching Dock to the bottom..." + defaults write com.apple.dock orientation -string bottom +fi + +# Restart the Dock to apply changes +killall Dock + +echo "Dock position toggled successfully." diff --git a/scripts/mac/toggle-dock-visibility.sh b/scripts/mac/toggle-dock-visibility.sh new file mode 100755 index 0000000..90dcc4a --- /dev/null +++ b/scripts/mac/toggle-dock-visibility.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Required parameters: +# @raycast.schemaVersion 1 +# @raycast.title toggle-dock-visibility +# @raycast.mode compact + +# Optional parameters: +# @raycast.icon 🤖 + +set -euo pipefail + +DOMAIN="com.apple.dock" +KEY="autohide" + +current="$(defaults read "$DOMAIN" "$KEY" 2>/dev/null || echo 0)" + +# `defaults` may return 0/1 or true/false depending on how it was written. +case "$current" in + 1|true|TRUE|yes|YES) next=false; label="Dock: always visible" ;; + 0|false|FALSE|no|NO|"") next=true; label="Dock: auto-hide" ;; + *) next=true; label="Dock: auto-hide" ;; +esac + +defaults write "$DOMAIN" "$KEY" -bool "$next" +killall Dock >/dev/null 2>&1 || true + +echo "$label" + diff --git a/zsh/.zsh_aliases b/zsh/.zsh_aliases index 2491795..e08625b 100644 --- a/zsh/.zsh_aliases +++ b/zsh/.zsh_aliases @@ -93,6 +93,12 @@ alias bi="brew install" alias bu="brew update && brew upgrade" alias bs="brew search" +# =========================== +# 🐍 PYTHON TOOLING +# =========================== +alias python="python3" +alias pip="pip3" + # =========================== # ☸️ KUBERNETES ALIASES # =========================== diff --git a/zsh/.zshenv b/zsh/.zshenv index 683788c..84647d0 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -41,11 +41,21 @@ typeset -U PATH # =========================== # PERFORMANCE: Build PATH dynamically with existence checks (macOS only) -PATH="/usr/bin:/bin:/usr/sbin:/sbin" +# Start from predictable system defaults so exec zsh/exec zsh -l stay consistent +PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" + +# Prefer Homebrew (Apple Silicon) and keep PATH ordering stable +__ensure_brew_shellenv() { + local brew_bin="/opt/homebrew/bin/brew" + if [[ -x "$brew_bin" ]]; then + eval "$("$brew_bin" shellenv)" + elif command -v brew >/dev/null 2>&1; then + eval "$(brew shellenv)" + fi +} + +__ensure_brew_shellenv -# Add optional paths if they exist -[[ -d "/opt/homebrew/bin" ]] && PATH="/opt/homebrew/bin:$PATH" -[[ -d "/usr/local/bin" ]] && PATH="/usr/local/bin:$PATH" [[ -d "/System/Cryptexes/App/usr/bin" ]] && PATH="$PATH:/System/Cryptexes/App/usr/bin" [[ -d "/Library/Apple/usr/bin" ]] && PATH="$PATH:/Library/Apple/usr/bin" @@ -70,25 +80,48 @@ fi # =========================== # FZF CONFIGURATION - PERFORMANCE OPTIMIZED # =========================== +# Theme-aware colors (macOS system appearance) +FZF_COLOR_LIGHT='fg:#1f2937,fg+:#111827,bg:#f8fafc,bg+:#e2e8f0,hl:#1d4ed8,hl+:#1e40af,info:#2563eb,prompt:#0f766e,pointer:#dc2626,marker:#b45309,spinner:#0891b2,header:#334155,border:#cbd5e1' +FZF_COLOR_DARK='fg:#e5e7eb,fg+:#f8fafc,bg:#1f2937,bg+:#334155,hl:#93c5fd,hl+:#bfdbfe,info:#60a5fa,prompt:#34d399,pointer:#f87171,marker:#f59e0b,spinner:#22d3ee,header:#cbd5e1,border:#475569' +FZF_THEME_COLOR="$FZF_COLOR_LIGHT" + +if [[ "$OSTYPE" == darwin* ]] && command -v defaults >/dev/null 2>&1; then + if [[ "$(defaults read -g AppleInterfaceStyle 2>/dev/null)" == "Dark" ]]; then + FZF_THEME_COLOR="$FZF_COLOR_DARK" + fi +fi + +export FZF_THEME_COLOR +export FZF_THEME_OPTS="--color=${FZF_THEME_COLOR}" + # Default command uses fd for better performance and respects .gitignore export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git' # Default options with optimized preview and keybindings -export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border --preview-window=right:60% --bind "ctrl-/:change-preview-window(down|hidden|)" --bind ctrl-u:preview-page-up --bind ctrl-d:preview-page-down' +export FZF_DEFAULT_OPTS="--height 40% --layout=reverse --border --preview-window=right:60% --bind \"ctrl-/:change-preview-window(down|hidden|)\" --bind ctrl-u:preview-page-up --bind ctrl-d:preview-page-down ${FZF_THEME_OPTS}" # Ctrl+T command for file selection export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" -export FZF_CTRL_T_OPTS='--preview "bat --style=numbers --color=always --line-range :500 {}"' +export FZF_CTRL_T_OPTS="--preview \"bat --style=numbers --color=always --line-range :500 {}\" ${FZF_THEME_OPTS}" # Alt+C command for directory selection export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude .git' -export FZF_ALT_C_OPTS='--preview "eza --tree --level=2 --color=always {} 2>/dev/null || ls -la {}"' +export FZF_ALT_C_OPTS="--preview \"eza --tree --level=2 --color=always {} 2>/dev/null || ls -la {}\" ${FZF_THEME_OPTS}" # Ctrl+R command for history search -export FZF_CTRL_R_OPTS='--preview "echo {}" --preview-window down:3:hidden:wrap --bind "ctrl-/:toggle-preview"' +export FZF_CTRL_R_OPTS="--preview \"echo {}\" --preview-window down:3:hidden:wrap --bind \"ctrl-/:toggle-preview\" ${FZF_THEME_OPTS}" # PERFORMANCE: Export the constructed PATH export PATH # Claude Token limit export CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000 + +# 1Password SSH agent +export SSH_AUTH_SOCK=~/.1password/agent.sock + +fpath=(/Users/ab/.granted/zsh_autocomplete/assume/ $fpath) + +fpath=(/Users/ab/.granted/zsh_autocomplete/granted/ $fpath) + +alias assume=". assume" diff --git a/zsh/.zshrc b/zsh/.zshrc index 8550284..f1491e7 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -133,6 +133,15 @@ fi zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' zstyle ':completion:*' menu select +# FZF-tab completion styling (inherits system-aware fzf color palette) +zstyle ':fzf-tab:*' fzf-command fzf +zstyle ':fzf-tab:*' fzf-preview 'eza -la --color=always $realpath 2>/dev/null || ls -la $realpath' +zstyle ':fzf-tab:*' popup-pad 30 0 +zstyle ':fzf-tab:*' fzf-flags --height=50% --layout=reverse --border --preview-window=right:60%:wrap --color="$FZF_THEME_COLOR" +zstyle ':fzf-tab:*' switch-group ',' '.' +zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza --tree --level=2 --color=always $realpath' +zstyle ':fzf-tab:complete:*:*' fzf-preview 'bat --color=always $realpath 2>/dev/null || eza -la --color=always $realpath 2>/dev/null || ls -la $realpath' + # =========================== # OTHER TOOLS (DEFERRED) # =========================== @@ -163,10 +172,10 @@ setopt INC_APPEND_HISTORY HIST_EXPIRE_DUPS_FIRST HIST_FIND_NO_DUPS HIST_VERIFY if command -v atuin &>/dev/null; then # Disable default history search bindings bindkey -r '^R' - + # Initialize atuin with minimal overhead eval "$(atuin init zsh --disable-up-arrow)" - + # Custom keybindings for better integration bindkey '^R' _atuin_search_widget # Keep Ctrl+R for atuin search fi @@ -192,5 +201,7 @@ command -v direnv &>/dev/null && eval "$(direnv hook zsh)" . "$HOME/.local/bin/env" -# Created by `pipx` on 2025-11-01 03:35:06 -export PATH="$PATH:/Users/ab/Library/Python/3.9/bin" +# AWS CLI autocomplete +autoload bashcompinit && bashcompinit +autoload -Uz compinit && compinit +complete -C '/opt/homebrew/bin/aws_completer' aws diff --git a/zsh/README.md b/zsh/README.md index 41b3144..2f9b236 100644 --- a/zsh/README.md +++ b/zsh/README.md @@ -77,6 +77,19 @@ brew install direnv hyperfine git-delta brew install eza tree ncdu neovim powerlevel10k ``` +## 🐍 Homebrew Python Toolchain + +- `.zshenv` now loads `eval "$(/opt/homebrew/bin/brew shellenv)"` early so login shells, `exec zsh`, and `exec zsh -l` prefer Homebrew Python. +- Quick verification (expected: `/opt/homebrew/bin/python3` first and Python 3.14.x): +```bash +# Homebrew Python should win PATH +which -a python3 +python3 --version +python3 -c 'import sys; print(sys.executable)' +``` +- Pipx hygiene (commands only): `brew install pipx`, `pipx ensurepath`, `pipx install pipenv`. +- Avoid `sudo pip` against `/usr/bin/python3`; legacy `~/Library/Python/3.9` user-site packages came from CLT Python and can be ignored once PATH is Homebrew-first. + ## ⚡ Configuration Options ### Option 1: Oh My Zsh (Familiar & Stable)