better tmux support
This commit is contained in:
@@ -76,6 +76,8 @@ sigil unlink ~/.config/wezterm/wezterm.lua
|
|||||||
|
|
||||||
When editing dotfiles, it is preferred to add/edit the files in this project directly, instead of going to the source. this way we can then use sigil apply --prune, and everything will be synced, even when there are new files.
|
When editing dotfiles, it is preferred to add/edit the files in this project directly, instead of going to the source. this way we can then use sigil apply --prune, and everything will be synced, even when there are new files.
|
||||||
|
|
||||||
|
**Important:** Whenever you add new files to the repo (e.g., create new scripts or configs), you must run `sigil apply` afterwards to create the symlinks. New files in `files/` directories are not automatically linked until `sigil apply` is run.
|
||||||
|
|
||||||
## IMPORTANT: Update AGENTS.md files when Sigil changes
|
## IMPORTANT: Update AGENTS.md files when Sigil changes
|
||||||
|
|
||||||
Whenever Sigil is modified (new features, behavior changes, new commands), you MUST update the AGENTS.md documentation in BOTH locations:
|
Whenever Sigil is modified (new features, behavior changes, new commands), you MUST update the AGENTS.md documentation in BOTH locations:
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ output_path = '~/.config/rofi/colors/matugen.rasi'
|
|||||||
input_path = '~/.config/matugen/templates/niri-colors.kdl'
|
input_path = '~/.config/matugen/templates/niri-colors.kdl'
|
||||||
output_path = '~/.config/niri/colors.kdl'
|
output_path = '~/.config/niri/colors.kdl'
|
||||||
|
|
||||||
|
[templates.tmux]
|
||||||
|
input_path = '~/.config/matugen/templates/tmux-colors.conf'
|
||||||
|
output_path = '~/.config/tmux/colors.conf'
|
||||||
|
post_hook = 'tmux source-file ~/.config/tmux/tmux.conf 2>/dev/null || true && nohup ~/.config/matugen/scripts/sync-tmux-mac.sh >/dev/null 2>&1 &'
|
||||||
|
|
||||||
[templates.zellij]
|
[templates.zellij]
|
||||||
input_path = '~/.config/matugen/templates/zellij-colors.kdl'
|
input_path = '~/.config/matugen/templates/zellij-colors.kdl'
|
||||||
output_path = '~/.config/zellij/themes/matugen.kdl'
|
output_path = '~/.config/zellij/themes/matugen.kdl'
|
||||||
|
|||||||
Executable
+13
@@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
log_file="$HOME/.cache/matugen-sync-tmux.log"
|
||||||
|
|
||||||
|
mkdir -p "$HOME/.cache"
|
||||||
|
|
||||||
|
{
|
||||||
|
ssh mac-attio "mkdir -p ~/.config/tmux"
|
||||||
|
scp "$HOME/.config/tmux/colors.conf" \
|
||||||
|
mac-attio:~/.config/tmux/
|
||||||
|
ssh mac-attio "tmux source-file ~/.config/tmux/tmux.conf 2>/dev/null || true"
|
||||||
|
} >>"$log_file" 2>&1
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
# Tmux theme colors (generated by matugen)
|
||||||
|
# Do not edit manually - run `matugen` to regenerate
|
||||||
|
|
||||||
|
# =============================================
|
||||||
|
# Theme Colors
|
||||||
|
# =============================================
|
||||||
|
|
||||||
|
# Primary colors
|
||||||
|
PRIMARY={{colors.primary.default.hex}}
|
||||||
|
ON_PRIMARY={{colors.on_primary.default.hex}}
|
||||||
|
PRIMARY_CONTAINER={{colors.primary_container.default.hex}}
|
||||||
|
ON_PRIMARY_CONTAINER={{colors.on_primary_container.default.hex}}
|
||||||
|
|
||||||
|
# Secondary colors
|
||||||
|
SECONDARY={{colors.secondary.default.hex}}
|
||||||
|
ON_SECONDARY={{colors.on_secondary.default.hex}}
|
||||||
|
SECONDARY_CONTAINER={{colors.secondary_container.default.hex}}
|
||||||
|
ON_SECONDARY_CONTAINER={{colors.on_secondary_container.default.hex}}
|
||||||
|
|
||||||
|
# Tertiary colors
|
||||||
|
TERTIARY={{colors.tertiary.default.hex}}
|
||||||
|
ON_TERTIARY={{colors.on_tertiary.default.hex}}
|
||||||
|
TERTIARY_CONTAINER={{colors.tertiary_container.default.hex}}
|
||||||
|
ON_TERTIARY_CONTAINER={{colors.on_tertiary_container.default.hex}}
|
||||||
|
|
||||||
|
# Surface colors
|
||||||
|
SURFACE={{colors.surface.default.hex}}
|
||||||
|
SURFACE_DIM={{colors.surface_dim.default.hex}}
|
||||||
|
SURFACE_BRIGHT={{colors.surface_bright.default.hex}}
|
||||||
|
SURFACE_CONTAINER={{colors.surface_container.default.hex}}
|
||||||
|
SURFACE_CONTAINER_LOW={{colors.surface_container_low.default.hex}}
|
||||||
|
SURFACE_CONTAINER_HIGH={{colors.surface_container_high.default.hex}}
|
||||||
|
SURFACE_VARIANT={{colors.surface_variant.default.hex}}
|
||||||
|
|
||||||
|
# Text colors
|
||||||
|
ON_SURFACE={{colors.on_surface.default.hex}}
|
||||||
|
ON_SURFACE_VARIANT={{colors.on_surface_variant.default.hex}}
|
||||||
|
|
||||||
|
# Utility colors
|
||||||
|
OUTLINE={{colors.outline.default.hex}}
|
||||||
|
OUTLINE_VARIANT={{colors.outline_variant.default.hex}}
|
||||||
|
ERROR={{colors.error.default.hex}}
|
||||||
|
ON_ERROR={{colors.on_error.default.hex}}
|
||||||
|
ERROR_CONTAINER={{colors.error_container.default.hex}}
|
||||||
|
ON_ERROR_CONTAINER={{colors.on_error_container.default.hex}}
|
||||||
|
INVERSE_SURFACE={{colors.inverse_surface.default.hex}}
|
||||||
|
INVERSE_ON_SURFACE={{colors.inverse_on_surface.default.hex}}
|
||||||
|
INVERSE_PRIMARY={{colors.inverse_primary.default.hex}}
|
||||||
|
SCRIM={{colors.scrim.default.hex}}
|
||||||
|
SHADOW={{colors.shadow.default.hex}}
|
||||||
|
|
||||||
|
# =============================================
|
||||||
|
# Tmux Styling using theme colors
|
||||||
|
# =============================================
|
||||||
|
|
||||||
|
# Status bar styling
|
||||||
|
set -g status-style "bg={{colors.surface.default.hex}},fg={{colors.on_surface.default.hex}}"
|
||||||
|
set -g status-left "#[fg={{colors.on_primary.default.hex}},bg={{colors.primary.default.hex}},bold] #S #[default] "
|
||||||
|
|
||||||
|
# Smart status-right: changes based on mode
|
||||||
|
set -g status-right "#[fg={{colors.on_surface_variant.default.hex}}]%Y-%m-%d #[fg={{colors.on_surface.default.hex}}]%H:%M #[default]"
|
||||||
|
|
||||||
|
# Window status format
|
||||||
|
set -g window-status-format "#[fg={{colors.on_surface_variant.default.hex}}] #I:#W "
|
||||||
|
set -g window-status-current-format "#[fg={{colors.on_primary_container.default.hex}},bg={{colors.primary_container.default.hex}},bold] #I:#W #[default]"
|
||||||
|
set -g window-status-separator ""
|
||||||
|
set -g status-justify left
|
||||||
|
|
||||||
|
# Pane borders
|
||||||
|
set -g pane-border-style "fg={{colors.outline_variant.default.hex}}"
|
||||||
|
set -g pane-active-border-style "fg={{colors.primary.default.hex}}"
|
||||||
|
|
||||||
|
# Message styling (for confirm dialogs like kill-pane)
|
||||||
|
set -g message-style "fg={{colors.on_primary.default.hex}},bg={{colors.primary_container.default.hex}},bold"
|
||||||
|
set -g message-command-style "fg={{colors.on_secondary.default.hex}},bg={{colors.secondary_container.default.hex}}"
|
||||||
|
|
||||||
|
# Mode styling (copy mode, etc.)
|
||||||
|
set -g mode-style "fg={{colors.on_tertiary.default.hex}},bg={{colors.tertiary_container.default.hex}}"
|
||||||
|
|
||||||
|
# Clock mode
|
||||||
|
set -g clock-mode-color "{{colors.primary.default.hex}}"
|
||||||
|
|
||||||
|
# Selection highlighting
|
||||||
|
set -g copy-mode-match-style "fg={{colors.on_tertiary.default.hex}},bg={{colors.tertiary_container.default.hex}}"
|
||||||
|
set -g copy-mode-current-match-style "fg={{colors.on_primary.default.hex}},bg={{colors.primary_container.default.hex}},bold"
|
||||||
|
|
||||||
|
# Popup styling
|
||||||
|
set -g popup-style "bg={{colors.surface_container.default.hex}},fg={{colors.on_surface.default.hex}}"
|
||||||
|
set -g popup-border-style "fg={{colors.outline.default.hex}}"
|
||||||
|
|
||||||
|
# Menu styling
|
||||||
|
set -g menu-style "bg={{colors.surface_container.default.hex}},fg={{colors.on_surface.default.hex}}"
|
||||||
|
set -g menu-selected-style "bg={{colors.primary_container.default.hex}},fg={{colors.on_primary_container.default.hex}}"
|
||||||
|
set -g menu-border-style "fg={{colors.outline.default.hex}}"
|
||||||
@@ -2,9 +2,10 @@
|
|||||||
"lastChangelogVersion": "0.57.1",
|
"lastChangelogVersion": "0.57.1",
|
||||||
"defaultProvider": "opencode-go",
|
"defaultProvider": "opencode-go",
|
||||||
"defaultModel": "kimi-k2.5",
|
"defaultModel": "kimi-k2.5",
|
||||||
"defaultThinkingLevel": "low",
|
"defaultThinkingLevel": "medium",
|
||||||
"theme": "matugen",
|
"theme": "matugen",
|
||||||
"lsp": {
|
"lsp": {
|
||||||
"hookMode": "edit_write"
|
"hookMode": "edit_write"
|
||||||
}
|
},
|
||||||
|
"hideThinkingBlock": true
|
||||||
}
|
}
|
||||||
+52
-12
@@ -92,11 +92,14 @@ bind -n M-Down select-pane -D
|
|||||||
bind -n M-Up select-pane -U
|
bind -n M-Up select-pane -U
|
||||||
bind -n M-Right select-pane -R
|
bind -n M-Right select-pane -R
|
||||||
|
|
||||||
# Resize panes with prefix + hjkl
|
# Resize panes - Ctrl+R then arrows (no prefix needed)
|
||||||
bind -r H resize-pane -L 5
|
bind -n C-r switch-client -T resize-pane \; display-message -d 5000 "RESIZE MODE: arrows to resize, ESC/Enter to exit"
|
||||||
bind -r J resize-pane -D 5
|
bind -T resize-pane Left resize-pane -L 5 \; switch-client -T resize-pane
|
||||||
bind -r K resize-pane -U 5
|
bind -T resize-pane Right resize-pane -R 5 \; switch-client -T resize-pane
|
||||||
bind -r L resize-pane -R 5
|
bind -T resize-pane Up resize-pane -U 5 \; switch-client -T resize-pane
|
||||||
|
bind -T resize-pane Down resize-pane -D 5 \; switch-client -T resize-pane
|
||||||
|
bind -T resize-pane Escape switch-client -T root
|
||||||
|
bind -T resize-pane Enter switch-client -T root
|
||||||
|
|
||||||
# -----------------------------------------
|
# -----------------------------------------
|
||||||
# Moving Panes (Zellij-like)
|
# Moving Panes (Zellij-like)
|
||||||
@@ -112,6 +115,15 @@ bind j command-prompt -p "join pane from window #:" "join-pane -s '%%'"
|
|||||||
bind > swap-pane -D
|
bind > swap-pane -D
|
||||||
bind < swap-pane -U
|
bind < swap-pane -U
|
||||||
|
|
||||||
|
# Move panes around - Ctrl+E then arrows (no prefix needed, stays in mode)
|
||||||
|
bind -n C-e switch-client -T move-pane \; display-message -d 5000 "MOVE MODE: arrows to move pane, ESC/Enter to exit"
|
||||||
|
bind -T move-pane Left swap-pane -s '{left-of}' \; switch-client -T move-pane
|
||||||
|
bind -T move-pane Right swap-pane -s '{right-of}' \; switch-client -T move-pane
|
||||||
|
bind -T move-pane Up swap-pane -s '{up-of}' \; switch-client -T move-pane
|
||||||
|
bind -T move-pane Down swap-pane -s '{down-of}' \; switch-client -T move-pane
|
||||||
|
bind -T move-pane Escape switch-client -T root
|
||||||
|
bind -T move-pane Enter switch-client -T root
|
||||||
|
|
||||||
# Mark pane + swap with marked pane (advanced)
|
# Mark pane + swap with marked pane (advanced)
|
||||||
bind m select-pane -m # Mark current pane
|
bind m select-pane -m # Mark current pane
|
||||||
bind M swap-pane # Swap with marked pane
|
bind M swap-pane # Swap with marked pane
|
||||||
@@ -133,10 +145,18 @@ bind BSpace previous-layout
|
|||||||
|
|
||||||
# Quick layout shortcuts
|
# Quick layout shortcuts
|
||||||
bind Enter select-layout tiled
|
bind Enter select-layout tiled
|
||||||
bind M-1 select-layout even-horizontal
|
|
||||||
bind M-2 select-layout even-vertical
|
# Easy horizontal/vertical layouts
|
||||||
bind M-3 select-layout main-horizontal
|
bind = select-layout even-horizontal
|
||||||
bind M-4 select-layout main-vertical
|
bind + select-layout even-vertical
|
||||||
|
|
||||||
|
# Toggle between horizontal and vertical
|
||||||
|
bind t run-shell "tmux list-windows -F '#{window_layout}' | head -1 | grep -q 'even-horizontal' && tmux select-layout even-vertical || tmux select-layout even-horizontal"
|
||||||
|
|
||||||
|
# Other layouts - Ctrl+L then h/v (no prefix)
|
||||||
|
bind -n C-l switch-client -T layout \; display-message -d 5000 "LAYOUT MODE: h=horizontal v=vertical ESC/Enter=back"
|
||||||
|
bind -T layout h select-layout main-horizontal \; switch-client -T root
|
||||||
|
bind -T layout v select-layout main-vertical \; switch-client -T root
|
||||||
|
|
||||||
# Note: Pane resize with H/J/K/L is defined in the resize section above
|
# Note: Pane resize with H/J/K/L is defined in the resize section above
|
||||||
|
|
||||||
@@ -181,8 +201,8 @@ bind , command-prompt -I "#W" "rename-window '%%'"
|
|||||||
# Update status bar every second
|
# Update status bar every second
|
||||||
set -g status-interval 1
|
set -g status-interval 1
|
||||||
|
|
||||||
# Position at bottom
|
# Position at top (for dual status bar with tabs on top, cheatsheet on bottom)
|
||||||
set -g status-position bottom
|
# Note: status-position bottom puts tabs at bottom-1, cheatsheet at very bottom
|
||||||
|
|
||||||
# Status bar sizing
|
# Status bar sizing
|
||||||
set -g status-left-length 40
|
set -g status-left-length 40
|
||||||
@@ -192,12 +212,32 @@ set -g status-right-length 100
|
|||||||
# The theme file sets: status-style, status-left, status-right,
|
# The theme file sets: status-style, status-left, status-right,
|
||||||
# window-status-format, window-status-current-format, pane borders, etc.
|
# window-status-format, window-status-current-format, pane borders, etc.
|
||||||
|
|
||||||
|
# -----------------------------------------
|
||||||
|
# Single Status Bar at Bottom
|
||||||
|
# -----------------------------------------
|
||||||
|
set -g status 1
|
||||||
|
set -g status-position bottom
|
||||||
|
set -g status-interval 1
|
||||||
|
set -g status-left-length 40
|
||||||
|
set -g status-right-length 150
|
||||||
|
|
||||||
|
# Help toggle (Ctrl+H) - uses run-shell to toggle help display
|
||||||
|
bind -n C-h run-shell '
|
||||||
|
if [ "$(tmux show -gqv @help_visible)" = "1" ]; then
|
||||||
|
tmux set -g @help_visible 0
|
||||||
|
tmux source ~/.config/tmux/colors.conf
|
||||||
|
else
|
||||||
|
tmux set -g @help_visible 1
|
||||||
|
tmux set -g status-right "#[bg=#014b71,fg=#cbe6ff,bold] ALT=nav ^E=move ^R=resize ^L=layout |/-=split ^S=prefix #[default]"
|
||||||
|
fi
|
||||||
|
'
|
||||||
|
|
||||||
# -----------------------------------------
|
# -----------------------------------------
|
||||||
# Other Useful Bindings
|
# Other Useful Bindings
|
||||||
# -----------------------------------------
|
# -----------------------------------------
|
||||||
|
|
||||||
# Prefix + r to reload config
|
# Prefix + r to reload config
|
||||||
bind r source-file ~/.tmux.conf \; display "Config reloaded!"
|
bind r source-file ~/.config/tmux/tmux.conf \; display "Config reloaded!"
|
||||||
|
|
||||||
# Prefix + x to kill current pane (with confirmation)
|
# Prefix + x to kill current pane (with confirmation)
|
||||||
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
||||||
|
|||||||
Reference in New Issue
Block a user