Changed colorscheme and updated tmux config +++
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
selected=$(find ~/ -mindepth 2 -maxdepth 2 -type d | fzf)
|
||||
|
||||
selected_name=$(basename "$selected" | tr . _)
|
||||
|
||||
tmux has-session -t=$selected_name 2> /dev/null
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
TMUX='' tmux new-session -d -s "$selected_name" -c "$selected"
|
||||
fi
|
||||
|
||||
if [[ -z "$TMUX" ]]; then
|
||||
tmux attach -t "$selected_name"
|
||||
else
|
||||
tmux switch-client -t "$selected_name"
|
||||
fi
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
selected=$(find ~/Projects/Private/ ~/Projects/Public/ -mindepth 1 -maxdepth 1 -type d | fzf)
|
||||
|
||||
selected_name=$(basename "$selected" | tr . _)
|
||||
|
||||
tmux has-session -t=$selected_name 2> /dev/null
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
TMUX='' tmux new-session -d -s "$selected_name" -c "$selected"
|
||||
fi
|
||||
|
||||
if [[ -z "$TMUX" ]]; then
|
||||
tmux attach -t "$selected_name"
|
||||
else
|
||||
tmux switch-client -t "$selected_name"
|
||||
fi
|
||||
@@ -1,43 +1,105 @@
|
||||
######################
|
||||
# Tmux config #
|
||||
# Inspired by: #
|
||||
# - josean.dev #
|
||||
# - DevOps Toolbox #
|
||||
######################
|
||||
|
||||
# Use RGB Colors
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
set -g base-index 1 # Start counting from 1
|
||||
set -g status-position top # Position status bar at top
|
||||
|
||||
set -g renumber-windows on # Whenever a window is closed, renumber them
|
||||
|
||||
# Change prefix
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
bind-key C-a send-prefix
|
||||
|
||||
######################
|
||||
# Change keybindings #
|
||||
######################
|
||||
|
||||
# Vertical window split
|
||||
unbind %
|
||||
bind - split-window -v
|
||||
|
||||
# Horizontal window split
|
||||
unbind '"'
|
||||
bind _ split-window -h
|
||||
|
||||
# Window resizing
|
||||
bind -r j resize-pane -D 5
|
||||
bind -r k resize-pane -U 5
|
||||
bind -r h resize-pane -L 5
|
||||
bind -r l resize-pane -R 5
|
||||
|
||||
bind -r m resize-pane -Z
|
||||
|
||||
# Vim keys
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
############
|
||||
# Vim Mode #
|
||||
############
|
||||
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
||||
|
||||
unbind -T copy-mode-vi MouseDragEnd1Pane
|
||||
|
||||
unbind r
|
||||
bind -r r source-file ~/.config/tmux/tmux.conf
|
||||
bind -r r source-file ~/.config/tmux/tmux.conf # Source config file
|
||||
|
||||
bind-key -r g run-shell -b "tmux neww ~/.config/tmux/tmux-sessionizer-git"
|
||||
bind-key -r f run-shell -b "tmux neww ~/.config/tmux/tmux-sessionizer-files"
|
||||
###########
|
||||
# Plugins #
|
||||
###########
|
||||
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
set -g @plugin 'wfxr/tmux-power'
|
||||
set -g @plugin 'tmux-plugins/tpm' # Plugin Manager
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator' # vim-like navigation
|
||||
set -g @plugin 'catppuccin/tmux' # Theme
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
set -g @plugin 'omerxx/tmux-sessionx'
|
||||
set -g @plugin 'sainnhe/tmux-fzf'
|
||||
|
||||
#############################################################
|
||||
# Catppuccin config #
|
||||
# See https://github.com/catppuccin/tmux for more resources #
|
||||
#############################################################
|
||||
|
||||
set -g @catppuccin_window_status_style "rounded"
|
||||
set -g @catppuccin_window_number_position "right"
|
||||
set -g @catppuccin_window_default_fill "number"
|
||||
set -g @catppuccin_window_text "#{window_name}"
|
||||
set -g @catppuccin_window_current_text "#{window_name}"
|
||||
set -g @catppuccin_window_current_fill "number"
|
||||
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_flavor 'macchiato'
|
||||
set -g status-right-length 100
|
||||
set -g status-left-length 100
|
||||
set -g status-left "#{E:@catppuccin_status_session}"
|
||||
set -g status-right "#{E:@catppuccin_status_directory}"
|
||||
set -ag status-right "#{E:@catppuccin_status_date_time}"
|
||||
|
||||
####################
|
||||
# Resurrect config #
|
||||
####################
|
||||
|
||||
set -g @tmux_power_theme '#BD93F9'
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
set -g @continuum-restore 'on'
|
||||
|
||||
###################
|
||||
# Sessionx config #
|
||||
###################
|
||||
|
||||
unbind s
|
||||
set -g @sessionx-bind 's'
|
||||
|
||||
|
||||
run '~/.config/tmux/plugins/tpm/tpm'
|
||||
|
||||
Reference in New Issue
Block a user