Update tmux config
- Add layout managment via tmuxp - Add function to run z and tmuxp - move tmux config from home folder to config folder
This commit is contained in:
parent
6fda168c66
commit
eebd9d4a78
10 changed files with 45 additions and 17 deletions
|
|
@ -67,6 +67,7 @@ return {
|
|||
disable_insert_on_commit = "auto",
|
||||
kind = "replace",
|
||||
disable_line_numbers = false,
|
||||
console_timeout = 8000,
|
||||
-- commit_editor = {
|
||||
-- kind = "tab",
|
||||
-- },
|
||||
|
|
|
|||
0
config/tmux/plugins/.gitkeep
Normal file
0
config/tmux/plugins/.gitkeep
Normal file
|
|
@ -66,7 +66,13 @@ bind l next-window
|
|||
# set -g status-right '#(bartib current | sed -n 3p | awk \'{print $NF}\')'
|
||||
|
||||
## Plugins
|
||||
run -b '~/.tmux/plugins/tpm/tpm'
|
||||
|
||||
## Auto install plugins
|
||||
if "test ! -d ~/.config/tmux/plugins/tpm" \
|
||||
"run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm && ~/.config/tmux/plugins/tpm/bin/install_plugins'"
|
||||
|
||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins/tpm'
|
||||
run -b '~/.config/tmux/plugins/tpm/tpm'
|
||||
|
||||
set -g @plugin 'catppuccin/tmux'
|
||||
# set -g @plugin 'rwxd/catppuccin-tmux'
|
||||
|
|
|
|||
7
config/tmuxp/coding.yml
Normal file
7
config/tmuxp/coding.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
session_name: shorthands
|
||||
windows:
|
||||
- window_name: main
|
||||
layout: main-vertical
|
||||
panes:
|
||||
- shell_command: vi
|
||||
- shell_command: pnpm dev
|
||||
8
config/tmuxp/persona-page.yaml
Normal file
8
config/tmuxp/persona-page.yaml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
session_name: persona-page
|
||||
windows:
|
||||
layout: main-vertical
|
||||
panes:
|
||||
- shell_command:
|
||||
- nvim
|
||||
focus: true
|
||||
- pnpm
|
||||
|
|
@ -27,3 +27,15 @@ tm() {
|
|||
fi
|
||||
session=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | fzf --exit-0 --select-1) && tmux $change -t "$session" || echo "No sessions found."
|
||||
}
|
||||
|
||||
ta() {
|
||||
export START_DIRECTORY="$(z -l 2>&1 | fzf --height 40% --nth 2.. --reverse --inline-info +s --tac --query "${*##-* }" | sed 's/^[0-9,.]* *//')"
|
||||
|
||||
if [[ -z START_DIRECTORY ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export SESSION_NAME="$(basename $START_DIRECTORY)"
|
||||
|
||||
tmuxp load $(fd -e yml . ~/.config/tmuxp | fzf)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue