about summary refs log tree commit diff stats
path: root/tools/tmux.html
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tmux.html')
-rw-r--r--tools/tmux.html118
1 files changed, 118 insertions, 0 deletions
diff --git a/tools/tmux.html b/tools/tmux.html
new file mode 100644
index 0000000..c00b046
--- /dev/null
+++ b/tools/tmux.html
@@ -0,0 +1,118 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+    <head>
+        <meta charset='utf-8'>
+        <title>2.5.3. Tmux</title>
+    </head>
+
+    <body>
+
+        <a href="index.html">GNU/Linux Index</a>
+        <h1 id="tmux">2.5.3. Tmux</h1>
+
+        <p>Install tmux, improves cli work efficiency;</p>
+
+        <pre>
+        $ sudo prt-get depinst tmux
+        </pre>
+
+        <p>Create skeleton configuration file for users;</p>
+
+        <pre>
+        $ sudo vim /etc/skel/.tumx.conf
+        </pre>
+
+        <pre>
+        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: <prefix> s, <prefix> 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 '%%'"
+        </pre>
+
+        <p>Copy to your current home and start tmux;</p>
+
+        <pre>
+        $ cp /etc/skel/.tmux.conf ~/
+        $ tmux
+        </pre>
+
+        <p>Get help;</p>
+
+        <pre>
+        ctrl + b ?
+        </pre>
+
+        <pre>
+        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
+        </pre>
+
+        <h2 id="cpypst">2.5.3.1. Copy paste</h2>
+
+        <p>This instructions are valid if tmux.conf file discribed
+        in this document is used;</p>
+
+        <pre>
+        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
+        </pre>
+
+        <p>Paste in X with xsel;</p>
+
+        <pre>
+        6) update buffer of xsel using Control+b u
+        </pre>
+
+        <p>Copy from X with xsel;</p>
+
+        <pre>
+        0) update tmux buffer Control+b e
+        </pre>
+
+        <p>Before pasting on vim, set paste mode and then set nopaste.</p>
+
+        <a href="index.html">GNU/Linux Index</a>
+        <p>
+        This is part of the LeetIO System Documentation.
+        Copyright (C) 2021
+        LeetIO Team.
+        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
+        for copying conditions.</p>
+
+    </body>
+</html>
0'>260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414