diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-11-27 12:06:58 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-11-29 18:36:23 -0700 |
commit | 84961b9e4c5c758e6d5936410866ab7df5c6be11 (patch) | |
tree | 6e4959ca5386bbd310ddd70470160976e92fb623 /.tmux.conf | |
parent | baf36923b28ffe2b3f0e81ae65219c72e16b90c0 (diff) | |
download | dotfiles-84961b9e4c5c758e6d5936410866ab7df5c6be11.tar.gz |
tidy up .tmux.conf
Diffstat (limited to '.tmux.conf')
-rw-r--r-- | .tmux.conf | 124 |
1 files changed, 27 insertions, 97 deletions
@@ -1,62 +1,39 @@ -# ---- preferences ---- - +set -g prefix "C-\\" +bind "\\" send-prefix +bind "C-\\" last-window +set default-terminal "screen-256color" set -g set-titles on set -g set-titles-string "tmux #S on #H" - -set -g base-index 1 -set -g pane-base-index 1 set -g history-limit 5000 -set -sg escape-time 1 - -set -g default-terminal "screen-256color" - -# set -wg monitor-activity on -# set -g visual-activity on - -# ---- bindings ---- - -set -wg mode-keys emacs +set escape-time 1 +set -g mode-keys emacs set -g status-keys emacs -# set -wg xterm-keys on - -# same as dtach and GNU screen -set -g prefix "C-\\" - -# C-\ \ to send C-\ to Emacs, nested tmux, dtach etc. -bind "\\" send-prefix - -# C-\ C-\ to bounce between windows -# unbind C-\\ -bind "C-\\" last-window +set -g status-position top +set -g status-justify centre +set -g window-status-current-style fg=white,bg=black -# detach all other clients: useful when other clients on other machines are -# making Irssi too small; can easily reconnect from those machines when wanted -# thanks to my ssh-and-tmux script or just by hitting i3 shortcut to relaunch -bind "K" detach-client -a +# Reserve the zeroth window for primary Emacs daemon. +set -g base-index 1 +bind e if-shell "! tmux selectw -t :0" "neww -t :0 -n Emacs emacsclient -t" -# # splitting should maintain current working directory -# bind '"' split-window -c "#{pane_current_path}" -# bind % split-window -h -c "#{pane_current_path}" -# bind c new-window -c "#{pane_current_path}" +bind g new-window -c "#{pane_current_path}" \ + "grep --color=always -Eir '(copyright|©)' * | less -R" -bind C new-window -c "#{pane_current_path}" -bind g new-window -c "#{pane_current_path}" "grep --color=always -Eir '(copyright|©)' * | less -R" +# Complements C-\ c, which creates a new pane in the initial working dir. +bind & new-window -c "#{pane_current_path}" -# # my launcher shortcuts: mnemonic is h for host and e for emacs/editor -# # E for e-mail -# bind M command-prompt -p "man" "split-window 'exec man %%'" -# bind m new-window -n mail mutt -# bind H command-prompt -p "mosh to host" "split-window 'mosh %1'" -# bind h command-prompt -p "mosh to host" "new-window -n %1 'mosh %1'" -# bind R command-prompt -p "ssh to host" "split-window 'ssh %1'" -# bind r command-prompt -p "ssh to host" "new-window -n %1 'ssh %1'" -# bind E split-window 'emacsclient -amg -t' -bind e run-shell tmuxmacs -# bind t new-window -n irssi 'ii' +# Detach all other clients: useful when other clients on other machines are +# making an ncurses program too small; can easily reconnect from those +# machines when wanted thanks to my ssh-and-tmux script. +bind K detach-client -a -# ftp-master: tmux setup for NEW processing -# bind N split-window -v -d "emacsclient -t -a '' -e '(switch-to-buffer \"*scratch*\")'" \; swap-pane -D \; resize-pane -t 1 -y 12 \; send c d Space / s r v / f t p - m a s t e r . d e b i a n . o r g / q u e u e / n e w Enter d a k Space p r o c e s s - n e w Space -# bind N send c d Space / s r v / f t p - m a s t e r . d e b i a n . o r g / q u e u e / n e w Enter d a k Space p r o c e s s - n e w Space +# ftp-master: tmux setup for NEW processing. +# A partial alternative to ~/src/dotfiles/scripts/desktop/sway-ftp-master. +bind N split-window -v -d \ + "emacsclient -te '(progn (switch-to-buffer \"*NEW notes*\") (text-mode))'"\;\ + swap-pane -D \; resize-pane -t 1 -y 12 \; send c d Space \ + / s r v / f t p - m a s t e r . d e b i a n . o r g / q u e u e / n e w \ + Enter d a k Space p r o c e s s - n e w Space # Obtain dark-on-light when the terminal emulator isn't already dark-on-light, # as it is on my own machines. We don't just set these styles unconditionally @@ -64,50 +41,3 @@ bind e run-shell tmuxmacs # is faster than trying to configure an unfamiliar local terminal emulator. bind W set -g window-style 'fg=black,bg=brightwhite'\;\ set -g window-active-style 'fg=black,bg=brightwhite' - -# ---- status bar ---- - -set -g status-position top -set -g status-justify centre -# set -g status-style dim - -# invert current window so easier to pick out -set -wg window-status-current-style fg=white,bg=black - -# ---- terminal keycode fixes ---- - -# set -g terminal-overrides "xterm*:kf1=\e[11~:kf2=\e[12~:kf3=\e[13~:kf4=\e[14~:kf5=\e[15~:kf6=\e[17~:kf7=\e[18~:kf8=\e[19~" -# set -g terminal-overrides "xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@" - -# ---- old theming code ---- - -# # --- status bar - -# set -g status-justify centre -# setw -g monitor-activity on -# set -g visual-activity on -# set -g status-left-length 70 -# set -g status-left "#[fg=green]: #h" -# set -g status-right-length 60 -# set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]:: %d %b %Y #[fg=green]:: %l:%M %p :: #(date -u | awk '{print $4}')::" - -# # --- zenburn from -# # --- https://github.com/plathrop/dotfiles/blob/master/tmux/zenburn.conf - -# setw -g clock-mode-colour colour117 -# setw -g mode-attr bold -# setw -g mode-fg colour117 -# setw -g mode-bg colour238 -# set -g status-bg colour235 -# set -g status-fg colour248 -# set -g status-attr dim -# set -g status-left ' #[fg=colour174][ #[fg=colour187,bold]#(whoami)@#h #[fg=colour174]]' -# set -g status-right '#[fg=colour174][ #[fg=colour187,bold]%d %h %H:%M #[fg=colour174]] ' -# set -g status-right-length 80 -# setw -g window-status-current-fg colour223 -# setw -g window-status-current-bg colour237 -# setw -g window-status-current-attr bold -# set -g message-attr bold -# set -g message-fg colour117 -# set -g message-bg colour235 -# set-option -g status-position top |