mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
feat: Most config rearranged properly.
This commit is contained in:
166
env/.config/tmux/tmux.conf
vendored
166
env/.config/tmux/tmux.conf
vendored
@@ -1,166 +0,0 @@
|
||||
# Some tweaks to the status line
|
||||
set -g status-right "%H:%M"
|
||||
set -g window-status-current-style "underscore"
|
||||
set -g status-position "top"
|
||||
|
||||
# If running inside tmux ($TMUX is set), then change the status line to red
|
||||
%if #{TMUX}
|
||||
set -g status-bg red
|
||||
%endif
|
||||
|
||||
TMUX_FZF_OPTIONS="-p -w 60% -h 80% -m"
|
||||
|
||||
# Enable RGB colour if running in xterm(1)
|
||||
set-option -sa terminal-overrides ",xterm*:Tc"
|
||||
|
||||
# Change the default $TERM to tmux-256color
|
||||
set -g default-terminal "xterm-256color"
|
||||
|
||||
# Change windows to start with an index of 1 instead of 0
|
||||
set -g base-index 1
|
||||
|
||||
# Change panes to start with an index of 1 instead of 0
|
||||
setw -g pane-base-index 1
|
||||
|
||||
# No bells at all
|
||||
set -g bell-action none
|
||||
|
||||
# Keep windows around after they exit
|
||||
set -g remain-on-exit on
|
||||
|
||||
# Set indexes to start at 1, instead of 0.
|
||||
set -g base-index 1
|
||||
|
||||
# Change the prefix key to C-a
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
bind C-a send-prefix
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
bind -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
||||
|
||||
# Turn the mouse on, but without copy mode dragging
|
||||
set -g mouse on
|
||||
unbind -n MouseDrag1Pane
|
||||
unbind -Tcopy-mode MouseDrag1Pane
|
||||
|
||||
# A key to toggle between smallest and largest sizes if a window is visible in
|
||||
# multiple places
|
||||
bind F set -w window-size
|
||||
|
||||
# Keys to toggle monitoring activity in a window and the synchronize-panes option
|
||||
bind m set monitor-activity
|
||||
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
|
||||
|
||||
# Better split pane
|
||||
bind \\ splitw -h
|
||||
bind - splitw -v
|
||||
|
||||
# Use Alt-arrow keys to navigate panes
|
||||
# bind -n M-Left select-pane -L
|
||||
# bind -n M-Right select-pane -R
|
||||
# bind -n M-Up select-pane -U
|
||||
# bind -n M-Down select-pane -D
|
||||
|
||||
# Close a pane quickly
|
||||
bind-key -r K kill-pane
|
||||
|
||||
# Use Shift-arrow keys to navigate windows.
|
||||
bind -n S-Left previous-window
|
||||
bind -n S-Right next-window
|
||||
bind -n M-h previous-window
|
||||
bind -n M-l next-window
|
||||
bind C-l send-keys 'C-l'
|
||||
|
||||
bind f run-shell "tmux display-popup -E -w 80% -h 80% $SCRIPTS/tmux-sessionator"
|
||||
bind-key -r C run-shell -b "~/.local/share/scripts/tmux-sessionator ~/.dotfiles"
|
||||
unbind s
|
||||
bind s run-shell -b "~/.config/tmux/plugins/tmux-fzf/scripts/session.sh switch"
|
||||
|
||||
# reload new changes
|
||||
bind-key r source-file ~/.config/tmux/tmux.conf\; \display-message "source-file done"
|
||||
|
||||
######################################## Plugins ########################################
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @plugin 'sainnhe/tmux-fzf'
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
#set -g @plugin 'erikw/tmux-powerline'
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
set -g @plugin 'catppuccin/tmux'
|
||||
set -g @plugin 'tmux-plugins/tmux-online-status'
|
||||
set -g @plugin 'tmux-plugins/tmux-battery'
|
||||
set -g @plugin 'omerxx/tmux-floax'
|
||||
|
||||
# Configure Catppuccin
|
||||
set -g @catppuccin_flavor "macchiato"
|
||||
set -g @catppuccin_status_background "none"
|
||||
set -g @catppuccin_window_status_style "none"
|
||||
set -g @catppuccin_pane_status_enabled "off"
|
||||
set -g @catppuccin_pane_border_status "off"
|
||||
|
||||
# Configure Online
|
||||
set -g @online_icon "ok"
|
||||
set -g @offline_icon "nok"
|
||||
|
||||
# status left look and feel
|
||||
set -g status-left-length 100
|
||||
set -g status-left ""
|
||||
# set -ga status-left "#{?#{e|>=:10,#{battery_percentage}},#{#[bg=#{@thm_red},fg=#{@thm_bg}]},#{#[bg=#{@thm_bg},fg=#{@thm_pink}]}} #{battery_icon} #{battery_percentage} "
|
||||
# set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}, none]│"
|
||||
# set -ga status-left "#[bg=#{@thm_bg}]#{?#{==:#{online_status},ok},#[fg=#{@thm_mauve}] on ,#[fg=#{@thm_red},bold]#[reverse] off }"
|
||||
# set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}, none]│"
|
||||
# set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_blue}] %Y-%m-%d %H:%M "
|
||||
|
||||
# status right look and feel
|
||||
set -g status-right-length 100
|
||||
set -g status-right ""
|
||||
set -ga status-right "#{?client_prefix,#{#[bg=#{@thm_red},fg=#{@thm_bg},bold] #S },#{#[bg=#{@thm_bg},fg=#{@thm_green}] #S }}"
|
||||
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]│"
|
||||
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_maroon}] #{pane_current_command} "
|
||||
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]│"
|
||||
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_blue}] #{=/-32/...:#{s|$USER|~|:#{b:pane_current_path}}} "
|
||||
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]#{?window_zoomed_flag,│,}"
|
||||
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_yellow}]#{?window_zoomed_flag, zoom ,}"
|
||||
|
||||
|
||||
# bootstrap tpm
|
||||
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'"
|
||||
|
||||
# Configure Tmux
|
||||
set -g status-position top
|
||||
set -g status-style "bg=#{@thm_bg}"
|
||||
set -g status-justify "absolute-centre"
|
||||
|
||||
# For yazi images to work correctly
|
||||
set -gq allow-passthrough on
|
||||
set -g visual-activity off
|
||||
set -ga update-environment TERM
|
||||
set -ga update-environment TERM_PROGRAM
|
||||
|
||||
# pane border look and feel
|
||||
setw -g pane-border-status top
|
||||
setw -g pane-border-format ""
|
||||
setw -g pane-active-border-style "bg=#{@thm_bg},fg=#{@thm_overlay_0}"
|
||||
setw -g pane-border-style "bg=#{@thm_bg},fg=#{@thm_surface_0}"
|
||||
setw -g pane-border-lines single
|
||||
|
||||
# window look and feel
|
||||
set -wg automatic-rename on
|
||||
set -g automatic-rename-format "Window"
|
||||
|
||||
set -g window-status-format " #I#{?#{!=:#{window_name},Window},: #W,} "
|
||||
set -g window-status-style "bg=#{@thm_bg},fg=#{@thm_rosewater}"
|
||||
set -g window-status-last-style "bg=#{@thm_bg},fg=#{@thm_peach}"
|
||||
set -g window-status-activity-style "bg=#{@thm_red},fg=#{@thm_bg}"
|
||||
set -g window-status-bell-style "bg=#{@thm_red},fg=#{@thm_bg},bold"
|
||||
set -gF window-status-separator "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}]│"
|
||||
|
||||
set -g window-status-current-format " #I#{?#{!=:#{window_name},Window},: #W,} "
|
||||
set -g window-status-current-style "bg=#{@thm_peach},fg=#{@thm_bg},bold"
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.config/tmux/plugins/tpm/tpm'
|
||||
Reference in New Issue
Block a user