Nice tmux config :)
Install tpm
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
Set tmux config.
# Start tmux, press prefix keys then :
# enter...
source-file ~/.tmux.conf
Copy the tmux.conf into "~/.tmux.conf" save and reload your termainal.
# Richard Jones, 22/07/2023 - Custom Tmux config
## General Settings
set -g default-terminal "xterm-256color"
set -g history-limit 5000
setw -g xterm-keys on
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
set -s focus-events on
## Change the default key binding from Ctrl+b to Ctrl+a
unbind C-b
set -g prefix C-a
## mouse support
set -g mouse on
## Hot reload Ctrl+r
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
## Change split panes to v,h
bind h split-window -h
bind v split-window -v
unbind '"'
unbind %
## Display
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
## Activity
set -g monitor-activity on
set -g visual-activity off
# Dracula theme
set -g @plugin 'dracula/tmux'
set -g @dracula-show-battery true
set -g @dracula-show-powerline false
set -g @dracula-plugins "cpu-usage ram-usage time battery"
set -g @dracula-battery-label ""
set -g @dracula-military-time true
set -g @dracula-day-month true
set -g @dracula-show-timezone false
set -g @dracula-refresh-rate 10
# enable if powerline 10k installled
#set -g @dracula-show-powerline true
# Set tpm
set -g @plugin 'tmux-plugins/tpm'
# copy to xsel (Enable if on kali)
#if-shell -b 'command -v xsel > /dev/null 2>&1' 'bind -y run -b "tmux save-buffer - | xsel -i -b"'
# WSL
if-shell -b 'test -n "$WSLENV"' 'bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel clip.exe'
if-shell -b 'test -n "$WSLENV"' 'bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel clip.exe'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
Install Dracula Theme
https://draculatheme.com/tmux
###Prefix
Ctrl + a
split verticle : prefix + v
split horizontal : prefix + h
reload = prefix + r
prefix + z
prefix + !
- Click and drag with the Left Mouse Button to select some text and copy it into the primary selection
- Double-click the Left Mouse Button on a word to select the word and copy it into the primary selection
- Triple-click the Left Mouse Button on a line to select the whole line and copy it into the primary selection
- Click the Middle Mouse Button to paste from the primary selection
- Ctrl + Shift + c to copy the selection into the clipboard
- Ctrl + Shift + v to paste from the clipboard
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Set default shell
chsh -s $(which zsh)
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-autosuggestions.git
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
Now, edit your ~/.zshrc file to include them.
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
Restart your Zsh with source ~/.zshrc.
Install
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Add correct font
MesloLGS NF Regular.ttf
MesloLGS NF Bold.ttf
MesloLGS NF Italic.ttf
MesloLGS NF Bold Italic.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
cli install
make folder in ~/.local/share/fonts
cp the fonts to the location and refresh the font cache.
$ fc-cache -f -v
Then, add powerlevel10k to ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
Configure
$ p10k configure