Integration between Tmux and ZSH
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# === General settings ===
|
# === General settings ===
|
||||||
[main]
|
[main]
|
||||||
shell=/usr/bin/tmux # Default shell to launch in the terminal
|
shell=/bin/zsh # Default shell to launch in the terminal
|
||||||
font=FiraCode Nerd Font:size=14 # Font family and size used in the terminal
|
font=FiraCode Nerd Font:size=14 # Font family and size used in the terminal
|
||||||
initial-window-size-chars=160x45 # Initial size in character columns x rows
|
initial-window-size-chars=160x45 # Initial size in character columns x rows
|
||||||
selection-target=clipboard # Copy selected text directly to system clipboard
|
selection-target=clipboard # Copy selected text directly to system clipboard
|
||||||
|
|||||||
@@ -1,9 +1,14 @@
|
|||||||
# Change command shortcut
|
#=== KEYBINDINGS ====#
|
||||||
unbind C-b
|
unbind C-b
|
||||||
set -g prefix C-x
|
set -g prefix C-x
|
||||||
bind C-x send-prefix
|
bind C-x send-prefix
|
||||||
|
|
||||||
# Renumbered windows and panels
|
# Create new session
|
||||||
|
bind S command-prompt -p "New Session:" "new-session -A -s '%%'"
|
||||||
|
bind K confirm kill-session
|
||||||
|
set-option -g detach-on-destroy off
|
||||||
|
|
||||||
|
#=== LAYOUT ===#
|
||||||
set -g renumber-window on
|
set -g renumber-window on
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
setw -g pane-base-index 1
|
setw -g pane-base-index 1
|
||||||
@@ -15,7 +20,7 @@ set -g allow-passthrough on
|
|||||||
set -ga update-environment TERM
|
set -ga update-environment TERM
|
||||||
set -ga update-environment TERM_PROGRAM
|
set -ga update-environment TERM_PROGRAM
|
||||||
|
|
||||||
# List of plugins
|
#=== PLUGINS ===#
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
set -g @plugin 'tmux-plugins/tmux-open'
|
set -g @plugin 'tmux-plugins/tmux-open'
|
||||||
@@ -39,6 +44,7 @@ set -g @catppuccin_status_right_separator ""
|
|||||||
set -g @catppuccin_status_fill "icon"
|
set -g @catppuccin_status_fill "icon"
|
||||||
set -g @catppuccin_status_connect_separator "no"
|
set -g @catppuccin_status_connect_separator "no"
|
||||||
set -g @catppuccin_directory_text "#{pane_current_path}"
|
set -g @catppuccin_directory_text "#{pane_current_path}"
|
||||||
|
set-option -g status-position top
|
||||||
|
|
||||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||||
run '~/.tmux/plugins/tpm/tpm'
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|||||||
@@ -21,4 +21,3 @@ set font "FiraCode Nerd Font 15"
|
|||||||
set render-loading "false"
|
set render-loading "false"
|
||||||
set scroll-step 50
|
set scroll-step 50
|
||||||
set selection-clipboard clipboard
|
set selection-clipboard clipboard
|
||||||
include catppuccin-mocha
|
|
||||||
|
|||||||
@@ -127,3 +127,6 @@ source <(fzf --zsh)
|
|||||||
source "$FZF_HOME/shell/key-bindings.zsh"
|
source "$FZF_HOME/shell/key-bindings.zsh"
|
||||||
source "$FZF_HOME/shell/completion.zsh"
|
source "$FZF_HOME/shell/completion.zsh"
|
||||||
|
|
||||||
|
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
|
||||||
|
tmux attach-session -t default || tmux new-session -s default
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user