1
0

first commit

This commit is contained in:
2025-02-13 18:25:31 +01:00
commit 6136857a05
17 changed files with 1095 additions and 0 deletions

88
tmux/.tmux.conf Normal file
View File

@@ -0,0 +1,88 @@
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm,fullscreen'
set -g @plugin 'dracula/tmux'
# set -Fg 'status-format[1]' '#{status-format[0]}'
# set -g 'status-format[0]' ''
# set -g status 2
set -g @dracula-plugins "git weather time battery"
set -g @dracula-show-fahrenheit false
set -g @dracula-fixed-location "Madrid"
set -g @dracula-show-powerline false
set -g @dracula-transparent-powerline-bg true
set -g @dracula-military-time true
set -g @dracula-day-month true
set -g @plugin 'ofirgall/tmux-window-name'
set -g @tmux_window_name_substitute_sets "[('.+bash', 'bash')]"
set -g @tmux_window_name_shells "['bash', 'fish', 'sh', 'zsh']"
set -g @tmux_window_dir_programs "['nvim', 'vim', 'vi', 'git']"
set -g @tmux_window_name_use_tilde "True"
set -g @tmux_window_name_max_name_len "100"
set-option -g default-shell $SHELL
set -g default-command "$SHELL -i"
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
bind r source-file ~/.tmux.conf \; display "Reloaded!" # Reload with ctrl-r
set -sg escape-time 1 # quicker responses
set -g base-index 1 # Numbering of windows
setw -g pane-base-index 1 # Numbering of Panes
set -g mouse on
bind-key -n C-t new-window
bind-key -n C-S-T new-window -c '#{pane_current_path}'
bind-key -n C-S-Down next-window
bind-key -n C-S-Up previous-window
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
setw -g mode-keys vi
# decide whether we're in a Vim process
#is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
is_vim="~/is_vim.sh '#{pane_tty}'"
bind-key -n 'S-Left' if-shell "$is_vim" 'send-keys S-Left' 'select-pane -L'
bind-key -n 'S-Down' if-shell "$is_vim" 'send-keys S-Down' 'select-pane -D'
bind-key -n 'S-Up' if-shell "$is_vim" 'send-keys S-Up' 'select-pane -U'
bind-key -n 'S-Right' if-shell "$is_vim" 'send-keys S-Right' 'select-pane -R'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
bind-key -n 'C-Space' if-shell "$is_vim" 'send-keys C-Space' 'select-pane -t:.+'
bind-key -T copy-mode-vi 'S-Left' select-pane -L
bind-key -T copy-mode-vi 'S-Down' select-pane -D
bind-key -T copy-mode-vi 'S-Up' select-pane -U
bind-key -T copy-mode-vi 'S-Right' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
bind-key -T copy-mode-vi 'C-Space' select-pane -t:.+
run '~/.tmux/plugins/tpm/tpm'