This commit is contained in:
Andrew Haynes
2026-03-10 12:09:51 -04:00
parent 6fcba0c4ab
commit 89bc50163e
4 changed files with 69 additions and 17 deletions
+7 -3
View File
@@ -20,7 +20,7 @@ require("lazy").setup({
{ "ibhagwan/fzf-lua", dependencies = { "nvim-tree/nvim-web-devicons" } }, { "ibhagwan/fzf-lua", dependencies = { "nvim-tree/nvim-web-devicons" } },
{ "saghen/blink.cmp", version = "v1.*", opts = {} }, { "saghen/blink.cmp", version = "v1.*", opts = {} },
{ {
dir = "/home/andrew/personal/Projects/Lua/polydev/", dir = "/Users/andrew/personal/Projects/Lua/polydev/",
opts = { opts = {
terminal = { terminal = {
mode = "split", mode = "split",
@@ -92,8 +92,10 @@ vim.g.netrw_winsize = 25
vim.opt.wrapscan = true -- begin search from top of the file when nothng is found vim.opt.wrapscan = true -- begin search from top of the file when nothng is found
vim.opt.cursorline = true -- enable cursorline vim.opt.cursorline = true -- enable cursorline
vim.opt.cursorlineopt = { "screenline", "number" } -- cursorline look vim.opt.cursorlineopt = { "screenline", "number" } -- cursorline look
vim.opt.shortmess = vim.opt.foldmethod = "indent"
'aF' -- abbreviates messages and prevents file name being echoed when opened vim.opt.foldcolumn = "1"
vim.opt.foldenable = false
vim.opt.shortmess = 'aF' -- abbreviates messages and prevents file name being echoed when opened
vim.opt.ignorecase = true -- ignore cases when searching vim.opt.ignorecase = true -- ignore cases when searching
vim.opt.smartcase = true -- However if we use a capital in search string we then consider case-sensitivity, ignorecase is disabled vim.opt.smartcase = true -- However if we use a capital in search string we then consider case-sensitivity, ignorecase is disabled
vim.opt.smartindent = true -- smarter indentation vim.opt.smartindent = true -- smarter indentation
@@ -126,3 +128,5 @@ vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references)
vim.keymap.set("n", "<leader>gR", vim.lsp.buf.rename) vim.keymap.set("n", "<leader>gR", vim.lsp.buf.rename)
vim.keymap.set("n", "<leader>gc", vim.lsp.buf.code_action) vim.keymap.set("n", "<leader>gc", vim.lsp.buf.code_action)
vim.keymap.set("n", "<leader>uu", ":UndotreeToggle<CR>") vim.keymap.set("n", "<leader>uu", ":UndotreeToggle<CR>")
vim.keymap.set("n", "<leader>[", "<c-w>H", { silent = true, noremap = true, })
vim.keymap.set("n", "<leader>]", "<c-w>K", { silent = true, noremap = true, })
+21 -8
View File
@@ -1,17 +1,28 @@
unbind C-x # unbind C-x
set -g prefix M-, unbind M-,
bind M-, send-prefix set -g prefix C-Space
bind C-Space send-prefix
set -g focus-events on set -g focus-events on
# set -g default-terminal "screen-256color" # set -g default-terminal "screen-256color"
set -ga terminal-features ',xterm-ghostty:RGB' # set -ga terminal-features ',xterm-ghostty:RGB'
set-option -g default-shell $SHELL # macOS specific (Ghostty)
if-shell '[[ $(uname) == "Darwin" ]]' {
set -ga terminal-features ',xterm-ghostty:RGB'
set -as terminal-overrides ',xterm-ghostty:Tc'
}
set -g status-style 'fg=#ff757f bg=default' # Linux specific (Foot)
if-shell '[[ $(uname) == "Linux" ]]' {
set -ga terminal-features ',foot:RGB'
set -as terminal-overrides ',foot:Tc'
}
set-option -g default-shell $SHELL
set -g status-style 'fg=#c3e88d bg=#1b1d2b'
set -g status-left-length 100 set -g status-left-length 100
set -g status-right-length 20 set -g status-right-length 20
set -g status-left "#[fg=#828bb8, bold] #S #[fg=#828bb8,nobold]- " set -g status-left "#[fg=#ffc777, bold] [#S] #[fg=#ffc777,nobold]~ "
set -g status-right "#[fg=#ff757f] %m-%d-%Y #[fg=#828bb8] %H:%M" set -g status-right "#[fg=#c3e88d] %m-%d-%Y #[fg=#ffc777] %H:%M "
set -g base-index 1 set -g base-index 1
set -g pane-base-index 1 set -g pane-base-index 1
@@ -21,6 +32,8 @@ set -g set-clipboard on
set -s escape-time 0 set -s escape-time 0
set -g status-position top set -g status-position top
bind-key h previous-window
bind-key l next-window
bind -r f run-shell "tmux neww ~/.local/bin/tmux-windowizer" bind -r f run-shell "tmux neww ~/.local/bin/tmux-windowizer"
bind -r v run-shell "tmux neww ~/.local/bin/tmux-sessionizer" bind -r v run-shell "tmux neww ~/.local/bin/tmux-sessionizer"
bind-key z resize-pane -Z bind-key z resize-pane -Z
+36 -2
View File
@@ -1,8 +1,41 @@
#!/usr/bin/env bash #!/usr/bin/env bash
selected="${1:-$(find ~ ~/personal ~/personal/Projects ~/.config -mindepth 1 -maxdepth 2 -type d 2>/dev/null | sort -u | fzf)}"
[[ -z $selected ]] && exit 0
# 1. Get active tmux sessions
sessions=$(tmux list-sessions -F "#S" 2>/dev/null)
# 2. Get directories (Optimized find)
# Adjust -maxdepth to 3 or 4 if you want deeper subfolders
# dirs=$(fd . ~ ~/personal ~/personal/Projects ~/.config --min-depth 1 --max-depth 3 --type d)
dirs=$(find ~ ~/personal ~/personal/Projects ~/.config \
-mindepth 1 -maxdepth 2 \
\( -name ".git" -o -name "node_modules" -o -name ".cache" -o -name "Library" \) -prune \
-o -type d -print 2>/dev/null)
# 3. Combine them and pipe to fzf
# We use printf to ensure they appear as a clean list
selected=$(printf "$sessions\n$dirs" | fzf \
--layout=reverse \
--border=rounded \
--margin=1 \
--padding=1 \
--height=100% \
--prompt="󱇗 " \
--color="bg+:#292e42,bg:#1b1d2b,spinner:#bb9af7,hl:#7aa2f7" \
--color="fg:#c0caf5,header:#7dcfff,info:#bb9af7,pointer:#7dcfff" \
--color="marker:#9ece6a,fg+:#c0caf5,prompt:#bb9af7,hl+:#7aa2f7" \
--preview '[[ -d {} ]] && ls -p --color=always {} | head -10 || tmux list-windows -t {} 2>/dev/null' \
--preview-window="top:35%:border-bottom")
# selected=$(printf "$sessions\n$dirs" | fzf \
# --height=100% --layout=reverse --border \
# --prompt="󱇗 Switch to: " --pointer="󰁔" \
# --color="bg+:#292e42,bg:#1b1d2b,spinner:#bb9af7,hl:#7aa2f7" \
# --color="fg:#c0caf5,header:#7dcfff,info:#bb9af7,pointer:#7dcfff" \
# --color="marker:#9ece6a,fg+:#c0caf5,prompt:#bb9af7,hl+:#7aa2f7" \
# --preview '[[ -d {} ]] && ls -p --color=always {} || tmux list-windows -t {} 2>/dev/null' \
# --preview-window=right:60%)
#
session_name=$(basename "$selected" | tr . _) session_name=$(basename "$selected" | tr . _)
if ! tmux has-session -t "$session_name" 2>/dev/null; then if ! tmux has-session -t "$session_name" 2>/dev/null; then
@@ -14,3 +47,4 @@ if [[ -z $TMUX ]]; then
else else
tmux switch-client -t "$session_name" tmux switch-client -t "$session_name"
fi fi
+1
View File
@@ -30,6 +30,7 @@ autoload -Uz _zinit
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH"
alias ls="ls -a --color" alias ls="ls -a --color"
alias vim="nvim"
# alias grep="rg" # alias grep="rg"
# #
if [[ $(uname) != "Darwin" ]]; then if [[ $(uname) != "Darwin" ]]; then