My recent terminal setting

iTerm2

iTerm2 -> Preferences -> General -> Selection tab -> Check "Applications in terminal may access clipboard"

tmux

set -g default-terminal "xterm-24bits"
set-option -ga terminal-overrides ",xterm-24bits:Tc"

set -g prefix C-t
bind -n S-left select-pane -L
bind -n S-down select-pane -D
bind -n S-up select-pane -U
bind -n S-right select-pane -R

set -g status-justify "centre"
set -g status-bg black
set -g status-fg colour248

set -g window-style 'bg=colour236'
set -g window-active-style 'bg=colour233'

bind e setw synchronize-panes \; display "synchronize-panes #{?pane_synchronized,on,off}"
set -g status-left "#[fg=colour255,bold]Session: #S"

set -g window-status-current-format "#[fg=colour255,bg=colour1,bold] #I: #W"

set -g status-position top

# selected options from tmux-sensible
set -g history-limit 50000
set -g display-time 4000
set -g status-interval 5
set -g status-keys emacs

set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
bind -n WheelDownPane select-pane -t= \; send-keys -M

set -g @plugin 'tmux-plugins/tmux-cpu'
set -g status-right '#[fg=green]#h#[default] #{cpu_fg_color} #{cpu_percentage}'

run '~/.tmux/plugins/tpm/tpm'

xterm-24bits comes from Setting up truecolor (24 bit color) in emacs in the terminal, under iTerm2, blink.sh, and others. · GitHub.

htop

This is to visualize CPU cores' usage. Divide terminal into two panes in tmux vertically and put htop in a small pane at the bottom.

conda-forge

.condarc

auto_activate_base: false
channel_priority: strict
channels:
  - conda-forge
  - defaults

emacs

  • conda.el
  • python-lsp-server: % pip install 'python-lsp-server[all]'
  • fortran-language-server: % pip install fortran-language-server
  • mypy: conda install -c conda-forge mypy

ripgrep (rg) and fd

Super fast alternatives to grep and find commands.

% brew install ripgrep fd

or

% conda install -c conda-forge ripgrep fd-find