init
This commit is contained in:
+133
@@ -0,0 +1,133 @@
|
||||
# ==========================
|
||||
# ALAPBEÁLLÍTÁSOK (Mac & DX)
|
||||
# ==========================
|
||||
|
||||
# Színek javítása (szükséges a Neovim/Rust CLI eszközökhöz)
|
||||
set-option -sa terminal-overrides ",xterm*:Tc"
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
# Egér támogatás engedélyezése (panelek átméretezése, görgetés)
|
||||
set -g mouse on
|
||||
|
||||
# Prefix átállítása Ctrl+b-ről Ctrl+a-ra (kényelmesebb Mac-en)
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
bind C-a send-prefix
|
||||
|
||||
# Ablakok és panelek számozása 1-től kezdődjön (0 messze van)
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
set -g pane-border-lines heavy
|
||||
set -g pane-border-style 'fg=colour250'
|
||||
# Config újratöltése "r" gombbal
|
||||
bind r source-file ~/.tmux.conf \; display "Config újratöltve!"
|
||||
|
||||
# ==========================
|
||||
# NAVIGÁCIÓ & PANELEK
|
||||
# ==========================
|
||||
|
||||
# Panelek megnyitása az aktuális könyvtárban (fontos T3/Docker projekteknél)
|
||||
bind '"' split-window -v -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
# Alternatív, könnyebben megjegyezhető split gombok
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
|
||||
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
|
||||
# Itt a lényeg: a '-n' (no prefix) kapcsoló kötelező!
|
||||
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
||||
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
|
||||
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
|
||||
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
||||
|
||||
# Vim-szerű navigáció a panelek között
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
bind-key -T copy-mode-vi 'C-h' select-pane -L
|
||||
bind-key -T copy-mode-vi 'C-j' select-pane -D
|
||||
bind-key -T copy-mode-vi 'C-k' select-pane -U
|
||||
bind-key -T copy-mode-vi 'C-l' select-pane -R
|
||||
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r J resize-pane -D 5
|
||||
bind -r K resize-pane -U 5
|
||||
bind -r L resize-pane -R 5
|
||||
|
||||
bind-key C-m split-window -h "ranger"
|
||||
bind R split-window -h ranger \; select-pane -L \; shell "ranger"
|
||||
|
||||
# ==========================
|
||||
# COPY MODE (AI Kód másolásához)
|
||||
# ==========================
|
||||
|
||||
# Vi mód bekapcsolása
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
# Kijelölés és másolás (mint Vim-ben)
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||
|
||||
# ==========================
|
||||
# PLUGINS (A lényeg)
|
||||
# ==========================
|
||||
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
|
||||
# Navigáció a Tmux és a szerkesztőd (pl. Nvim) között zökkenőmentesen
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
|
||||
# Téma: Catppuccin (Jól néz ki, támogatja a Git/Rust/Docker ikonokat)
|
||||
set -g @plugin 'catppuccin/tmux'
|
||||
set -g @catppuccin_flavour 'mocha' # latte, frappe, macchiato, mocha
|
||||
|
||||
# Session mentés (Ha újraindítod a gépet, minden docker/dev server visszajön)
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
set -g @plugin 'tmux-plugins/tmux-floax'
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
# Automatikus mentés 15 percenként
|
||||
set -g @continuum-restore 'on'
|
||||
|
||||
# ==========================
|
||||
# TÉMA KONFIGURÁCIÓ (Status bar)
|
||||
# ==========================
|
||||
set -g @catppuccin_window_left_separator ""
|
||||
set -g @catppuccin_window_right_separator " "
|
||||
set -g @catppuccin_window_middle_separator " █"
|
||||
set -g @catppuccin_window_number_position "right"
|
||||
|
||||
set -g @catppuccin_window_default_fill "number"
|
||||
set -g @catppuccin_window_default_text "#W"
|
||||
|
||||
set -g @catppuccin_window_current_fill "number"
|
||||
set -g @catppuccin_window_current_text "#W"
|
||||
|
||||
set -g @catppuccin_status_modules_right "directory session date_time"
|
||||
set -g @catppuccin_status_left_separator " "
|
||||
set -g @catppuccin_status_right_separator ""
|
||||
set -g @catppuccin_status_right_separator_inverse "no"
|
||||
set -g @catppuccin_status_fill "icon"
|
||||
set -g @catppuccin_status_connect_separator "no"
|
||||
|
||||
set -g @catppuccin_directory_text "#{pane_current_path}"
|
||||
|
||||
# Plugin manager inicializálása (ennek a legvégén kell lennie)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
set -g mode-style "fg=#ffffff,bg=#3e4452"
|
||||
|
||||
set -g @plugin 'roosta/tmux-pop'
|
||||
|
||||
# Opcionális testreszabás (hogy milyen színnel villanjon)
|
||||
# Light téma mellé egy élénk cián vagy sötétebb szürke villanás jól látható:
|
||||
set -g @tmux-pop-color 'cyan'
|
||||
set -g @tmux-pop-duration '0.1' # Hány másodpercig tartson (nagyon rövid)
|
||||
Reference in New Issue
Block a user