tmux.conf sourced /usr/lib/python3.11/site-packages/powerline/bindings/tmux/powerline.conf which puts a Python minor version in a path. It was already wrong before this repository touched anything: beastix runs 3.14, so tmux has been printing that error there for however long. shron never had the problem because its own tmux.conf had the line commented out - until the checkout replaced that file with this copy, and every session there started with the error. Replacing a deliberately disabled setting with a broken one is the worse of the two outcomes, and it is exactly what "every machine carries every file" costs when a file is not actually machine-neutral. The path now comes from the module itself, so it survives Python upgrades, and each step exits quietly if something is missing. The Mac has neither powerline nor tmux and gets nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
184 lines
3.6 KiB
Bash
184 lines
3.6 KiB
Bash
|
|
# #################
|
|
# screen-like setup
|
|
# #################
|
|
|
|
# COLOR
|
|
# oobah
|
|
#set -g status-bg green
|
|
# zircon
|
|
#set -g status-bg black
|
|
#set -g status-fg white
|
|
# pi
|
|
#set -g status-bg yellow
|
|
# bio6
|
|
#set -g status-bg red
|
|
#set -g status-fg white
|
|
#set -g status-bg blue
|
|
|
|
# C-a is escape sequence
|
|
unbind C-b
|
|
set -g prefix ^O
|
|
bind a send-prefix
|
|
|
|
# vim ftw
|
|
# unnecessary because $EDITOR=vim
|
|
# setw -g mode-keys vi
|
|
|
|
# copy pasta #
|
|
unbind [
|
|
# C to enter copy mode
|
|
bind C copy-mode
|
|
# v or space to select
|
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
|
# y to yank, and it goes in primary and clipboard buffers
|
|
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
|
|
# P to paste, or shift-inser as it's in bothe buffers
|
|
unbind P
|
|
bind P paste-buffer
|
|
|
|
# switch panes with Tab
|
|
unbind Tab
|
|
bind Tab select-pane -t :.+
|
|
|
|
#open man page with /
|
|
bind / command-prompt "split-window -h 'exec man %%'"
|
|
|
|
# resize pane with arrow keys
|
|
# -r: can be repeated without pressing prefix
|
|
# again (500ms after last '-r' action or prefix)
|
|
unbind Left
|
|
unbind Right
|
|
unbind Down
|
|
unbind Up
|
|
bind -r Left resize-pane -L 2
|
|
bind -r Right resize-pane -R 2
|
|
bind -r Down resize-pane -D 2
|
|
bind -r Up resize-pane -U 2
|
|
|
|
# new window ^C c
|
|
unbind ^C
|
|
bind ^C new-window
|
|
bind c new-window
|
|
|
|
# reload config without killing server
|
|
bind R source-file ~/tmux.conf \; display-message " Config reloaded..."
|
|
|
|
# detach ^D d
|
|
unbind ^D
|
|
bind ^D detach
|
|
|
|
# displays *
|
|
unbind *
|
|
bind * list-clients
|
|
|
|
# lockscreen ^X x
|
|
unbind ^X
|
|
bind ^X lock-server
|
|
unbind x
|
|
bind x lock-server
|
|
|
|
# prev ^H ^P p ^?
|
|
unbind ^H
|
|
bind ^H previous-window
|
|
unbind ^P
|
|
bind ^P previous-window
|
|
unbind p
|
|
bind p previous-window
|
|
unbind BSpace
|
|
bind BSpace previous-window
|
|
|
|
# next ^@ ^N space n
|
|
unbind ^@
|
|
bind ^@ next-window
|
|
unbind ^N
|
|
bind ^N next-window
|
|
unbind " "
|
|
bind " " next-window
|
|
unbind n
|
|
bind n next-window
|
|
|
|
# title A
|
|
unbind A
|
|
bind A command-prompt "rename-window %%"
|
|
|
|
# ^A to get to last window
|
|
unbind ^O
|
|
bind ^O last-window
|
|
|
|
# windows ^W w
|
|
unbind ^W
|
|
bind ^W list-windows
|
|
unbind w
|
|
bind w list-windows
|
|
|
|
# " windowlist -b
|
|
unbind '"'
|
|
bind '"' choose-window
|
|
|
|
# quit \
|
|
#unbind \
|
|
#bind \ confirm-before "kill-server"
|
|
|
|
# kill K k
|
|
unbind K
|
|
bind K confirm-before "kill-window"
|
|
unbind k
|
|
bind k confirm-before "kill-window"
|
|
|
|
# redisplay ^L l
|
|
unbind ^L
|
|
bind ^L refresh-client
|
|
unbind l
|
|
bind l refresh-client
|
|
|
|
# split -v |
|
|
unbind |
|
|
bind | split-window
|
|
unbind S
|
|
bind S split-window -v
|
|
|
|
|
|
#CPU MEM
|
|
#https://github.com/thewtex/tmux-mem-cpu-load
|
|
#set -g status-interval 2
|
|
#set -g status-right "#(tmux-mem-cpu-load 2) #H"
|
|
# powerline, resolved at runtime rather than pinned to a Python version.
|
|
# See .scripts/tmux-powerline.sh - the old hardcoded path was already wrong on
|
|
# every machine and made tmux print an error on every start.
|
|
run-shell "$HOME/.scripts/tmux-powerline.sh"
|
|
|
|
# disable mouse control by default - change 'off' to 'on' to enable by default.
|
|
setw -g mouse off
|
|
# toggle mouse mode to allow mouse copy/paste
|
|
# set mouse on with prefix m
|
|
bind m \
|
|
set -g mouse on \;\
|
|
display 'Mouse: ON'
|
|
# set mouse off with prefix M
|
|
bind M \
|
|
set -g mouse off \;\
|
|
display 'Mouse: OFF'
|
|
# zoom this pane to full screen
|
|
bind + \
|
|
new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
|
|
swap-pane -s tmux-zoom.0 \;\
|
|
select-window -t tmux-zoom
|
|
# restore this pane
|
|
bind - \
|
|
last-window \;\
|
|
swap-pane -s tmux-zoom.0 \;\
|
|
kill-window -t tmux-zoom
|
|
|
|
# make tmux display things in 256 colors
|
|
set -g default-terminal "screen-256color"
|
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
|
|
set -g @plugin 'egel/tmux-gruvbox'
|
|
set -g @tmux-gruvbox 'dark' # or 'light'
|
|
|
|
run '~/.tmux/plugins/tpm/tpm'
|
|
|