delegate tmux scratchpad to external plugin
This commit is contained in:
parent
9a5c5ff0bc
commit
ac3884e493
1 changed files with 75 additions and 14 deletions
|
|
@ -46,12 +46,6 @@ bind s split-window -h -c "#{pane_current_path}"
|
||||||
bind v split-window -v -c "#{pane_current_path}"
|
bind v split-window -v -c "#{pane_current_path}"
|
||||||
bind D kill-pane
|
bind D kill-pane
|
||||||
|
|
||||||
bind-key C-Space if-shell -F '#{==:#{session_name},scratch}' {
|
|
||||||
detach-client
|
|
||||||
} {
|
|
||||||
display-popup -w '80%' -h '80%' -d "#{pane_current_path}" -E "tmux new-session -A -s scratch"
|
|
||||||
}
|
|
||||||
|
|
||||||
bind -r m resize-pane -Z # maximize pane
|
bind -r m resize-pane -Z # maximize pane
|
||||||
|
|
||||||
bind-key M choose-window -Nwf"##{==:##{session_name},#{session_name}}" "join-pane -h -t '%%'" # Send pane to window
|
bind-key M choose-window -Nwf"##{==:##{session_name},#{session_name}}" "join-pane -h -t '%%'" # Send pane to window
|
||||||
|
|
@ -71,7 +65,9 @@ bind l next-window
|
||||||
|
|
||||||
# set -g status-right '#(bartib current | sed -n 3p | awk \'{print $NF}\')'
|
# set -g status-right '#(bartib current | sed -n 3p | awk \'{print $NF}\')'
|
||||||
|
|
||||||
## Plugins
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
|
# │ Plugins │
|
||||||
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
## Auto install plugins
|
## Auto install plugins
|
||||||
if "test ! -d ~/.config/tmux/plugins/tpm" \
|
if "test ! -d ~/.config/tmux/plugins/tpm" \
|
||||||
|
|
@ -80,18 +76,31 @@ if "test ! -d ~/.config/tmux/plugins/tpm" \
|
||||||
run -b '~/.config/tmux/plugins/tpm/tpm'
|
run -b '~/.config/tmux/plugins/tpm/tpm'
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
|
||||||
set -g @plugin 'catppuccin/tmux'
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
# set -g @plugin 'rwxd/catppuccin-tmux'
|
# │ Utils │
|
||||||
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-copycat'`
|
set -g @plugin 'tmux-plugins/tmux-copycat'`
|
||||||
set -g @plugin 'laktak/extrakto'
|
set -g @plugin 'laktak/extrakto'
|
||||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||||
set -g @plugin 'sainnhe/tmux-fzf'
|
|
||||||
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
|
# │ Session Management │
|
||||||
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
|
|
||||||
|
set -g @continuum-restore 'on'
|
||||||
|
set -g @resurrect-processes 'vi vim nvim man "~pnpm dev->pnpm dev *"'
|
||||||
|
|
||||||
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
|
# │ Theme │
|
||||||
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
|
set -g @plugin 'catppuccin/tmux'
|
||||||
|
# set -g @plugin 'rwxd/catppuccin-tmux'
|
||||||
|
|
||||||
## Plugin Config
|
|
||||||
set -g @catppuccin_flavour 'macchiato'
|
set -g @catppuccin_flavour 'macchiato'
|
||||||
set -g @catppuccin_window_tabs_enabled off # or off to disable window_tabs
|
set -g @catppuccin_window_tabs_enabled off # or off to disable window_tabs
|
||||||
set -g @catppuccin_status_modules_right "session"
|
set -g @catppuccin_status_modules_right "session"
|
||||||
|
|
@ -102,13 +111,65 @@ set -g @catppuccin_status_fill "icon"
|
||||||
set -g @catppuccin_status_connect_separator "no"
|
set -g @catppuccin_status_connect_separator "no"
|
||||||
set -g @catppuccin_window_default_text "#{?window_zoomed_flag, ,}#W"
|
set -g @catppuccin_window_default_text "#{?window_zoomed_flag, ,}#W"
|
||||||
set -g @catppuccin_window_current_text "#{?window_zoomed_flag, ,}#W"
|
set -g @catppuccin_window_current_text "#{?window_zoomed_flag, ,}#W"
|
||||||
set -g @continuum-restore 'on'
|
|
||||||
set -g @resurrect-processes 'vi vim nvim man "~pnpm dev->pnpm dev *"'
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
|
# │ Scratch FLating Pane │
|
||||||
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
|
set -g @plugin 'omerxx/tmux-floax'
|
||||||
|
|
||||||
|
# Setting the main key to toggle the floating pane on and off
|
||||||
|
set -g @floax-bind 'C-Space'
|
||||||
|
|
||||||
|
# When the pane is toggled, using this bind pops a menu with additional options
|
||||||
|
# such as resize, fullscreen, resetting to defaults and more.
|
||||||
|
set -g @floax-bind-menu 'p'
|
||||||
|
|
||||||
|
# The default width and height of the floating pane
|
||||||
|
set -g @floax-width '80%'
|
||||||
|
set -g @floax-height '80%'
|
||||||
|
|
||||||
|
# The border color can be changed, these are the colors supported by Tmux:
|
||||||
|
# black, red, green, yellow, blue, magenta, cyan, white
|
||||||
|
set -g @floax-border-color 'cyan'
|
||||||
|
|
||||||
|
# The text color can also be changed, by default it's blue
|
||||||
|
# to distinguish from the main window
|
||||||
|
# Optional colors are as shown above in @floax-border-color
|
||||||
|
set -g @floax-text-color 'blue'
|
||||||
|
|
||||||
|
# By default when floax sees a change in session path
|
||||||
|
# it'll change the floating pane's path
|
||||||
|
# You can disable this by setting it to false
|
||||||
|
# You could also "cd -" when the pane is toggled to go back
|
||||||
|
set -g @floax-change-path 'true'
|
||||||
|
|
||||||
|
# The default session name of the floating pane is 'scratch'
|
||||||
|
# You can modify the session name with this option:
|
||||||
|
set -g @floax-session-name 'scratch'
|
||||||
|
|
||||||
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
|
# │ Tmux toggle Popup │
|
||||||
|
# │ https://github.com/loichyan/tmux-toggle-popup │
|
||||||
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
|
set -g @plugin "loichyan/tmux-toggle-popup"
|
||||||
|
|
||||||
|
# customize how popups are shared across sessions, windows, and panes
|
||||||
|
set -g @popup-id-format '#{b:socket_path}/#{session_name}/#{b:pane_current_path}/#{@popup_name}'
|
||||||
|
|
||||||
|
# Use this to open specific programs in floating panes
|
||||||
|
bind C-o run "#{@popup-toggle} -Ed'#{pane_current_path}' -w90% -h90% --name=lazygit lazygit"
|
||||||
|
|
||||||
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
|
# │ FZF │
|
||||||
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
|
set -g @plugin 'sainnhe/tmux-fzf'
|
||||||
|
|
||||||
TMUX_FZF_LAUNCH_KEY="w"
|
TMUX_FZF_LAUNCH_KEY="w"
|
||||||
TMUX_FZF_OPTIONS="-p -w 80% -h 60% -m"
|
TMUX_FZF_OPTIONS="-p -w 80% -h 60% -m"
|
||||||
|
|
||||||
|
|
||||||
# Tmux Management
|
# Tmux Management
|
||||||
bind-key "f" run-shell "~/.local/share/chezmoi/scripts/fzf-tmux-sessions"
|
bind-key "f" run-shell "~/.local/share/chezmoi/scripts/fzf-tmux-sessions"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue