From 94e429f914be777770cf8094d728008a5efcf6ff Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Mon, 22 Aug 2016 21:41:57 +0100 Subject: added all core files --- core/tmux.html | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 core/tmux.html (limited to 'core/tmux.html') diff --git a/core/tmux.html b/core/tmux.html new file mode 100644 index 0000000..a2a7d9c --- /dev/null +++ b/core/tmux.html @@ -0,0 +1,118 @@ + + + + + 6. Tmux + + + + + Systools Index +

6. Tmux

+ +

Install tmux, improves cli work efficiency;

+ +
+        $ sudo prt-get depinst tmux
+        
+ +

Create skeleton configuration file for users;

+ +
+        $ sudo vim /etc/skel/.tumx.conf
+        
+ +
+        set -g default-terminal "screen-256color"
+
+        set-window-option -g mode-keys vi
+
+        # Vim style
+        # copy tmux's selection buffer into the primary X selection with PREFIX+CTRL+Y
+        bind-key u run "tmux save-buffer - | xsel -ib"
+        # copy primary X selection into tmux's selection buffer with PREFIX+CTRL+P
+        bind-key e run "xsel -o | tmux load-buffer -"
+
+        bind-key -t vi-copy 'v' begin-selection
+        bind-key -t vi-copy 'y' copy-selection
+
+        set-option -g set-titles on
+        set-option -g set-titles-string '#S> #I.#P #W'
+
+        set -g visual-activity on
+        set -g monitor-activity on
+        set -g visual-bell on
+        set -g bell-action any
+
+        ## Join windows:  s,  j
+        bind-key j command-prompt -p "join pane from:"  "join-pane -s '%%'"
+        bind-key s command-prompt -p "send pane to:"  "join-pane -t '%%'"
+        
+ +

Copy to your current home and start tmux;

+ +
+        $ cp /etc/skel/.tmux.conf ~/
+        $ tmux
+        
+ +

Get help;

+ +
+        ctrl + b ?
+        
+ +
+        key = bind-key (default ctrl + b)
+
+        Window
+        key	c   new window
+        key	" 	split-window
+        key	n	next window
+        key	p	previous window
+
+        Panes
+        key	; 	last-pane
+        key	space	next-layout
+        key	!	break-pane
+        key	{	swap pane
+        key	}	swap pane
+        
+ +

6.1. Copy paste

+ +

This instructions are valid if tmux.conf file discribed + in this document is used;

+ +
+        1) enter copy mode using Control+b [
+        2) navigate to beginning of text, you want to select and hit v
+        3) move around using arrow keys to select region
+        4) when you reach end of region simply hit y to copy the region
+        5) now Control+b ] will paste the selection
+        
+ +

Paste in X with xsel;

+ +
+        6) update buffer of xsel using Control+b u
+        
+
+        

Copy from X with xsel;

+ +
+        0) update tmux buffer Control+b e
+        
+ +

Before pasting on vim, set paste mode and then set nopaste.

+ + Systools Index +

+ This is part of the SysDoc Manual. + Copyright (C) 2016 + Silvino Silva. + See the file Gnu Free Documentation License + for copying conditions.

+ + + -- cgit 1.4.1-2-gfad0 9-02 19:39:24 -0400 snapshot of project "lynx", label v2_6' href='/ingrix/lynx-snapshots/commit/WWW/Library/Implementation/crypt.c?id=e087f6d44e87f489fcb3056e86319ebba4218156'>e087f6d4