mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
ref(nix): ✨ mkOptions ✨
This commit is contained in:
parent
d98d30916b
commit
989d025f56
42 changed files with 80 additions and 78 deletions
122
nix/home/_/tmux/tmux.conf
Normal file
122
nix/home/_/tmux/tmux.conf
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
###########
|
||||
# Options #
|
||||
###########
|
||||
|
||||
set -s escape-time 0 # escape delay
|
||||
set -g mouse on # mouse control
|
||||
set -g focus-events on # focus-events for vim
|
||||
set -g default-terminal "tmux-256color" # enable italics
|
||||
set -g base-index 1 # start counting pane number from 1
|
||||
set -g renumber-windows on # auto reorder window number
|
||||
set -g mode-keys vi # global vi mode
|
||||
set -g history-limit 10000 # I want more history
|
||||
|
||||
# Display style
|
||||
set -g @FG "#000000"
|
||||
set -g @BG "#fafafa"
|
||||
set -g @GREY "#a0a1a7"
|
||||
set -g @VISUAL "#dedede"
|
||||
set -g @ACCENT "#645199"
|
||||
set -g @RED "#ca1243"
|
||||
|
||||
set -g message-style "fg=#{@FG},bold,bg=#{@VISUAL}"
|
||||
|
||||
# status bar
|
||||
set -g status-position top
|
||||
set -g status-style "fg=#{@FG},bg=#{@VISUAL}"
|
||||
set -g status-left "#{?window_name,#I:#W}"
|
||||
set -g status-right "#(basename #S) [#(uname -n)]"
|
||||
|
||||
# window name
|
||||
set -g window-status-style "fg=#{@GREY},bg=#{@VISUAL}"
|
||||
set -g window-status-current-style "fg=#{@FG},bold,bg=#{@VISUAL}"
|
||||
set -g window-status-format " #{pane_current_command}"
|
||||
set -g window-status-current-format " #{pane_current_command}"
|
||||
|
||||
# pane border (separator)
|
||||
set -g pane-border-style "fg=#{@VISUAL}"
|
||||
set -g pane-active-border-style "fg=#{@ACCENT}"
|
||||
|
||||
############
|
||||
# Bindings #
|
||||
############
|
||||
# remap prefix
|
||||
bind C-a send-prefix
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
|
||||
# easy config reload (that bypasses nix too)
|
||||
bind r source-file ~/.dotfiles/nix/home/common/tmux/tmux.conf \; display-message "tmux.conf reloaded."
|
||||
|
||||
# organic jumping
|
||||
bind -n C-h select-window -t 1
|
||||
bind -n C-t select-window -t 2
|
||||
bind -n C-n select-window -t 3
|
||||
bind -n C-s select-window -t 4
|
||||
bind -T copy-mode-vi C-h select-window -t 1
|
||||
bind -T copy-mode-vi C-t select-window -t 2
|
||||
bind -T copy-mode-vi C-n select-window -t 3
|
||||
bind -T copy-mode-vi C-s select-window -t 4
|
||||
|
||||
# stop the clock madness
|
||||
unbind t
|
||||
|
||||
# vim-sytle pane jumping
|
||||
bind h select-pane -L
|
||||
bind l select-pane -R
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
|
||||
# unbind built-in select-pane jumping
|
||||
unbind Left
|
||||
unbind Right
|
||||
unbind Down
|
||||
unbind Up
|
||||
|
||||
# improve window swapping
|
||||
bind [ swap-window -d -t -1
|
||||
bind ] swap-window -d -t +1
|
||||
|
||||
# Prime says the find window is for chumps. Don't use the find window
|
||||
bind -n C-f popup -h 25 -w 70 -E "fish -c tmux_sessionizer"
|
||||
bind -n C-g run-shell "fish -c tmux_home"
|
||||
bind s run-shell "fish -c tmux_last"
|
||||
|
||||
# fast kill
|
||||
bind C-k confirm-before kill-session
|
||||
|
||||
# pane movement
|
||||
bind < command-prompt -p "join pane from:" "join-pane -s '%%'"
|
||||
bind > command-prompt -p "send pane to:" "join-pane -t '%%'"
|
||||
bind b command-prompt -p "break pane to " "break-pane -t '%%'"
|
||||
|
||||
# Disable toggle
|
||||
# credit https://github.com/samoshkin/tmux-config/blob/master/tmux/tmux.conf
|
||||
bind -T root F12 \
|
||||
set prefix None \;\
|
||||
set key-table off \;\
|
||||
set window-status-current-style "fg=#{@GREY},bold,bg=#{@VISUAL}" \;\
|
||||
refresh-client -S
|
||||
|
||||
bind -T off F12 \
|
||||
set -u prefix \;\
|
||||
set -u key-table \;\
|
||||
set -u status \;\
|
||||
set window-status-current-style "fg=#{@FG},bold,bg=#{@VISUAL}" \;\
|
||||
refresh-client -S
|
||||
|
||||
# Better copy
|
||||
bind v copy-mode
|
||||
bind -T copy-mode-vi v send-keys -X begin-selection
|
||||
if-shell "uname | grep -q Darwin" {
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'pbcopy'
|
||||
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'pbcopy'
|
||||
} {
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
||||
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
||||
}
|
||||
|
||||
# if-shell "[ -n \"#{@SSH_CLIENT}\"]" {
|
||||
# bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'ssh leana@10.0.0.10 pbcopy'
|
||||
# bind-key -T copy-mode-vi 'Y' send -X copy-pipe-and-cancel 'ssh leana@10.66.66.10 pbcopy'
|
||||
# }
|
||||
Loading…
Add table
Add a link
Reference in a new issue