dotfiles/.tmux.conf2

56 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

set -g prefix ^a
[dev] refactor riot; improve tmux and vim; more plugins; more aliases (#43) * riot: remove unknown domain warn * install.sh: --no-ssh -> --no-auth-info * doll: --restart=unless-stopped * zshrc: alias cps and mvs * riot: proxy -> ssh * zshrc: not alias rm to trash * (trial) riot devel: separate preset to config dir riot.d * riot: support extra options and extra -o options * (experimental) riot config in a single file * riot config: add nasp remote and null domain * gitconf: pull.ff = only * fix ci * riot: dynamic port forwarding * riot: only one domain func will be exec * to-install: update lemonbench * to-install: alist * [exp] riot inferred ssh: ping ping6 * sagt: fix nixos * riot config: domain 42 * ubuntu.sh: DEBIAN_FRONTEND=noninteractive * zshrc: ping -n * zshrc: alias ping -n * riot-config: jumpserver from sir0 to ssh.beardic.cn * zshrc: alias ping before checking os type * frigg: support api4.beardic.cn * fix(install.sh): crontab fails on a new server * fix(riot-conf): nasp.ob.ac.cn -> nasp.fit * fix(install.sh): install crontab (exp) * feat(test.zsh): test crontab * fix(riot): secure control master * fix(ci): riot control master * fix(riot): not mkdir if dry-run * feat(vimrc): set shiftwidth=4 * feat(ci): sync tmux-yank * feat(tmux): set-clipboard on and mouse on (experimental) * feat(zshrc): alias ping6 * build(ci): hub mirror 1.3->1.4 * fix(zshrc): tmux on msys; feat(common): better perf getting os type and linux dist * fix(common.sh): get_os_type and get_linux_dist * feat(zshrc): add plugin {magic-enter,per-directory-history,pip,podman,python,rsync,systemd,timer} * feat(zshrc): journalctl alias * feat(vimrc): tab=2 for c,cpp,nix,yaml * build(ci): checkout v3 -> v4 --------- Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
2024-05-05 12:02:55 +08:00
set -g mouse on
set -g set-clipboard on
set -g default-terminal "xterm-256color"
set -g history-limit 10000
# plugins
set -g @plugin 'https://gitee.com/dictxiong/tmux-mem-cpu-load'
set -g @plugin 'https://gitee.com/dictxiong/tmux-resurrect'
run '~/.tmux/plugins/tpm/tpm'
# Use Alt-arrow keys to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# '-' and '|' to split
bind - split-window -v -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
# other key bindings
bind r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded"
bind m run 'old=$(tmux show -gv mouse); new="off"; if [ "$old" = "off" ]; then new="on"; fi; tmux set -g mouse $new && tmux display-message toggle\ mouse\ mode\ $new'
bind C-x set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
# styles
# status bar
set -g monitor-activity on
set -g bell-action any
set -g status-position top
set -g status-style fg=white,bg=colour241
set -g status-interval 1
set -g status-justify centre
set -g status-left-length 23
2022-05-22 13:49:08 +08:00
set -g status-left "#[fg=colour228]#(whoami)#[default]@#(hostname | sed 's/-ibd-ink//g')[#S]"
set -g status-right-length 60
set -g status-right "#[default]#(~/.tmux/plugins/tmux-mem-cpu-load/tmux-mem-cpu-load --averages-count 1 --interval 2)#[default] "
set -ag status-right "#[default]#(uptime | cut -f 4-5 -d ' ' | cut -f 1 -d ',' | sed 's/ //g')"
set -ag status-right " #[fg=white,bg=default]%H:%M:%S"
set -g window-status-style fg=colour248
2022-05-22 13:49:08 +08:00
set -g window-status-current-style fg=colour228,bg=colour237
set -g window-status-activity-style fg=colour237,bg=colour248
set -g window-status-bell-style fg=colour237,bg=colour214
# panes and windows
set -g pane-active-border-style fg=brightblue
set -g window-style fg=colour248
set -g window-active-style fg=white
2022-05-31 13:58:36 +08:00
# better mouse scrolling. see: https://superuser.com/questions/1622812/mouse-scrolling-in-mobaxterm-tmux
[dev] refactor riot; improve tmux and vim; more plugins; more aliases (#43) * riot: remove unknown domain warn * install.sh: --no-ssh -> --no-auth-info * doll: --restart=unless-stopped * zshrc: alias cps and mvs * riot: proxy -> ssh * zshrc: not alias rm to trash * (trial) riot devel: separate preset to config dir riot.d * riot: support extra options and extra -o options * (experimental) riot config in a single file * riot config: add nasp remote and null domain * gitconf: pull.ff = only * fix ci * riot: dynamic port forwarding * riot: only one domain func will be exec * to-install: update lemonbench * to-install: alist * [exp] riot inferred ssh: ping ping6 * sagt: fix nixos * riot config: domain 42 * ubuntu.sh: DEBIAN_FRONTEND=noninteractive * zshrc: ping -n * zshrc: alias ping -n * riot-config: jumpserver from sir0 to ssh.beardic.cn * zshrc: alias ping before checking os type * frigg: support api4.beardic.cn * fix(install.sh): crontab fails on a new server * fix(riot-conf): nasp.ob.ac.cn -> nasp.fit * fix(install.sh): install crontab (exp) * feat(test.zsh): test crontab * fix(riot): secure control master * fix(ci): riot control master * fix(riot): not mkdir if dry-run * feat(vimrc): set shiftwidth=4 * feat(ci): sync tmux-yank * feat(tmux): set-clipboard on and mouse on (experimental) * feat(zshrc): alias ping6 * build(ci): hub mirror 1.3->1.4 * fix(zshrc): tmux on msys; feat(common): better perf getting os type and linux dist * fix(common.sh): get_os_type and get_linux_dist * feat(zshrc): add plugin {magic-enter,per-directory-history,pip,podman,python,rsync,systemd,timer} * feat(zshrc): journalctl alias * feat(vimrc): tab=2 for c,cpp,nix,yaml * build(ci): checkout v3 -> v4 --------- Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
2024-05-05 12:02:55 +08:00
set -g terminal-overrides 'xterm*:smcup@:rmcup@'