From d7c3dff9435d1eaeb2229bbef75ab88456b24670 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 4 Jul 2025 23:01:36 -0400 Subject: update tmux config --- .gitignore | 1 + tmux/.config/tmux/key-remappings.conf | 21 ---------------- tmux/.config/tmux/key-remappings.tmux | 18 ++++++++++++++ tmux/.config/tmux/macos.tmux | 14 +++++++++++ tmux/.config/tmux/options.conf | 28 ---------------------- tmux/.config/tmux/options.tmux | 38 +++++++++++++++++++++++++++++ tmux/.config/tmux/plugins.conf | 27 --------------------- tmux/.config/tmux/plugins.tmux | 45 +++++++++++++++++++++++++++++++++++ tmux/.config/tmux/theme.conf | 32 ------------------------- tmux/.config/tmux/tmux.conf | 10 ++++---- tmux/.config/tmux/vi.conf | 8 ------- tmux/.config/tmux/vi.tmux | 6 +++++ tmux/.tmux/plugins/tpm | 1 - 13 files changed, 127 insertions(+), 122 deletions(-) delete mode 100644 tmux/.config/tmux/key-remappings.conf create mode 100644 tmux/.config/tmux/key-remappings.tmux create mode 100644 tmux/.config/tmux/macos.tmux delete mode 100644 tmux/.config/tmux/options.conf create mode 100644 tmux/.config/tmux/options.tmux delete mode 100644 tmux/.config/tmux/plugins.conf create mode 100644 tmux/.config/tmux/plugins.tmux delete mode 100644 tmux/.config/tmux/theme.conf delete mode 100644 tmux/.config/tmux/vi.conf create mode 100644 tmux/.config/tmux/vi.tmux delete mode 160000 tmux/.tmux/plugins/tpm diff --git a/.gitignore b/.gitignore index c9c4802..235823d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store /tags +/tmux/.config/tmux/plugins diff --git a/tmux/.config/tmux/key-remappings.conf b/tmux/.config/tmux/key-remappings.conf deleted file mode 100644 index 1a6cfde..0000000 --- a/tmux/.config/tmux/key-remappings.conf +++ /dev/null @@ -1,21 +0,0 @@ -# Start from a blank slate. Unremap all default key bindings. -# unbind-key -a - -# Remap prefix from 'C-b' to 'C-a' -# -# This works well if you remap the regular Caps Lock key to Ctrl. -unbind C-b -set-option -g prefix C-a -bind-key C-a send-prefix - -# Remap pane splits. -# -# Split panes using | for horizontal splits and - for vertical splits -bind-key | split-window -h -bind-key - split-window -v -unbind '"' -unbind % - -bind-key r source-file ~/.config/tmux/tmux.conf -bind-key x kill-pane - diff --git a/tmux/.config/tmux/key-remappings.tmux b/tmux/.config/tmux/key-remappings.tmux new file mode 100644 index 0000000..2e71dfe --- /dev/null +++ b/tmux/.config/tmux/key-remappings.tmux @@ -0,0 +1,18 @@ +# Remap prefix from 'C-b' to 'C-a' +# +# This works well if you remap the regular Caps Lock key to Ctrl. +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix + +# Remap pane splits. +# +# Split panes using | for horizontal splits and - for vertical splits +bind-key | split-window -h +bind-key - split-window -v +unbind '"' +unbind % + +bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded!" +bind-key x kill-pane + diff --git a/tmux/.config/tmux/macos.tmux b/tmux/.config/tmux/macos.tmux new file mode 100644 index 0000000..02fbde3 --- /dev/null +++ b/tmux/.config/tmux/macos.tmux @@ -0,0 +1,14 @@ +# Related: [issue #67](https://github.com/tmux-plugins/tpm/issues/67) +set-environment -g PATH "/opt/homebrew/bin:/bin:/usr/bin" + +# Setting the namespace +set -g default-command "reattach-to-user-namespace -l /bin/zsh" + +# Prefix C-c copy buffer to system clipboard +bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" + +# Prefix C-v paste system clipboard into tmux +bind C-v run "tmux set-buffer \"$(reattach-to-user-namespace pbpaste)\"; tmux paste-buffer" + +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" +bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" diff --git a/tmux/.config/tmux/options.conf b/tmux/.config/tmux/options.conf deleted file mode 100644 index ac1cb84..0000000 --- a/tmux/.config/tmux/options.conf +++ /dev/null @@ -1,28 +0,0 @@ -# Don't rename windows automatically. -# -# I often will use the `,` key to rename windows. -# However, by default, tmux will update the window -# title to the last executed command. -set-option -g allow-rename off - -# Enable mouse support (clickable windows, panes, resizable panes) -set-option -g mouse on - -# Set terminal colors -set-option -g default-terminal "screen-256color" - -# Start windows and panes at 1, not 0 -set-option -g base-index 1 -set-option -g pane-base-index 1 -set-window-option -g pane-base-index 1 -set-option -g renumber-windows on - -# Don't do anything when a 'bell' rings -set-option -g visual-activity off -set-option -g visual-bell off -set-option -g visual-silence off -set-window-option -g monitor-activity off -set-option -g bell-action none - -# Enable hyperlinks -set-option -as terminal-features ",*:hyperlinks" diff --git a/tmux/.config/tmux/options.tmux b/tmux/.config/tmux/options.tmux new file mode 100644 index 0000000..ab6a97e --- /dev/null +++ b/tmux/.config/tmux/options.tmux @@ -0,0 +1,38 @@ +# Don't rename windows automatically. +# +# I often will use the `,` key to rename windows. +# However, by default, tmux will update the window +# title to the last executed command. +set-option -g allow-rename off + +# Enable mouse support (clickable windows, panes, resizable panes) +set-option -g mouse on + +# Enable system clipboard integration (macOS) +set-option -g set-clipboard on + +# Allow focus events (for editors like Neovim) +set -g focus-events on + +# Start windows and panes at 1, not 0 +set-option -g base-index 1 +set-option -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on + +# Don't do anything when a 'bell' rings +set-option -g visual-activity off +set-option -g visual-bell off +set-option -g visual-silence off +set-window-option -g monitor-activity off +set-option -g bell-action none + +# Enable hyperlinks +set-option -as terminal-features ",*:hyperlinks" + +# Enable true color support +set -ga terminal-overrides ",*256col*:Tc" +set -ga terminal-overrides ",tmux-256color:Tc" + +set -g default-terminal "tmux-256color" +set -g default-shell /bin/zsh diff --git a/tmux/.config/tmux/plugins.conf b/tmux/.config/tmux/plugins.conf deleted file mode 100644 index 58ca774..0000000 --- a/tmux/.config/tmux/plugins.conf +++ /dev/null @@ -1,27 +0,0 @@ -# Plugin manager -set-option -g @plugin 'tmux-plugins/tpm' - -# 'Sensible' set of defaults -set-option -g @plugin 'tmux-plugins/tmux-sensible' - -# Tmux FZF is a plugin that integrates FZF with tmux -TMUX_FZF_ORDER="session|window|pane|command|keybinding" -TMUX_FZF_OPTIONS="-p -w 90% -h 70% -m" -set-option -g @plugin 'sainnhe/tmux-fzf' - -# Resurrect is a plugin that saves and restores tmux sessions -set-option -g @plugin 'tmux-plugins/tmux-resurrect' -set-option -g @resurrect-save 'S' -set-option -g @resurrect-restore 'R' - -# Continuum is a plugin that automatically saves tmux sessions -# at regular intervals -set-option -g @plugin 'tmux-plugins/tmux-continuum' -set-option -g @continuum-restore 'on' -set-option -g @continuum-save-interval '15' -set-option -g @resurrect-strategy-nvim 'session' - -# Vim Tmux Navigator allows you to navigate between Vim and tmux panes -set-option -g @plugin 'christoomey/vim-tmux-navigator' - -run '~/.tmux/plugins/tpm/tpm' diff --git a/tmux/.config/tmux/plugins.tmux b/tmux/.config/tmux/plugins.tmux new file mode 100644 index 0000000..e5750e3 --- /dev/null +++ b/tmux/.config/tmux/plugins.tmux @@ -0,0 +1,45 @@ +# Plugin manager +set-environment -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.config/tmux/plugins/" +set-option -g @plugin 'tmux-plugins/tpm' + +# 'Sensible' set of defaults +set-option -g @plugin 'tmux-plugins/tmux-sensible' + +# Tmux FZF is a plugin that integrates FZF with tmux +TMUX_FZF_ORDER="session|window|pane|command|keybinding" +TMUX_FZF_OPTIONS="-p -w 90% -h 70% -m" +set-option -g @plugin 'sainnhe/tmux-fzf' + +# Resurrect is a plugin that saves and restores tmux sessions +set-option -g @plugin 'tmux-plugins/tmux-resurrect' +set-option -g @resurrect-save 'S' +set-option -g @resurrect-restore 'R' + +# Continuum is a plugin that automatically saves tmux sessions +# at regular intervals +set-option -g @plugin 'tmux-plugins/tmux-continuum' +set-option -g @continuum-restore 'on' +set-option -g @continuum-save-interval '15' +set-option -g @resurrect-strategy-nvim 'session' + +# Vim Tmux Navigator allows you to navigate between Vim and tmux panes +set-option -g @plugin 'christoomey/vim-tmux-navigator' + +set-option -g @plugin 'tmux-plugins/tmux-yank' +set-option -g @plugin 'tmux-plugins/tmux-open' +set-option -g @plugin 'tmux-plugins/tmux-copycat' + +set-option -g @plugin "janoamaral/tokyo-night-tmux" +set -g @tokyo-night-tmux_theme night +set -g @tokyo-night-tmux_transparent 1 +set -g @tokyo-night-tmux_window_id_style digital +set -g @tokyo-night-tmux_pane_id_style hsquare +set -g @tokyo-night-tmux_zoom_id_style dsquare +set -g @tokyo-night-tmux_terminal_icon  +set -g @tokyo-night-tmux_active_terminal_icon  +set -g @tokyo-night-tmux_window_tidy_icons 1 +set -g @tokyo-night-tmux_show_datetime 1 +set -g @tokyo-night-tmux_date_format YMD +set -g @tokyo-night-tmux_time_format 24H + +run '$HOME/.config/tmux/plugins/tpm/tpm' diff --git a/tmux/.config/tmux/theme.conf b/tmux/.config/tmux/theme.conf deleted file mode 100644 index f0668ae..0000000 --- a/tmux/.config/tmux/theme.conf +++ /dev/null @@ -1,32 +0,0 @@ -# Clock mode -setw -g clock-mode-colour yellow - -# Copy mode -setw -g mode-style 'fg=black bg=red bold' - -set -g pane-border-style 'fg=red' -set -g pane-active-border-style 'fg=yellow' - -# Statusbar -set -g status-position bottom -set -g status-justify left -set -g status-style 'fg=red' - -set -g status-left '' -set -g status-left-length 10 - -set -g status-right-style 'fg=black bg=yellow' -set -g status-right '%Y-%m-%d %H:%M ' -set -g status-right-length 50 - -setw -g window-status-current-style 'fg=black bg=red' -setw -g window-status-current-format ' #I #W #F ' - -setw -g window-status-style 'fg=red bg=black' -setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F ' - -setw -g window-status-bell-style 'fg=yellow bg=red bold' - -# Messages -set -g message-style 'fg=yellow bg=red bold' - diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index 4783498..4d2dbde 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -6,9 +6,9 @@ # https://github.com/tmux-plugins/tpm/issues/67#issuecomment-319561401 set-environment -g PATH "/usr/local/bin:/bin:/usr/bin" -source-file ~/.config/tmux/key-remappings.conf -source-file ~/.config/tmux/options.conf -source-file ~/.config/tmux/vi.conf -source-file ~/.config/tmux/theme.conf -source-file ~/.config/tmux/plugins.conf +source-file ~/.config/tmux/key-remappings.tmux +source-file ~/.config/tmux/options.tmux +source-file ~/.config/tmux/vi.tmux +if-shell "uname | grep -q Darwin" "source-file ~/.config/tmux/macos.tmux" +source-file ~/.config/tmux/plugins.tmux diff --git a/tmux/.config/tmux/vi.conf b/tmux/.config/tmux/vi.conf deleted file mode 100644 index 6592f10..0000000 --- a/tmux/.config/tmux/vi.conf +++ /dev/null @@ -1,8 +0,0 @@ -# Set vi mode -set-window-option -g mode-keys vi - -# Use visual selection mode as vi -bind-key -T copy-mode-vi v send-keys -X begin-selection -bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle -bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel - diff --git a/tmux/.config/tmux/vi.tmux b/tmux/.config/tmux/vi.tmux new file mode 100644 index 0000000..85f2f37 --- /dev/null +++ b/tmux/.config/tmux/vi.tmux @@ -0,0 +1,6 @@ +set-window-option -g mode-keys vi + +# Use visual selection mode as vi +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel diff --git a/tmux/.tmux/plugins/tpm b/tmux/.tmux/plugins/tpm deleted file mode 160000 index 99469c4..0000000 --- a/tmux/.tmux/plugins/tpm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946 -- cgit v1.2.3 From 6c089ff3ec32f147325e16e6bde19c0916e43379 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 4 Jul 2025 23:01:52 -0400 Subject: Start tmux on zsh startup --- zsh/.zsh/tmux.sh | 5 +++++ zsh/.zshrc | 1 + 2 files changed, 6 insertions(+) create mode 100644 zsh/.zsh/tmux.sh diff --git a/zsh/.zsh/tmux.sh b/zsh/.zsh/tmux.sh new file mode 100644 index 0000000..323a8ec --- /dev/null +++ b/zsh/.zsh/tmux.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env zsh + +if [[ "$TERM" != "tmux-256color" ]]; then + tmux attach-session -t "$USER" || tmux new-session -s "$USER" +fi diff --git a/zsh/.zshrc b/zsh/.zshrc index b257360..de4f6b0 100755 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,6 +1,7 @@ #!/usr/bin/env zsh source ~/.zsh/prompt.sh +source ~/.zsh/tmux.sh autoload -Uz compinit compinit -- cgit v1.2.3 From c929cba0906fecb56a61d0cd4007845b906d805d Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 4 Jul 2025 23:02:09 -0400 Subject: add default model and use -x with shellcheck --- nvim/.config/nvim/lua/plugins/copilot.lua | 4 +++- nvim/.config/nvim/lua/plugins/lint.lua | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/copilot.lua b/nvim/.config/nvim/lua/plugins/copilot.lua index 4d16709..36ddc99 100644 --- a/nvim/.config/nvim/lua/plugins/copilot.lua +++ b/nvim/.config/nvim/lua/plugins/copilot.lua @@ -18,7 +18,9 @@ return { }, build = 'make tiktoken', -- Only on MacOS or Linux config = function() - require('CopilotChat').setup {} + require('CopilotChat').setup { + model = 'claude-3.5-sonnet', + } vim.keymap.set('n', 'cc', function() vim.cmd 'CopilotChatToggle' end, { desc = '[Copilot] Toggle Copilot Chat' }) diff --git a/nvim/.config/nvim/lua/plugins/lint.lua b/nvim/.config/nvim/lua/plugins/lint.lua index 4e41d83..da98a9e 100644 --- a/nvim/.config/nvim/lua/plugins/lint.lua +++ b/nvim/.config/nvim/lua/plugins/lint.lua @@ -16,6 +16,7 @@ return { lint.linters_by_ft['markdown'] = nil lint.linters_by_ft['text'] = nil lint.linters_by_ft['sh'] = { 'shellcheck' } + lint.linters.shellcheck.args = { '-x' } -- Default linters, which will cause errors unless these tools are available: -- { -- cgit v1.2.3 From 258d56d8364be9ea902bb7cfa570beed88c5a9a7 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 4 Jul 2025 23:02:25 -0400 Subject: adjust ghostty config --- ghostty/.config/ghostty/config | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ghostty/.config/ghostty/config b/ghostty/.config/ghostty/config index eb66f61..9f993de 100644 --- a/ghostty/.config/ghostty/config +++ b/ghostty/.config/ghostty/config @@ -41,12 +41,16 @@ # # which is explained in the docs for that config option. # # Just for example: # resize-overlay-duration = 4s 200ms - theme = "tokyonight" font-family = "Hack" font-size = 14 -keybind = cmd+/=new_split:right -keybind = cmd+.=new_split:down keybind = global:cmd+shift+t=toggle_quick_terminal +quick-terminal-autohide = false +quick-terminal-screen = main +shell-integration = zsh +mouse-hide-while-typing = true +scrollback-limit = 1000000 +macos-option-as-alt = true +window-save-state = always -- cgit v1.2.3 From c3f2476fc0add2ec97ac74e8f8b880c8beafacc4 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 4 Jul 2025 23:03:12 -0400 Subject: remove plugins --- tmux/.config/tmux/plugins/tmux-sensible | 1 - tmux/.config/tmux/plugins/tpm | 1 - 2 files changed, 2 deletions(-) delete mode 160000 tmux/.config/tmux/plugins/tmux-sensible delete mode 160000 tmux/.config/tmux/plugins/tpm diff --git a/tmux/.config/tmux/plugins/tmux-sensible b/tmux/.config/tmux/plugins/tmux-sensible deleted file mode 160000 index 25cb91f..0000000 --- a/tmux/.config/tmux/plugins/tmux-sensible +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa diff --git a/tmux/.config/tmux/plugins/tpm b/tmux/.config/tmux/plugins/tpm deleted file mode 160000 index 99469c4..0000000 --- a/tmux/.config/tmux/plugins/tpm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946 -- cgit v1.2.3 From 3ddb699d227c52b95875b6b01cd863fd05da661c Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 4 Jul 2025 23:04:03 -0400 Subject: adjust brewfile --- homebrew/Brewfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/homebrew/Brewfile b/homebrew/Brewfile index 718d6cc..a453af9 100644 --- a/homebrew/Brewfile +++ b/homebrew/Brewfile @@ -3,8 +3,10 @@ tap "eugenetriguba/bolt" brew "act" brew "ansible" brew "bandit" +brew "bash" brew "bat" brew "bats-core" +brew "bc" brew "ca-certificates" brew "clang-format" brew "cmake" @@ -18,12 +20,16 @@ brew "curl" brew "doxygen" brew "duckdb" brew "eugenetriguba/bolt/bolt" +brew "eugenetriguba/justify/justify" brew "fd" brew "ffmpeg" brew "fzf" +brew "gawk" brew "gcc" brew "gh" brew "git" +brew "glab" +brew "gnu-sed" brew "gnupg" brew "go" brew "gradle" @@ -31,6 +37,8 @@ brew "hadolint" brew "htop" brew "hugo" brew "icu4c@76" +brew "icu4c@77" +brew "isort" brew "jc" brew "jq" brew "jsonlint" @@ -50,6 +58,7 @@ brew "ncdu" brew "neovim" brew "nmap" brew "node" +brew "nowplaying-cli" brew "nvm" brew "ollama" brew "openblas" @@ -60,6 +69,7 @@ brew "pipx" brew "pkgconf" brew "postgresql@14" brew "pre-commit" +brew "prettierd" brew "pyenv-virtualenv" brew "pyenv" brew "python@3.11" @@ -68,10 +78,13 @@ brew "python@3.13" brew "qemu" brew "r" brew "readline" +brew "reattach-to-user-namespace" brew "ripgrep" brew "rsync" brew "ruff" brew "rustup" +brew "shellcheck" +brew "shfmt" brew "speedtest-cli" brew "splint" brew "stow" @@ -82,6 +95,7 @@ brew "tflint" brew "tldr" brew "tmux" brew "tree" +brew "vale" brew "vim" brew "wget" brew "xz" @@ -94,17 +108,22 @@ cask "anki" cask "brave-browser" cask "calibre" cask "discord" +cask "docker-desktop" cask "docker" cask "elgato-control-center" cask "font-hack-nerd-font" cask "font-inter" cask "font-menlo-for-powerline" +cask "font-monaspace-nerd-font" +cask "font-noto-sans-symbols-2" cask "ghostty" cask "hashicorp-vagrant" cask "iterm2" cask "logi-options-plus" cask "logi-options+" +cask "mullvad-vpn" cask "mullvadvpn" +cask "neovide-app" cask "neovide" cask "obsidian" cask "omnifocus" @@ -116,4 +135,5 @@ cask "signal" cask "spotify" cask "vagrant" cask "visual-studio-code" +cask "vivaldi" cask "zotero" -- cgit v1.2.3 From 9940e18f90a91740dda9d4b01a692a6f02cb01f2 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 4 Jul 2025 23:20:25 -0400 Subject: Tidy up zsh config --- zsh/.zsh/aliases.sh | 23 +++++++++++++++ zsh/.zsh/completion.sh | 4 +++ zsh/.zsh/env.sh | 10 +++++++ zsh/.zsh/history.sh | 5 ++++ zsh/.zsh/languages.sh | 35 +++++++++++++++++++++++ zsh/.zsh/path.sh | 6 ++++ zsh/.zsh/tmux.sh | 4 +-- zsh/.zshrc | 77 ++++---------------------------------------------- 8 files changed, 91 insertions(+), 73 deletions(-) create mode 100644 zsh/.zsh/aliases.sh create mode 100644 zsh/.zsh/completion.sh create mode 100644 zsh/.zsh/env.sh create mode 100644 zsh/.zsh/history.sh create mode 100644 zsh/.zsh/languages.sh create mode 100644 zsh/.zsh/path.sh diff --git a/zsh/.zsh/aliases.sh b/zsh/.zsh/aliases.sh new file mode 100644 index 0000000..85e5d2a --- /dev/null +++ b/zsh/.zsh/aliases.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env zsh + +# Git +alias gs="git status" +alias gc="git commit" +alias ga="git add" +alias gd="git diff" +alias gds="git diff --staged" +alias gp="git push" +alias gpo="git push origin" +alias gpl="git pull" +alias gplrb="git pull --rebase" +alias gl="git log" +alias gv="git log --graph --decorate --oneline" +alias gch="git checkout" +alias gcb="git checkout -b" + +# System +alias h="history 25" +alias j="jobs -l" +alias l="ls -alG" +alias vi="nvim" +alias vim="nvim" diff --git a/zsh/.zsh/completion.sh b/zsh/.zsh/completion.sh new file mode 100644 index 0000000..981c523 --- /dev/null +++ b/zsh/.zsh/completion.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env zsh + +autoload -Uz compinit +compinit diff --git a/zsh/.zsh/env.sh b/zsh/.zsh/env.sh new file mode 100644 index 0000000..74b9067 --- /dev/null +++ b/zsh/.zsh/env.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env zsh + +export EDITOR="nvim" +export BROWSER="vivaldi" +export GPG_TTY=$(tty) +export PAGER="less" +export MANPAGER="less" +export BAT_THEME="tokyonight_night" +export SRC_DIR="$HOME/src" +export BIN_DIR="$HOME/bin" diff --git a/zsh/.zsh/history.sh b/zsh/.zsh/history.sh new file mode 100644 index 0000000..e834b85 --- /dev/null +++ b/zsh/.zsh/history.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env zsh + +export HISTFILE=~/.zhistory +export HISTSIZE=100000 +export SAVEHIST=100000 diff --git a/zsh/.zsh/languages.sh b/zsh/.zsh/languages.sh new file mode 100644 index 0000000..36ade67 --- /dev/null +++ b/zsh/.zsh/languages.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env zsh + +# Go +export GOPATH="$SRC_DIR/go" +export GOBIN="$SRC_DIR/go/bin" +export PATH="$GOPATH/bin:$PATH" +export PATH="$GOROOT/bin:$PATH" +export PATH="$GOBIN:$PATH" + +# Python +export PYENV_ROOT="$HOME/.pyenv" +export PATH="$PYENV_ROOT/bin:$PATH" +command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" +eval "$(pyenv init -)" +eval "$(pyenv virtualenv-init -)" + +# Rust +source "$HOME/.cargo/env" + +# Node.js +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +# PNPM +export PNPM_HOME="/Users/eugene/Library/pnpm" +case ":$PATH:" in +*":$PNPM_HOME:"*) ;; +*) export PATH="$PNPM_HOME:$PATH" ;; +esac + +# Homebrew +eval "$(brew shellenv)" +export LDFLAGS="-L/opt/homebrew/lib" +export CPPFLAGS="-I/opt/homebrew/include" +export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib" diff --git a/zsh/.zsh/path.sh b/zsh/.zsh/path.sh new file mode 100644 index 0000000..d000618 --- /dev/null +++ b/zsh/.zsh/path.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env zsh + +export PATH="$BIN_DIR:$PATH" +export PATH="$HOME/.local/bin:$PATH" +export PATH="$HOME/.poetry/bin:$PATH" +export PATH="/opt/homebrew/opt/curl/bin:$PATH" diff --git a/zsh/.zsh/tmux.sh b/zsh/.zsh/tmux.sh index 323a8ec..1c0620d 100644 --- a/zsh/.zsh/tmux.sh +++ b/zsh/.zsh/tmux.sh @@ -1,5 +1,5 @@ #!/usr/bin/env zsh - -if [[ "$TERM" != "tmux-256color" ]]; then +# +if [[ -z "$TMUX" ]]; then tmux attach-session -t "$USER" || tmux new-session -s "$USER" fi diff --git a/zsh/.zshrc b/zsh/.zshrc index de4f6b0..2eca5df 100755 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -2,76 +2,11 @@ source ~/.zsh/prompt.sh source ~/.zsh/tmux.sh +source ~/.zsh/completion.sh +source ~/.zsh/history.sh -autoload -Uz compinit -compinit +source ~/.zsh/env.sh +source ~/.zsh/path.sh +source ~/.zsh/languages.sh +source ~/.zsh/aliases.sh -export HISTFILE=~/.zhistory -export HISTSIZE=100000 -export SAVEHIST=100000 - -export EDITOR="nvim" -export BROWSER="vivaldi" -export BAT_THEME="tokyonight_night" -export MANPAGER="less" -export PAGER="less" -export TERM="xterm-256color" - -export GPG_TTY=$(tty) - -export SRC_DIR="$HOME/src" -export BIN_DIR="$HOME/bin" - -export PATH="$BIN_DIR:$PATH" -export PATH="$HOME/.poetry/bin:$PATH" -export PATH="$GOPATH/bin:$PATH" -export PATH="$GOROOT/bin:$PATH" -export PATH="$HOME/.local/bin:$PATH" - -export GOPATH="$SRC_DIR/go" -export GOBIN="$SRC_DIR/go/bin" -export PATH="$GOBIN:$PATH" - -source "$HOME/.cargo/env" - -export PYENV_ROOT="$HOME/.pyenv" -export PATH="$PYENV_ROOT/bin:$PATH" -command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" -eval "$(pyenv virtualenv-init -)" - -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - -export PNPM_HOME="/Users/eugene/Library/pnpm" -case ":$PATH:" in -*":$PNPM_HOME:"*) ;; -*) export PATH="$PNPM_HOME:$PATH" ;; -esac - -eval "$(brew shellenv)" -export LDFLAGS="-L/opt/homebrew/lib" -export CPPFLAGS="-I/opt/homebrew/include" -export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib" -export PATH="/opt/homebrew/opt/curl/bin:$PATH" - -alias gs="git status" -alias gc="git commit" -alias ga="git add" -alias gd="git diff" -alias gds="git diff --staged" -alias gp="git push" -alias gpo='git push origin' -alias gplrb='git pull --rebase' -alias gpl="git pull" -alias gl='git log' -alias gch="git checkout" -alias gcb='git checkout -b' -alias gv='git log --graph --decorate --oneline' - -alias h="history 25" -alias j="jobs -l" -alias l="ls -alG" - -alias vi="nvim" -alias vim="nvim" -- cgit v1.2.3 From e19eb9fb7d1e20de64526bcc92fb9c513664c035 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 4 Jul 2025 23:20:38 -0400 Subject: update brewfile --- homebrew/Brewfile | 4 ---- homebrew/sync-brewfile.sh | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/homebrew/Brewfile b/homebrew/Brewfile index a453af9..46e3743 100644 --- a/homebrew/Brewfile +++ b/homebrew/Brewfile @@ -109,7 +109,6 @@ cask "brave-browser" cask "calibre" cask "discord" cask "docker-desktop" -cask "docker" cask "elgato-control-center" cask "font-hack-nerd-font" cask "font-inter" @@ -119,10 +118,7 @@ cask "font-noto-sans-symbols-2" cask "ghostty" cask "hashicorp-vagrant" cask "iterm2" -cask "logi-options-plus" -cask "logi-options+" cask "mullvad-vpn" -cask "mullvadvpn" cask "neovide-app" cask "neovide" cask "obsidian" diff --git a/homebrew/sync-brewfile.sh b/homebrew/sync-brewfile.sh index bf36e10..fbe45e0 100755 --- a/homebrew/sync-brewfile.sh +++ b/homebrew/sync-brewfile.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -eou pipefail # Create a new Brewfile with only manually installed formulae and casks ( -- cgit v1.2.3 From f7ec5b64aec5d949271e0e925a03d5de556ca5c7 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 5 Jul 2025 00:01:13 -0400 Subject: Replace neovim toggle term w/ tmux term --- executables/bin/tmux-toggle-term | 21 +++++++++++++++++++++ nvim/.config/nvim/lua/plugins/toggleterm.lua | 14 -------------- tmux/.config/tmux/key-remappings.tmux | 3 +++ 3 files changed, 24 insertions(+), 14 deletions(-) create mode 100755 executables/bin/tmux-toggle-term delete mode 100644 nvim/.config/nvim/lua/plugins/toggleterm.lua diff --git a/executables/bin/tmux-toggle-term b/executables/bin/tmux-toggle-term new file mode 100755 index 0000000..7012392 --- /dev/null +++ b/executables/bin/tmux-toggle-term @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -uo pipefail +FLOAT_TERM="${1:-}" +LIST_PANES="$(tmux list-panes -F '#F')" +PANE_ZOOMED="$(echo "${LIST_PANES}" | grep Z)" +PANE_COUNT="$(echo "${LIST_PANES}" | wc -l | bc)" +if [ -n "${FLOAT_TERM}" ]; then + if [ "$(tmux display-message -p -F "#{session_name}")" = "popup" ]; then + tmux detach-client + else + tmux popup -d '#{pane_current_path}' -xC -yC -w90% -h80% -E "tmux attach -t popup || tmux new -s popup" + fi +else + if [ "${PANE_COUNT}" = 1 ]; then + tmux split-window -c "#{pane_current_path}" + elif [ -n "${PANE_ZOOMED}" ]; then + tmux select-pane -t:.- + else + tmux resize-pane -Z -t1 + fi +fi diff --git a/nvim/.config/nvim/lua/plugins/toggleterm.lua b/nvim/.config/nvim/lua/plugins/toggleterm.lua deleted file mode 100644 index 283123f..0000000 --- a/nvim/.config/nvim/lua/plugins/toggleterm.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - { - 'akinsho/toggleterm.nvim', - config = function() - require('toggleterm').setup { - size = 15, - open_mapping = [[]], - shade_filetypes = {}, - shade_terminals = true, - direction = 'horizontal', - } - end, - }, -} diff --git a/tmux/.config/tmux/key-remappings.tmux b/tmux/.config/tmux/key-remappings.tmux index 2e71dfe..65318d7 100644 --- a/tmux/.config/tmux/key-remappings.tmux +++ b/tmux/.config/tmux/key-remappings.tmux @@ -16,3 +16,6 @@ unbind % bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded!" bind-key x kill-pane +bind-key -n 'C-t' run-shell -b "${HOME}/bin/tmux-toggle-term" +bind-key -n 'C-f' run-shell -b "${HOME}/bin/tmux-toggle-term float" + -- cgit v1.2.3 From 6ea0bcb28000484c3e6b6580a0cee67280995e43 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 5 Jul 2025 16:36:30 -0400 Subject: clean up brewfile --- homebrew/Brewfile | 1 - nvim/.config/nvim/lazy-lock.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/homebrew/Brewfile b/homebrew/Brewfile index 46e3743..6692432 100644 --- a/homebrew/Brewfile +++ b/homebrew/Brewfile @@ -105,7 +105,6 @@ brew "zlib" cask "1password-cli" cask "1password" cask "anki" -cask "brave-browser" cask "calibre" cask "discord" cask "docker-desktop" diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 36f1ba8..a6af74e 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -16,7 +16,7 @@ "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, - "mini.nvim": { "branch": "main", "commit": "145476d74aaa3236db9dc6705d0fa3eb0f4f8352" }, + "mini.nvim": { "branch": "main", "commit": "8ca3965e68edfee5f438d4063f5adf5afa255884" }, "neo-tree.nvim": { "branch": "main", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "2647cce4cb64fb35c212146663384e05ae126bdf" }, -- cgit v1.2.3 From b9582abdee3074ddf0d5fb9d028c4b6096cc23c2 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 5 Jul 2025 16:43:49 -0400 Subject: Update install script to download tpm and initialize plugins --- homebrew/Brewfile | 1 - install.sh | 35 +++++++++++++++++++++++++++++++++++ nvim/.config/nvim/lazy-lock.json | 19 +++++++++---------- 3 files changed, 44 insertions(+), 11 deletions(-) diff --git a/homebrew/Brewfile b/homebrew/Brewfile index 6692432..3e448b7 100644 --- a/homebrew/Brewfile +++ b/homebrew/Brewfile @@ -115,7 +115,6 @@ cask "font-menlo-for-powerline" cask "font-monaspace-nerd-font" cask "font-noto-sans-symbols-2" cask "ghostty" -cask "hashicorp-vagrant" cask "iterm2" cask "mullvad-vpn" cask "neovide-app" diff --git a/install.sh b/install.sh index cec3281..8a08e51 100755 --- a/install.sh +++ b/install.sh @@ -26,6 +26,11 @@ main() { stow tmux stow ghostty echo "Successfully linked all dotfiles." + + echo "Initializing TPM (Tmux Plugin Manager)..." + setup_tpm + + echo "Setup complete!" } # Prompt the user for confirmation on an action. @@ -63,4 +68,34 @@ install_homebrew() { fi } +setup_tpm() { + local tpm_dir="$HOME/.config/tpm/plugins/tpm" + if [[ ! -d "$tpm_dir" ]]; then + echo "Cloning TPM..." + git clone https://github.com/tmux-plugins/tpm "$tpm_dir" + else + echo "TPM already exists, updating..." + (cd "$tpm_dir" && git pull) + fi + + if command -v tmux >/dev/null 2>&1; then + echo "Installing tmux plugins..." + # Start a tmux server in the background and install plugins + tmux start-server + tmux new-session -d -s tpm_install + tmux send-keys -t tpm_install "$tpm_dir/scripts/install_plugins.sh" Enter + + # Wait a moment for plugins to install + sleep 3 + + # Kill the temporary session + tmux kill-session -t tpm_install 2>/dev/null || true + + echo "TPM plugins installed successfully." + else + echo "Warning: tmux not found. TPM cloned but plugins not installed." + echo "Run 'tmux' and then press 'prefix + I' to install plugins manually." + fi +} + main diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index a6af74e..3a44b7e 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -4,29 +4,29 @@ "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, "blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" }, "blink.cmp": { "branch": "main", "commit": "9bcb14b43852a6f2bfd5ac9ef29cb5cf09b1b39b" }, - "conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" }, + "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" }, "copilot.lua": { "branch": "master", "commit": "46f4b7d026cba9497159dcd3e6aa61a185cb1c48" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, - "gitsigns.nvim": { "branch": "main", "commit": "1b0350ab707713b2bc6c236151f1a324175347b1" }, + "gitsigns.nvim": { "branch": "main", "commit": "362fe61f9f19e9bceff178792780df5cce118a7d" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "c4c84f4521d62de595c0d0f718a9a40c1890c8ce" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "c2465eb07db648026eee81005a659abe26e6d077" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, - "mini.nvim": { "branch": "main", "commit": "8ca3965e68edfee5f438d4063f5adf5afa255884" }, - "neo-tree.nvim": { "branch": "main", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" }, + "mini.nvim": { "branch": "main", "commit": "48f48e4b3f317e9da34ee7a01958b4c5018e2d34" }, + "neo-tree.nvim": { "branch": "main", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-autopairs": { "branch": "master", "commit": "2647cce4cb64fb35c212146663384e05ae126bdf" }, + "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-dap": { "branch": "master", "commit": "14fe46ae16eb272629144a93f7738f5279665a4f" }, + "nvim-dap": { "branch": "master", "commit": "1c75a797b4017fec6491f509cf196c8c8833f26f" }, "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, "nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" }, "nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" }, - "nvim-lint": { "branch": "master", "commit": "2b0039b8be9583704591a13129c600891ac2c596" }, - "nvim-lspconfig": { "branch": "master", "commit": "6bba673aa8993eceec233be17b42ddfb9540794b" }, + "nvim-lint": { "branch": "master", "commit": "3c5e34c24834a67b1cb37600ab7663eefd2b0390" }, + "nvim-lspconfig": { "branch": "master", "commit": "bb3fb99cf14daa33014331ac6eb4b5de9180f775" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "19d6211c78169e78bab372b585b6fb17ad974e82" }, @@ -36,7 +36,6 @@ "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, - "toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" }, "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, "vim-tmux-navigator": { "branch": "master", "commit": "412c474e97468e7934b9c217064025ea7a69e05e" }, -- cgit v1.2.3 From e8012429b76339613bf2b85664cc25c23bed7c2f Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 5 Jul 2025 17:26:20 -0400 Subject: Update readme --- README.md | 36 ++++++++++++++++++++++++++++++------ screenshots/overview.png | Bin 0 -> 1971364 bytes 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 screenshots/overview.png diff --git a/README.md b/README.md index 852131f..f1976c3 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,28 @@ # Dotfiles -These are my personal dotfiles for macOS systems. +Configuration files and scripts for my macOS development environment. -All configuration files are managed using [GNU Stow](https://www.gnu.org/software/stow/), which automatically creates symlinks from this repository to the appropriate locations in your `$HOME` directory. The repository also includes scripts for managing and syncing your Homebrew packages via a Brewfile. +![Screenshot of Development Environment](./screenshots/overview.png) + +## What's Included + +- Terminal: GhostTY +- Shell: Zsh +- Editor: Neovim +- Multiplexer: Tmux with TPM for plugin management +- Git & GPG configurations +- Custom scripts, such as `gh-clone-all`, which makes it easy to clone GitHub + repositories and keep them up to date in bulk. + +## Structure + +The repository uses [GNU Stow](https://www.gnu.org/software/stow/) to manage +symlinks between these configuration files and the user's home directory. +Homebrew packages are tracked via a Brewfile. ## Installation -Clone the repository (recommended: `~/.dotfiles`) and run the installation script: +Clone the repository and run the installation script: ```sh git clone git@github.com:eugenetriguba/dotfiles.git ~/.dotfiles @@ -15,14 +31,22 @@ chmod u+x install.sh ./install.sh ``` -## Homebrew Packages +💡 Note: The repository is intended to be cloned into a top-level directory in +the `$HOME` directory because GNU Stow defaults to using the parent directory +for it's symlinking. If cloned elsewhere, the `stow` commands in `install.sh` +would need to be updated. + +## Homebrew Management -To update your `homebrew/Brewfile` with your currently installed Homebrew formulae and casks, run: +To update your `homebrew/Brewfile` with your currently installed Homebrew +formulae and casks, run: ```sh chmod u+x homebrew/sync-brewfile.sh ./homebrew/sync-brewfile.sh ``` -This script only updates the `homebrew/Brewfile` with your current manually installed Homebrew packages; it does not install or remove any packages. You can then use `git diff` to review the changes. +This script only updates the `homebrew/Brewfile` with your current manually +installed Homebrew packages. It does not install or remove any packages. +You can then use `git diff` to review the changes. diff --git a/screenshots/overview.png b/screenshots/overview.png new file mode 100644 index 0000000..bb3ddfa Binary files /dev/null and b/screenshots/overview.png differ -- cgit v1.2.3 From 30fbef8991c73783aa2fb19bd8caab6097494493 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 6 Jul 2025 11:26:56 -0400 Subject: adjust comments --- executables/bin/tmux-toggle-term | 2 ++ tmux/.config/tmux/key-remappings.tmux | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/executables/bin/tmux-toggle-term b/executables/bin/tmux-toggle-term index 7012392..6d6cbd7 100755 --- a/executables/bin/tmux-toggle-term +++ b/executables/bin/tmux-toggle-term @@ -1,9 +1,11 @@ #!/usr/bin/env bash set -uo pipefail + FLOAT_TERM="${1:-}" LIST_PANES="$(tmux list-panes -F '#F')" PANE_ZOOMED="$(echo "${LIST_PANES}" | grep Z)" PANE_COUNT="$(echo "${LIST_PANES}" | wc -l | bc)" + if [ -n "${FLOAT_TERM}" ]; then if [ "$(tmux display-message -p -F "#{session_name}")" = "popup" ]; then tmux detach-client diff --git a/tmux/.config/tmux/key-remappings.tmux b/tmux/.config/tmux/key-remappings.tmux index 65318d7..d0a32cc 100644 --- a/tmux/.config/tmux/key-remappings.tmux +++ b/tmux/.config/tmux/key-remappings.tmux @@ -5,7 +5,7 @@ unbind C-b set-option -g prefix C-a bind-key C-a send-prefix -# Remap pane splits. +# Remap pane splits to something more sane than the default. # # Split panes using | for horizontal splits and - for vertical splits bind-key | split-window -h @@ -13,9 +13,11 @@ bind-key - split-window -v unbind '"' unbind % +# Easier configuration reloading and pane killing bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded!" bind-key x kill-pane +# Add key bindings for toggling terminal windows bind-key -n 'C-t' run-shell -b "${HOME}/bin/tmux-toggle-term" bind-key -n 'C-f' run-shell -b "${HOME}/bin/tmux-toggle-term float" -- cgit v1.2.3 From 415258a6e2abab8d3a68d696de3dcbfaaa059522 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 6 Jul 2025 14:46:47 -0400 Subject: Add oil --- nvim/.config/nvim/lazy-lock.json | 6 ++--- nvim/.config/nvim/lua/plugins/neo-tree.lua | 40 ------------------------------ nvim/.config/nvim/lua/plugins/oil.lua | 9 +++++++ zsh/.zshrc | 1 - 4 files changed, 12 insertions(+), 44 deletions(-) delete mode 100644 nvim/.config/nvim/lua/plugins/neo-tree.lua create mode 100644 nvim/.config/nvim/lua/plugins/oil.lua diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 3a44b7e..357ce1c 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -16,9 +16,8 @@ "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, + "mini.icons": { "branch": "main", "commit": "94848dad1589a199f876539bd79befb0c5e3abf0" }, "mini.nvim": { "branch": "main", "commit": "48f48e4b3f317e9da34ee7a01958b4c5018e2d34" }, - "neo-tree.nvim": { "branch": "main", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" }, - "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-dap": { "branch": "master", "commit": "1c75a797b4017fec6491f509cf196c8c8833f26f" }, @@ -26,11 +25,12 @@ "nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" }, "nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" }, "nvim-lint": { "branch": "master", "commit": "3c5e34c24834a67b1cb37600ab7663eefd2b0390" }, - "nvim-lspconfig": { "branch": "master", "commit": "bb3fb99cf14daa33014331ac6eb4b5de9180f775" }, + "nvim-lspconfig": { "branch": "master", "commit": "7fac9025a967a4d0846660f751cd392fac6bb788" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "19d6211c78169e78bab372b585b6fb17ad974e82" }, "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, + "oil.nvim": { "branch": "master", "commit": "bbad9a76b2617ce1221d49619e4e4b659b3c61fc" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, diff --git a/nvim/.config/nvim/lua/plugins/neo-tree.lua b/nvim/.config/nvim/lua/plugins/neo-tree.lua deleted file mode 100644 index fa2b5db..0000000 --- a/nvim/.config/nvim/lua/plugins/neo-tree.lua +++ /dev/null @@ -1,40 +0,0 @@ --- Neo-tree is a Neovim plugin to browse the file system --- https://github.com/nvim-neo-tree/neo-tree.nvim - -return { - 'nvim-neo-tree/neo-tree.nvim', - version = '*', - lazy = false, - dependencies = { - 'nvim-lua/plenary.nvim', - 'nvim-tree/nvim-web-devicons', - 'MunifTanjim/nui.nvim', - }, - cmd = 'Neotree', - keys = { - { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, - }, - opts = { - filesystem = { - window = { - mappings = { - ['\\'] = 'close_window', - }, - }, - }, - filtered_items = { - visible = true, - hide_dotfiles = false, - hide_gitignored = true, - hide_by_name = { - '.DS_Store', - 'thumbs.db', - '.git', - }, - always_show_by_pattern = { - '.env*', - '.gitignore', - }, - }, - }, -} diff --git a/nvim/.config/nvim/lua/plugins/oil.lua b/nvim/.config/nvim/lua/plugins/oil.lua new file mode 100644 index 0000000..65bd104 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/oil.lua @@ -0,0 +1,9 @@ +return { + 'stevearc/oil.nvim', + ---@module 'oil' + ---@type oil.SetupOpts + opts = {}, + dependencies = { { 'echasnovski/mini.icons', opts = {} } }, + -- dependencies = { "nvim-tree/nvim-web-devicons" }, + lazy = false, +} diff --git a/zsh/.zshrc b/zsh/.zshrc index 2eca5df..25c530a 100755 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -9,4 +9,3 @@ source ~/.zsh/env.sh source ~/.zsh/path.sh source ~/.zsh/languages.sh source ~/.zsh/aliases.sh - -- cgit v1.2.3 From 191f38d626ee4e59c818edbdc54efdd832e07d33 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 6 Jul 2025 15:59:55 -0400 Subject: Add oil hotkey --- nvim/.config/nvim/lua/plugins/oil.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/oil.lua b/nvim/.config/nvim/lua/plugins/oil.lua index 65bd104..37d6d80 100644 --- a/nvim/.config/nvim/lua/plugins/oil.lua +++ b/nvim/.config/nvim/lua/plugins/oil.lua @@ -4,6 +4,9 @@ return { ---@type oil.SetupOpts opts = {}, dependencies = { { 'echasnovski/mini.icons', opts = {} } }, - -- dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function(_, opts) + vim.keymap.set('n', '-', 'Oil', { desc = 'Open parent directory' }) + require('oil').setup(opts) + end, lazy = false, } -- cgit v1.2.3 From c25d81ecce36f47cef43da0043b82a3853eee708 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Mon, 7 Jul 2025 07:10:32 -0400 Subject: Add hotkey for oil --- nvim/.config/nvim/lua/plugins/oil.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/nvim/.config/nvim/lua/plugins/oil.lua b/nvim/.config/nvim/lua/plugins/oil.lua index 37d6d80..f200559 100644 --- a/nvim/.config/nvim/lua/plugins/oil.lua +++ b/nvim/.config/nvim/lua/plugins/oil.lua @@ -5,6 +5,7 @@ return { opts = {}, dependencies = { { 'echasnovski/mini.icons', opts = {} } }, config = function(_, opts) + vim.keymap.set('n', '\\', 'Oil --float', { desc = 'Open parent directory in floating window' }) vim.keymap.set('n', '-', 'Oil', { desc = 'Open parent directory' }) require('oil').setup(opts) end, -- cgit v1.2.3 From b91d866ddce92f106f9557016287c5dbc537e9a1 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Mon, 7 Jul 2025 07:16:18 -0400 Subject: adjust hotkey --- tmux/.config/tmux/key-remappings.tmux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmux/.config/tmux/key-remappings.tmux b/tmux/.config/tmux/key-remappings.tmux index d0a32cc..d7dfa8d 100644 --- a/tmux/.config/tmux/key-remappings.tmux +++ b/tmux/.config/tmux/key-remappings.tmux @@ -18,6 +18,6 @@ bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloa bind-key x kill-pane # Add key bindings for toggling terminal windows -bind-key -n 'C-t' run-shell -b "${HOME}/bin/tmux-toggle-term" +bind-key -n 'C-\\' run-shell -b "${HOME}/bin/tmux-toggle-term" bind-key -n 'C-f' run-shell -b "${HOME}/bin/tmux-toggle-term float" -- cgit v1.2.3