about summary refs log tree commit diff stats
path: root/305keyboard.subx
Commit message (Collapse)AuthorAgeFilesLines
* 6963 - tile: more idiomatic conventional replKartik Agaram2020-10-051-1/+1
|
* 6926Kartik Agaram2020-10-021-0/+4
|
* 6794 - cleaner interface for keyboardKartik Agaram2020-09-161-3/+10
| | | | | | | So far I've been assuming that read-key only works for ascii, and that I'd need to get more sophisticated both for multi-byte utf-8 and multi-byte terminal escape codes like arrow keys. Rather to my surprise, both work fine. We just need to adjust the types to reflect this fact.
* 6781 - new app: RPN (postfix) calculatorKartik Agaram2020-09-151-0/+16
| | | | This was surprisingly hard; bugs discovered all over the place.
* 6779Kartik Agaram2020-09-141-1/+1
| | | | Looks like Linux turns reads from stdout/stderr into stdin!
* 6778Kartik Agaram2020-09-141-2/+2
|
* 6627Kartik Agaram2020-07-101-1/+1
|
* 6612 - reorganize layersKartik Agaram2020-07-051-0/+196
16-09-18 19:37:12 +0100 core bash, dash and tmux revision' href='/punk/doc/commit/core/tmux.html?id=30ffee2fea8f32e291adf4e396039fbdf8ac0f6b'>30ffee2 ^
94e429f ^




30ffee2 ^
94e429f ^








30ffee2 ^
94e429f ^
e2fd026 ^
94e429f ^
183caad ^
94e429f ^




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
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">Core OS 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">Core OS Index</a>
        <p>
        This is part of the c9-doc Manual.
        Copyright (C) 2016
        c9 team.
        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
        for copying conditions.</p>

    </body>
</html>