diff --git a/.tmux.conf b/.tmux.conf index 9dda8fa..9c8a5f4 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,53 +1,54 @@ -# Add mouse support +######################### +## FUNCTIONAL SETTINGS ## +######################### + +## Add mouse support set -g mouse on -# Set default shell to zsh +## Set default shell to zsh set-option -g default-shell /bin/zsh -# Set prefix to tilda +## Set prefix to tilda set-option -g prefix \` bind ` send-prefix -# Reload this config fie with tilda+r +## Reload this config fie with tilda+r bind r source-file ~/.tmux.conf -# Start counting windows at 1 instead of 0. Re-index windows on close so they're always successive +## Start counting windows at 1 instead of 0. Re-index windows on close so they're always successive set -g base-index 1 set -g renumber-windows on #################### ## THEME & LAYOUT ## -#################### +####################i + ## Status bar (tabbar) -setw -g window-status-separator '' -setw -g window-status-current-style "bg=colour4 fg=#cccccc,bold" +set -g status-justify left +setw -g window-status-separator '' +setw -g window-status-current-style "bg=#777777 fg=#eeeeee,bold" setw -g window-status-style "bg=#777777 fg=#333333,bold" set -g status-bg "#333333" # Cannot figure out a way to rewrite this into a single 'style' line set -g status-fg "#cccccc" -set -g window-status-format "#{?#{==:#{window_index},1},, } #I≡#{window_name} #{?window_end_flag,#[bg=#777777 fg=#333333] 🭨,#[bg=#777777 fg=#333333] 🮥}" -set -g window-status-current-format "#{?#{==:#{window_index},1},#[fg=colour4 bg=#aaaaaa]🭨#[bg=colour4] ,#[fg=colour4 bg=#777777] 🭨}#[fg=#cccccc bg=colour4]#I≡#{window_name} #{?window_end_flag,#[bg=colour4 fg=#333333] 🭨,#[bg=colour4 fg=#777777]🭨#[fg=#333333 bg=#777777]🮥}" +set -g window-status-format "#{?#{==:#{window_index},1},,} #{window_name} #{?window_end_flag,#[bg=#777777 fg=#333333] 🭨,#[bg=#777777 fg=#333333]🮥}" +set -g window-status-current-format "#{?#{==:#{window_index},1},#[fg=#777777 bg=#aaaaaa]🭨#[bg=#777777 fg=#eeeeee],} #{window_name} #{?window_end_flag,#[bg=#777777 fg=#333333] 🭨,#[bg=#777777 fg=#333333]🮥}" ## Add a top border to every pane. Helps identify active pane and looks more obvious in general set -g pane-border-status top -#set -g pane-border-format " [#{pane_current_command}] - #{pane_current_path} " -set -g pane-border-format "" # We don't need fancy titles with zsh +set -g pane-border-format "" ## Pane borders -set -g pane-active-border-style "bg=default fg=#aaaaaa" +set -g pane-active-border-style "bg=default fg=#999999" set -g pane-border-style "bg=default fg=#666666" set -g pane-border-lines heavy -## Put a nice looking clock on the right, remove window title. +## Put a nice looking clock on the right, remove pane title. Show tmux instance title on the left (usually '0') set -g status-right "#[fg=#333333 bg=#777777,bold]🭪#[fg=#333333 bg=#777777] %H:%M #[fg=#777777 bg=#999999]🭪#[fg=#333333 bg=#999999] %d-%b-%y " set -g status-left "#[bg=#aaaaaa,fg=#333333,bold] #{session_name} #{?#{==:#{window_index},1},,#[fg=#777777 bg=#aaaaaa]🭨}" -#set -g status-left "#[bg=#aaaaaa,fg=#333333,bold] #{session_name}" - -# set -g window-active-style 'bg=black'# We don't need this with the pane titles (make active pane more black) - - +## Uncomment if you're experiencing difficulty distinguish the active pane from the other ones. Especially if your terminal is transparent. +# set -g window-active-style 'bg=black' -set -g status-justify left diff --git a/doc/img1.png b/doc/img1.png new file mode 100644 index 0000000..bcd24b8 Binary files /dev/null and b/doc/img1.png differ diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..9b693ea --- /dev/null +++ b/readme.md @@ -0,0 +1,74 @@ +# Tmux configuration + +My personal tmux configuration. I expect this to evolve over time as I develop my tmux skills. + +Made with zsh, oh-my-zsh, p10k, guake and fura code monospace (nerd edition) in mind. Would probably work without (?). + +## Changes + +The main event right now is the redesigned bottom bar. It boast p10k-look and feel. + +![doc/img1.png](doc/img1.png) + +Other notable changes are: + +- Mouse support enabled. Click to resize panes and switch tabs. (shift+rclick gets you the terminal-native rclick) + +- Default shell to zsh + +- Prefix key is \` (tilda) (all tmux shortcuts start with this key. Double tap to actually type \`) + +## Hotkey cheatsheet + +Pretty much all of these are default, except for the fact that they're initiated by tilda instead of ctrl+b. + +A lot can also be done using your mouse. Like selecting panes, tabs and resizing. + +| Combo | Details | +| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `` ` + C`` | Create new tab (tmux window) | +| `` ` + [1..9]`` | Select tab 1 - 9 | +| `` ` + ,`` | Rename tab (tilda+comma) | +| `` + 🠜🠝🠟🠞`` | Switch panes. You can press the arrow keys in short succession to navigate without hitting ` everytime. After settling your cursor for ~1 second it will 'take effect' | +| `` ` + %`` | Split pane horizontally --- | +| `` ` +  " `` | Split pane vertically \| | +| `exit` | exit your terminal, and therefore exit that pane. | +| `` ` + ?`` | Open shortcut help in that window | +| | | +| | | +| | | + +## Installation + +Install tmux from your preferred package repo, then copy .tmux.conf to your home directory. Oneliner: + +`wget https://git.thijsdevries.net/dodedodo/tmux.conf/raw/branch/master/.tmux.conf -O ~/.tmux.conf` + +**Optionally** you should install zsh and p10k. + +1. ```bash + sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"``` + ``` + +2. ```bash + git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k + echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc + ``` + +3. Install nerd-fonts-fira-code (most fira or fura fonts should do the trick, whatever you can lay your hands on) + +**'Tested' on** + +- manjaro 21.0.4 + +- gnome 40 + +- tmux 3.2 + +- zsh 5.8 + +- ohmyzsh - + +- p10k 1.14.6 + +- Nerd Fonts: fira code 2.1.0