# Portable keyboard conventions shared by SSH, external keyboards and the N810. # Private customizations live in ~/.config/n810/tmux.conf. set-option -g prefix '`' set-option -g prefix2 C-b set-window-option -g mode-keys vi set-option -s set-clipboard external unbind-key -q -n C-b unbind-key -q '[' bind-key '`' send-keys '`' bind-key Escape copy-mode bind-key p paste-buffer bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel bind-key Left resize-pane -L bind-key Down resize-pane -D bind-key Up resize-pane -U bind-key Right resize-pane -R bind-key -n M-Left select-pane -L bind-key -n M-Down select-pane -D bind-key -n M-Up select-pane -U bind-key -n M-Right select-pane -R bind-key -n S-Left previous-window bind-key -n S-Right next-window bind-key '<' swap-window -t - bind-key '>' swap-window -t + bind-key '"' split-window -c '#{pane_current_path}' bind-key % split-window -h -c '#{pane_current_path}' bind-key c new-window -c '#{pane_current_path}' bind-key m set-option -g mouse on bind-key M set-option -g mouse off # Keep these small-keyboard aliases, alongside the conventional splits. bind-key h split-window -h -c '#{pane_current_path}' bind-key v split-window -v -c '#{pane_current_path}' bind-key ? list-keys bind-key a run-shell 'n810-pocket open apps' bind-key Space next-layout bind-key Tab last-window bind-key r source-file /usr/local/share/n810/tmux-n810.conf \; display-message 'N810 tmux config reloaded' # Internal-only hardware keys from the charge17 device-tree map: # Home/Swap, Fullscreen, Zoom+, Zoom-. bind-key -n S-F2 last-window bind-key -n S-F3 resize-pane -Z bind-key -n S-F4 next-window bind-key -n S-F5 previous-window # Back remains an unchorded Escape for shells, editors and copy mode. unbind-key -q -n Escape # Compact, ASCII-only status for the 800x480 framebuffer console. set-option -g mouse on set-option -g status on set-option -g status-position bottom set-option -g status-justify left set-option -g status-interval 30 set-option -g status-left-length 16 set-option -g status-right-length 24 set-option -g status-style 'fg=white,bg=black' set-option -g status-left ' #S ' set-option -g status-right '#(/usr/local/bin/n810-tmux-battery) %H:%M ' set-window-option -g window-status-style 'fg=white,bg=black' set-window-option -g window-status-current-style 'fg=black,bg=white,bold' set-window-option -g window-status-activity-style 'fg=yellow,bg=black,bold' set-window-option -g window-status-format ' #I:#W ' set-window-option -g window-status-current-format '[#I:#W]' set-window-option -g automatic-rename off set-window-option -g monitor-activity on set-option -g visual-activity off set-option -g bell-action any set-option -g visual-bell off set-option -g pane-border-style 'fg=colour8' set-option -g pane-active-border-style 'fg=white' set-option -g message-style 'fg=black,bg=white' # Apply private overrides once, then derive Menu from the same bindings. source-file -q ~/.config/n810/tmux.conf # F13 is named S-F1 by tmux. Menu has its own one-key table so tablet arrows # select panes while backtick/C-b arrows retain familiar resizing behavior. unbind-key -q -a -T n810-menu run-shell 'tmux -S "#{socket_path}" list-keys -T prefix | sed "s/-T prefix /-T n810-menu /" | tmux -S "#{socket_path}" source-file -' bind-key -n S-F1 switch-client -T n810-menu bind-key -T n810-menu -r Left select-pane -L bind-key -T n810-menu -r Down select-pane -D bind-key -T n810-menu -r Up select-pane -U bind-key -T n810-menu -r Right select-pane -R bind-key -T n810-menu -r C-Left resize-pane -L bind-key -T n810-menu -r C-Down resize-pane -D bind-key -T n810-menu -r C-Up resize-pane -U bind-key -T n810-menu -r C-Right resize-pane -R bind-key -T n810-menu p previous-window bind-key -T n810-menu P paste-buffer bind-key -T n810-menu '[' copy-mode bind-key -T n810-menu Space choose-tree -Zw bind-key -T n810-menu ? run-shell 'n810-pocket open help'