1
0
mirror of https://github.com/sameer1612/.dotfiles.git synced 2024-11-19 18:01:53 +02:00

cleaned up tmux

This commit is contained in:
Sameer Kumar 2023-10-04 17:07:46 +05:30
parent 8bafce67e6
commit 9b785eb75b
3 changed files with 39 additions and 24 deletions

View File

@ -1,33 +1,32 @@
set -g default-terminal "screen-256color"
set -g mouse on
set -g prefix C-Space
unbind C-b
bind-key C-Space send-prefix
unbind %
bind d split-window -v -c "#{pane_current_path}"
unbind '"'
bind v split-window -h -c "#{pane_current_path}"
unbind r
bind r source-file ~/.tmux.conf; display ".tmux.conf reloaded"
bind-key s {set-option status on}
bind-key S {set-option status off}
# window and split management
set -g base-index 1
setw -g pane-base-index 1
set-option -g renumber-windows on
set-option -g status-interval 5
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
set -g mouse on
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 s run-shell "~/.toggle_tmux_status_bar.sh"
bind -r m resize-pane -Z
unbind %
unbind h
bind h split-window -v -c "#{pane_current_path}"
unbind '"'
bind v split-window -h -c "#{pane_current_path}"
############################################################
# vim bindings
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
@ -42,7 +41,7 @@ set -g @plugin 'christoomey/vim-tmux-navigator'
run '~/.tmux/plugins/tpm/tpm'
############################################################
# TokyoNight colors for Tmux
# TokyoNight theme
set -g mode-style "fg=#7aa2f7,bg=#3b4261"
set -g message-style "fg=#7aa2f7,bg=#3b4261"
@ -63,19 +62,20 @@ set -g status-left-style NONE
set -g status-right-style NONE
set -g status-left "#[fg=#15161e,bg=#7aa2f7] #S #[fg=#7aa2f7,bg=#16161e,nounderscore,noitalics]"
set -g status-right "#[fg=#16161e,bg=#16161e,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#16161e] #{prefix_highlight} #[fg=#3b4261,bg=#16161e,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261] %Y-%m-%d #[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#15161e,bg=#7aa2f7] uI:%M %p "
set -g status-right "#[fg=#16161e,bg=#16161e,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#16161e] #{prefix_highlight} #[fg=#7aa2f7,bg=#16161e,nobold,nounderscore,noitalics]#[fg=#15161e,bg=#7aa2f7] %I:%M %p "
setw -g window-status-activity-style "underscore,fg=#a9b1d6,bg=#16161e"
setw -g window-status-separator ""
setw -g window-status-style "NONE,fg=#a9b1d6,bg=#16161e"
setw -g window-status-format "#[fg=#16161e,bg=#16161e,nobold,nounderscore,noitalics]#[default] #I  #W #F #[fg=#16161e,bg=#16161e,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=#16161e,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261] #I  #W #F #[fg=#3b4261,bg=#16161e,nobold,nounderscore,noitalics]"
setw -g window-status-format "#[fg=#16161e,bg=#16161e,nobold,nounderscore,noitalics]#[default] #W #F #[fg=#16161e,bg=#16161e,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=#16161e,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261] #W #F #[fg=#3b4261,bg=#16161e,nobold,nounderscore,noitalics]"
# tmux-plugins/tmux-prefix-highlight support
set -g @prefix_highlight_output_prefix "#[fg=#e0af68]#[bg=#16161e]#[fg=#16161e]#[bg=#e0af68]"
set -g @prefix_highlight_output_suffix ""
############################################################
# configs from tmux sensible
set -s escape-time 0
set -g display-time 2000
set -g focus-events on
############################################################

12
.toggle_tmux_status_bar.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
# Get the current status of the Tmux status bar
status=$(tmux show-option -g status | awk '{print $NF}')
# Toggle the status
if [ "$status" == "on" ]; then
tmux set-option -g status off
else
tmux set-option -g status on
fi

5
.zshrc
View File

@ -8,7 +8,7 @@ export ZSH="$HOME/.oh-my-zsh"
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="agnoster"
ZSH_THEME="sorin"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
@ -148,3 +148,6 @@ prompt_context() {} # remove user and machine identifier
eval "$(zoxide init zsh)"
bindkey '^[^I' autosuggest-accept
PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[red]%}❯%{$fg_bold[yellow]%}❯%{$fg_bold[green]%}❯)%{$reset_color%} '