From d4f05595d2e640bd81389b9cf57e731d79762079 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 28 Aug 2025 21:38:15 -0500 Subject: [PATCH] Minor changes to tmux key bindings and names; minor clean-up --- .../lua/david_standard/plugins_lazy/lsp.lua | 24 ----------------- src_files/.config/tmux/tmux.conf | 26 ++++++++++++------- src_files/.config/zsh/.zshrc | 3 ++- .../{tmux-sessionizer => tmux-session-init} | 2 +- 4 files changed, 19 insertions(+), 36 deletions(-) rename src_files/.local/scripts/{tmux-sessionizer => tmux-session-init} (92%) diff --git a/src_files/.config/nvim/lua/david_standard/plugins_lazy/lsp.lua b/src_files/.config/nvim/lua/david_standard/plugins_lazy/lsp.lua index ccc6515..720d53a 100644 --- a/src_files/.config/nvim/lua/david_standard/plugins_lazy/lsp.lua +++ b/src_files/.config/nvim/lua/david_standard/plugins_lazy/lsp.lua @@ -89,14 +89,6 @@ return { }) -- `/` cmdline setup. - cmp.setup.cmdline('/', { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } - }) - - -- `:` cmdline setup. cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ @@ -107,21 +99,6 @@ return { matching = { disallow_symbol_nonprefix_matching = false } }) - - - - - - - - - - - - - - - vim.diagnostic.config({ -- update_in_insert = true, float = { @@ -133,6 +110,5 @@ return { prefix = "", }, }) - end } diff --git a/src_files/.config/tmux/tmux.conf b/src_files/.config/tmux/tmux.conf index b0cc22d..adec689 100644 --- a/src_files/.config/tmux/tmux.conf +++ b/src_files/.config/tmux/tmux.conf @@ -7,6 +7,11 @@ bind-key C-Space send-prefix set -g status-style 'bg=#111111 fg=#22cc00' set -g base-index 0 +# unbind keys +unbind-key f; unbind-key C-f; unbind-key C-s +unbind-key c; unbind-key n; unbind-key p +unbind-key C-o; unbind-key C-n; unbind-key C-p; unbind-key C-l; unbind-key C-h + # vim-like movement stuff set-window-option -g mode-keys vi bind -T copy-mode-vi v send-keys -X begin-selection @@ -17,22 +22,23 @@ bind -r h select-pane -L bind -r l select-pane -R # reload tmux.conf -bind r source-file "~/.config/tmux/tmux.conf" \; display-message "tmux.conf reloaded" +bind-key r source-file "$XDG_CONFIG_HOME/tmux/tmux.conf" \; display-message "tmux.conf reloaded" # kill the current session # TODO: would it clash with other bindings to change these to C-q and C-w ? +# TODO: combine these into one command; must cover case when only 1 session remains bind-key Q rename-session zzzz-temp-kill\; switch-client -p\; kill-session -t zzzz-temp-kill -# TODO: if i can combine this into the above when only 1 session remains, do so bind-key W kill-session -# find and switching for sessions, include using tmux-sessionizer -unbind-key f; unbind-key C-f; unbind-key C-s -unbind-key C-h; unbind-key C-l; unbind-key C-o; unbind-key C-n; unbind-key C-p -bind-key C-f run-shell "tmux neww $DIR_SCRIPTS/tmux-sessionizer" -bind-key C-s run-shell "tmux neww $DIR_SCRIPTS/tmux-sessionizer existing" -bind-key C-h run-shell "tmux neww $DIR_SCRIPTS/tmux-sessionizer hub" -bind-key C-l switch-client -l -bind-key C-o last-window +# creating new windows +bind-key n new-window + +# find and switching for sessions, include using tmux-session-init +bind-key C-f run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init" +bind-key C-s run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init find-existing" +bind-key C-h run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init hub" +bind-key -r C-l switch-client -l +bind-key -r C-o last-window bind-key -r C-n next-window bind-key -r C-p previous-window diff --git a/src_files/.config/zsh/.zshrc b/src_files/.config/zsh/.zshrc index 9e5b097..cb6ca6f 100644 --- a/src_files/.config/zsh/.zshrc +++ b/src_files/.config/zsh/.zshrc @@ -14,7 +14,7 @@ alias cls='clear;ls' # shortcuts for executables alias nv='nvim' alias n='nvim' -alias tms='tmux-sessionizer' +alias tms='tmux-session-init' # executable name overrides alias ls='ls -F' @@ -27,6 +27,7 @@ alias ppw='ping -c 2 pinewoods.xyz' alias weather='curl wttr.in' alias shrug='echo "¯\\_(ツ)_/¯"' alias journal="cd $DIR_HOME_BOX; $EDITOR .current-journal" +alias ncspotkeys="$EDITOR $DIR_GIT_PROJECTS/other/ncspot/doc/users.md" # source extensions and system-specific files [[ -e "$HOME/.profile" ]] && source "$HOME/.profile" # TODO: do i want to source .profile? diff --git a/src_files/.local/scripts/tmux-sessionizer b/src_files/.local/scripts/tmux-session-init similarity index 92% rename from src_files/.local/scripts/tmux-sessionizer rename to src_files/.local/scripts/tmux-session-init index 446a9cc..7197afb 100755 --- a/src_files/.local/scripts/tmux-sessionizer +++ b/src_files/.local/scripts/tmux-session-init @@ -23,7 +23,7 @@ local target_path='' [[ $# -eq 1 ]] && target_path=$1 || target_path=$(find $search_dirs -mindepth 1 -maxdepth 1 -type d | fzf) -if [[ $target_path = "existing" ]]; then target_name=$(echo $existing_sessions | fzf); +if [[ $target_path = "find-existing" ]]; then target_name=$(echo $existing_sessions | fzf); elif [[ $target_path = "hub" ]]; then target_name="hub" && target_path="$HOME"; elif [[ -n $target_path ]]; then target_name=$(basename "$target_path" | tr . _); fi