removing unused editors
This commit is contained in:
parent
2a45893344
commit
59a0ebec41
25 changed files with 476 additions and 787 deletions
|
|
@ -18,206 +18,128 @@
|
|||
];
|
||||
|
||||
extraConfig = ''
|
||||
bind -n M-r source-file ~/.config/tmux/tmux.conf
|
||||
bind -n M-r source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
set -g mouse on
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
|
||||
set-option -g status-position top
|
||||
|
||||
bind-key g display-popup -h 95% -w 95% -E 'lazygit'
|
||||
bind-key t display-popup -h 95% -w 95% -E "${pkgs.htop}/bin/htop"
|
||||
|
||||
bind C-g display-popup -E "tat ~/gallery"
|
||||
set -g detach-on-destroy off # don't exit from tmux when closing a session
|
||||
|
||||
bind -n M-g display-popup -E "tmux new-session -A -s scratch"
|
||||
# New Theme
|
||||
set -g status-interval 3 # update the status bar every 3 seconds
|
||||
set -g status-left "#[fg=blue,bold,bg=#${config.colorScheme.colors.base00}] #S "
|
||||
set -g status-right "#[fg=#${config.colorScheme.colors.base07},bold,bg=#${config.colorScheme.colors.base00}]%a %Y-%m-%d %l:%M %p"
|
||||
set -ga status-right "#($HOME/.config/tmux/scripts/cal.sh)"
|
||||
set -g status-justify left
|
||||
set -g status-left-length 200 # increase length (from 10)
|
||||
set -g status-right-length 200 # increase length (from 10)
|
||||
set -g status-position top # macOS / darwin style
|
||||
set -g status-style 'bg=#${config.colorScheme.colors.base00}' # transparent
|
||||
set -g window-status-current-format '#[fg=magenta,bg=#${config.colorScheme.colors.base00}]*#I #W#{?window_zoomed_flag,(),} '
|
||||
set -g window-status-format '#[fg=gray,bg=#${config.colorScheme.colors.base00}] #I #W'
|
||||
set -g window-status-last-style 'fg=white,bg=black'
|
||||
set -g message-command-style bg=default,fg=yellow
|
||||
set -g message-style bg=default,fg=yellow
|
||||
set -g mode-style bg=default,fg=yellow
|
||||
set -g pane-active-border-style 'fg=magenta,bg=default'
|
||||
set -g pane-border-style 'fg=brightblack,bg=default'
|
||||
set -g @tmux-last-prompt-pattern ' '
|
||||
set -g @tmux-nerd-font-window-name-shell-icon ''
|
||||
set -g @tmux-nerd-font-window-name-show-name false
|
||||
|
||||
bind -n M-b switch-client -l
|
||||
bind -n M-p previous-window
|
||||
bind -n M-n next-window
|
||||
bind -n M-P switch-client -p
|
||||
bind -n M-N switch-client -n
|
||||
|
||||
unbind f
|
||||
bind f resize-pane -Z
|
||||
|
||||
# create session
|
||||
bind C-c new-session
|
||||
set -g mouse on
|
||||
|
||||
# split current window horizontally
|
||||
bind - split-window -v
|
||||
# split current window vertically
|
||||
bind _ split-window -h
|
||||
set-option -g status-position top
|
||||
|
||||
# Select Layouts
|
||||
#―――――――――――――――――
|
||||
bind -n M-a select-layout main-vertical
|
||||
bind -n M-A select-layout main-horizontal
|
||||
bind -n M-E select-layout even-vertical
|
||||
bind -n M-V select-layout even-horizontal
|
||||
bind-key g display-popup -h 95% -w 95% -E 'lazygit'
|
||||
bind-key t display-popup -h 95% -w 95% -E "${pkgs.htop}/bin/htop"
|
||||
|
||||
# pane navigation
|
||||
bind -r h select-pane -L # move left
|
||||
bind -r j select-pane -D # move down
|
||||
bind -r k select-pane -U # move up
|
||||
bind -r l select-pane -R # move right
|
||||
bind > swap-pane -D # swap current pane with the next one
|
||||
bind < swap-pane -U # swap current pane with the previous one
|
||||
bind C-g display-popup -E "tat ~/gallery"
|
||||
|
||||
# pane resizing
|
||||
bind -r H resize-pane -L 2
|
||||
bind -r J resize-pane -D 2
|
||||
bind -r K resize-pane -U 2
|
||||
bind -r L resize-pane -R 2
|
||||
bind -r c-f resize-pane -Z
|
||||
bind -n M-g display-popup -E "tmux new-session -A -s scratch"
|
||||
|
||||
# window navigation
|
||||
unbind n
|
||||
unbind p
|
||||
bind -n M-b switch-client -l
|
||||
bind -n M-p previous-window
|
||||
bind -n M-n next-window
|
||||
bind -n M-P switch-client -p
|
||||
bind -n M-N switch-client -n
|
||||
|
||||
setw -g mode-keys vi
|
||||
unbind f
|
||||
bind f resize-pane -Z
|
||||
|
||||
bind Enter copy-mode # enter copy mode
|
||||
# create session
|
||||
bind C-c new-session
|
||||
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi C-v send -X rectangle-toggle
|
||||
bind -T copy-mode-vi y send -X copy-selection-and-cancel
|
||||
bind -T copy-mode-vi Escape send -X cancel
|
||||
bind -T copy-mode-vi H send -X start-of-line
|
||||
bind -T copy-mode-vi L send -X end-of-line
|
||||
# split current window horizontally
|
||||
bind - split-window -v
|
||||
# split current window vertically
|
||||
bind _ split-window -h
|
||||
|
||||
# -- buffers -------------------------------------------------------------------
|
||||
# Select Layouts
|
||||
#―――――――――――――――――
|
||||
bind -n M-a select-layout main-vertical
|
||||
bind -n M-A select-layout main-horizontal
|
||||
bind -n M-E select-layout even-vertical
|
||||
bind -n M-V select-layout even-horizontal
|
||||
|
||||
bind b list-buffers # list paste buffers
|
||||
bind p paste-buffer -p # paste from the top paste buffer
|
||||
bind P choose-buffer # choose which buffer to paste from
|
||||
# pane navigation
|
||||
bind -r h select-pane -L # move left
|
||||
bind -r j select-pane -D # move down
|
||||
bind -r k select-pane -U # move up
|
||||
bind -r l select-pane -R # move right
|
||||
bind > swap-pane -D # swap current pane with the next one
|
||||
bind < swap-pane -U # swap current pane with the previous one
|
||||
|
||||
# -- display -------------------------------------------------------------------
|
||||
# pane resizing
|
||||
bind -r H resize-pane -L 2
|
||||
bind -r J resize-pane -D 2
|
||||
bind -r K resize-pane -U 2
|
||||
bind -r L resize-pane -R 2
|
||||
bind -r c-f resize-pane -Z
|
||||
|
||||
set -g base-index 1 # start windows numbering at 1
|
||||
setw -g pane-base-index 1 # make pane numbering consistent with windows
|
||||
set -g renumber-windows on # renumber windows when a window is closed
|
||||
# window navigation
|
||||
unbind n
|
||||
unbind p
|
||||
|
||||
bind k display-popup -E "\
|
||||
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
|
||||
fzf --reverse -m --header=kill-session |\
|
||||
xargs -I {} tmux kill-session -t {}"
|
||||
setw -g mode-keys vi
|
||||
|
||||
bind C-j display-popup -E "\
|
||||
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
|
||||
sed '/^$/d' |\
|
||||
fzf --reverse --header jump-to-session --preview 'tmux capture-pane -pt {}' |\
|
||||
xargs tmux switch-client -t"
|
||||
bind Enter copy-mode # enter copy mode
|
||||
|
||||
# THEME
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi C-v send -X rectangle-toggle
|
||||
bind -T copy-mode-vi y send -X copy-selection-and-cancel
|
||||
bind -T copy-mode-vi Escape send -X cancel
|
||||
bind -T copy-mode-vi H send -X start-of-line
|
||||
bind -T copy-mode-vi L send -X end-of-line
|
||||
|
||||
right_arrow_icon=''
|
||||
left_arrow_icon=''
|
||||
upload_speed_icon=''
|
||||
download_speed_icon=''
|
||||
session_icon=''
|
||||
user_icon=''
|
||||
time_icon=''
|
||||
date_icon=''
|
||||
time_format='%T'
|
||||
date_format='%F'
|
||||
# -- buffers -------------------------------------------------------------------
|
||||
|
||||
# short for Theme-Colour
|
||||
TC="#${config.colorScheme.colors.base09}"
|
||||
bind b list-buffers # list paste buffers
|
||||
bind p paste-buffer -p # paste from the top paste buffer
|
||||
bind P choose-buffer # choose which buffer to paste from
|
||||
|
||||
G01=#080808 #232
|
||||
G02=#121212 #233
|
||||
G03=#1c1c1c #234
|
||||
#G04=#262626 #235
|
||||
G04=#${config.colorScheme.colors.base00} #235
|
||||
G05=#303030 #236
|
||||
#G06=#3a3a3a #237
|
||||
G06=#${config.colorScheme.colors.base02} #237
|
||||
G07=#444444 #238
|
||||
G08=#4e4e4e #239
|
||||
G09=#585858 #240
|
||||
G10=#626262 #241
|
||||
G11=#6c6c6c #242
|
||||
G12=#767676 #243
|
||||
# -- display -------------------------------------------------------------------
|
||||
|
||||
FG="#${config.colorScheme.colors.base03}"
|
||||
BG="#${config.colorScheme.colors.base00}"
|
||||
set -g base-index 1 # start windows numbering at 1
|
||||
setw -g pane-base-index 1 # make pane numbering consistent with windows
|
||||
set -g renumber-windows on # renumber windows when a window is closed
|
||||
|
||||
# Status options
|
||||
set-option -gq status-interval 1
|
||||
set-option -gq status on
|
||||
bind k display-popup -E "\
|
||||
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
|
||||
fzf --reverse -m --header=kill-session |\
|
||||
xargs -I {} tmux kill-session -t {}"
|
||||
|
||||
# Basic status bar colors
|
||||
set-option -gq status-fg "$FG"
|
||||
set-option -gq status-bg "$BG"
|
||||
set-option -gq status-attr none
|
||||
bind C-j display-popup -E "\
|
||||
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
|
||||
sed '/^$/d' |\
|
||||
fzf --reverse --header jump-to-session --preview 'tmux capture-pane -pt {}' |\
|
||||
xargs tmux switch-client -t"
|
||||
|
||||
# tmux-prefix-highlight
|
||||
set-option -gq @prefix_highlight_fg "$BG"
|
||||
set-option -gq @prefix_highlight_bg "$FG"
|
||||
set-option -gq @prefix_highlight_show_copy_mode 'on'
|
||||
set-option -gq @prefix_highlight_copy_mode_attr "fg=$TC,bg=$BG,bold"
|
||||
set-option -gq @prefix_highlight_output_prefix "#[fg=$TC]#[bg=$BG]$left_arrow_icon#[bg=$TC]#[fg=$BG]"
|
||||
set-option -gq @prefix_highlight_output_suffix "#[fg=$TC]#[bg=$BG]$right_arrow_icon"
|
||||
|
||||
#
|
||||
# Left side of status bar
|
||||
set-option -gq status-left-bg "$G04"
|
||||
set-option -gq status-left-fg "G12"
|
||||
set-option -gq status-left-length 150
|
||||
user=${user}
|
||||
LS="#[fg=$G04,bg=$TC,bold] $user_icon $user@#h #[fg=$TC,bg=$G06,nobold]$right_arrow_icon#[fg=$TC,bg=$G06] $session_icon #S "
|
||||
LS="$LS#[fg=$G06,bg=$BG]$right_arrow_icon"
|
||||
LS="$LS#{prefix_highlight}"
|
||||
|
||||
set-option -gq status-left "$LS"
|
||||
|
||||
# Right side of status bar
|
||||
set-option -gq status-right-bg "$BG"
|
||||
set-option -gq status-right-fg "G12"
|
||||
set-option -gq status-right-length 150
|
||||
RS="#[fg=$G06]$left_arrow_icon#[fg=$TC,bg=$G06] $time_icon $time_format #[fg=$TC,bg=$G06]$left_arrow_icon#[fg=$G04,bg=$TC] $date_icon $date_format "
|
||||
|
||||
set-option -gq status-right "$RS"
|
||||
|
||||
# Window status
|
||||
set-option -gq window-status-format " #I:#W#F "
|
||||
set-option -gq window-status-current-format "#[fg=$BG,bg=$G06]$right_arrow_icon#[fg=$TC,bold] #I:#W#F #[fg=$G06,bg=$BG,nobold]$right_arrow_icon"
|
||||
|
||||
# Window separator
|
||||
set-option -gq window-status-separator ""
|
||||
|
||||
# Window status alignment
|
||||
set-option -gq status-justify centre
|
||||
|
||||
# Current window status
|
||||
set-option -gq window-status-current-statys "fg=$TC,bg=$BG"
|
||||
|
||||
# Pane border
|
||||
set-option -gq pane-border-style "fg=$G07,bg=default"
|
||||
|
||||
# Active pane border
|
||||
set-option -gq pane-active-border-style "fg=$TC,bg=$BG"
|
||||
|
||||
# Pane number indicator
|
||||
set-option -gq display-panes-colour "$G07"
|
||||
set-option -gq display-panes-active-colour "$TC"
|
||||
|
||||
# Clock mode
|
||||
set-option -gq clock-mode-colour "$TC"
|
||||
set-option -gq clock-mode-style 24
|
||||
|
||||
# Message
|
||||
set-option -gq message-style "fg=$TC,bg=$BG"
|
||||
|
||||
# Command message
|
||||
set-option -gq message-command-style "fg=$TC,bg=$BG"
|
||||
|
||||
# Copy mode highlight
|
||||
set-option -gq mode-style "bg=$TC,fg=$FG"
|
||||
|
||||
# vim: set ft=tmux tw=0 nowrap:
|
||||
|
||||
'';
|
||||
'';
|
||||
};
|
||||
|
||||
programs.tmate = {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ create_detached_session() {
|
|||
(TMUX=''
|
||||
tmux new-session -Ad -s "$session_name" -c "$path_name"
|
||||
tmux split-window -vb -t "$session_name" -c "$path_name" -p 70
|
||||
tmux send-keys -t "$session_name" "/home/glen/.local/bin/lvim '+Telescope find_files'" Enter
|
||||
tmux send-keys -t "$session_name" "nvim '+Telescope find_files'" Enter
|
||||
)
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue