User Tools

Site Tools


linux:user:tmux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:user:tmux [2020/10/19 06:33] stonelinux:user:tmux [2023/11/10 10:24] (current) stone
Line 1: Line 1:
-====== tmux ======+====== Tmux ======
 Irgendwie hasse ich das Ding. Irgendwie hasse ich das Ding.
 \\ \\
  
-===== TMUX Settings =====+===== Tmux Settings & Config =====
 <code> <code>
 +# Scroll History
 +set -g history-limit 100000
 +
 +
 +# Show Messages longer
 +set -g display-time 2000
 +
 +
 +# Messages Color
 +set -g message-style bg='#ffffff',fg='#1f618d'
 +
 +
 # Mouse Settings # Mouse Settings
 set -g mouse on set -g mouse on
  
-Extra Binds+ 
 +Bind for Mouse on/off
 bind-key m \ bind-key m \
         set-option -g mouse off \;\         set-option -g mouse off \;\
Line 17: Line 30:
         display-message 'Mouse: ON'         display-message 'Mouse: ON'
  
-# reload config file (change file location to your the tmux.conf you want to use) 
-bind r source-file ~/.tmux.conf \; display-message 'Config Reloaded...' 
  
 +# Bind Sync Panes (Send CMD To all)
 +bind-key k \
 +        set-option -g synchronize-panes off \;\
 +        display-message 'Sync-Panes: OFF'
  
 +bind-key K \
 +        set-option -g synchronize-panes on \;\
 +        display-message 'Sync-Panes: ON'
  
-# Statusbar+ 
 +# Bind for Config reload 
 +bind r source-file ~/.tmux.conf \; display-message 'Reload Config..' 
 + 
 + 
 +# Statusbar Globals
 set -g default-terminal "screen-256color" set -g default-terminal "screen-256color"
 +set-option -g status-interval 2
  
-# Statusbar Global 
-set -g status-bg colour237 
-set -g status-fg colour034 
  
-# Statusbar - Rechts Datum und Uhrzeit+# Statusbar - Left 
 +set -g status-bg '#303030' 
 +set -g status-fg '#65c7fa' 
 +set-option -g status-left-length 15 
 +set -g status-left '#[bg=#1f618d]#[fg=#ffffff]#(echo "S:")#S #[bg=#303030]#[fg=#65c7fa] ' 
 +set -g window-status-format '#[bg=#303030]#[fg=#257ca9]#{window_index}#(echo ":")#{window_name}#{window_flags}#{window_zoomed_flag} #[bg=#ffffff]#[fg=#1f618d]#(echo " <> ")' 
 +set -g window-status-current-format '#[bold]#[bg=#303030]#[fg=#85d4fc]#{window_index}#(echo ":")#{window_name}#{window_flags} #[bg=#ffffff]#[fg=#1f618d]#(echo " <> ")' 
 + 
 + 
 +# Statusbar - Right
 set -g status-position bottom set -g status-position bottom
-set -g status-right '#[fg=colour233,bg=colour8] %d/%m/%#[fg=colour233,bg=colour237]|#[fg=colour233,bg=colour8] %H:%M:%S '+set-option -g status-right-length 45 
 +set -g status-right '#[bg=#1f618d]#[fg=#ffffff] #(hostname) #[bg=#ffffff]#[fg=#1f618d] <> #[bg=#1f618d]#[fg=#ffffff] %d/%m/%#[bg=#ffffff]#[fg=#1f618d] <> #[bg=#1f618d]#[fg=#ffffff] %H:%M:%S '
  
-set-window-option -g window-status-fg colour19 
-set-window-option -g window-status-bg colour8 
  
 +# Pane Colors
 +set -g pane-border-style fg='#7d8599'
 +set -g pane-active-border-style fg='#7ac1f0'
  
-# Split Border (Pane) 
  
 +# Window counter starts at 1 not at 0
 +set-option -g base-index 1
 +set-window-option -g pane-base-index 1
 +set-option -g renumber-windows on
  
  
-Messages +Dont Jump after copy some text in vi mode 
-set -g message-style 'fg=colour160 bg=colour237 bold'+#bind-key V \ 
 +#       set -g mode-keys vi on \;\ 
 +#       display-message 'VI Mode on'
  
 +#bind-key v \
 +#       set -g mode-keys vi off \;\
 +#       display-message 'VI Mode off'
 +
 +#bind-key -T copy-mode C-w send-keys -X copy-selection
 +#bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection
 +#bind-key -T copy-mode M-w send-keys -X copy-selection
 +#bind-key -T copy-mode-vi C-j send-keys -X copy-selection
 +#bind-key -T copy-mode-vi Enter send-keys -X copy-selection
 +#bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection
 +
 +
 +# Clock color
 +#set-window-option -g clock-mode-colour fg='#1f618d'
 +
 +# TPM
 +#set -g @plugin 'tmux-plugins/tpm'
 +#set -g @plugin 'tmux-plugins/tmux-sensible'
 +#run-shell '~/.tmux/plugins/tpm/tpm'
 +
 +
 +# Nord Theme
 +# https://github.com/arcticicestudio/nord-tmux
 +# run-shell "~/.tmux/themes/nord-tmux/nord.tmux
 </code> </code>
 +
 +\\
 +
 +===== Tmux Cheat Sheet =====
 +==== Sessions ====
 +List Session
 +<code>
 +tmux ls
 +</code>
 +\\
 +
 +Create new Session
 +<code>
 +tmux new -s <name>
 +</code>
 +\\
 +
 +Attacht Session
 +<code>
 +tmux a -t <name>
 +</code>
 +\\
 +
 +Rename Session
 +<code>
 +tmux rename-session -t <current name> <new name>
 +</code>
 +\\
 +
 +==== Windows ====
 +Create new Window
 +<code>
 +CTRL + B -> C
 +</code>
 +\\
 +
 +Switch Window
 +<code>
 +CTRL + B -> 0-9
 +</code>
 +\\
 +
 +Close Window
 +<code>
 +??
 +</code>
 +\\
 +
 +Rename Window
 +<code>
 +CTRL + B -> ,
 +</code>
 +\\
 +
 +List Windows
 +<code>
 +CTRL + B -> w
 +</code>
 +\\
 +
 +==== Panes ====
 +Split Horizontal
 +<code>
 +CTRL + B -> "
 +</code>
 +\\
 +
 +Split Vertical
 +<code>
 +CTRL + B -> %
 +</code>
 +\\
 +
 +Delete Current Panel
 +<code>
 +CTRL + B -> x
 +</code>
 +\\
 +
 +List Panels
 +<code>
 +CTRL + B -> q
 +</code>
 +\\
 +
 +Swap Random Panels
 +<code>
 +CTRL + B -> Space
 +</code>
 +\\
 +
 +Swap Panel Up
 +<code>
 +CTRL + B -> :swap-pane -U
 +</code>
 +\\
 +
 +
 +Swap Panel Down
 +<code>
 +CTRL + B -> :swap-pane -D
 +</code>
 +\\
linux/user/tmux.1603089221.txt.gz · Last modified: by stone