-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtmuxc.1
204 lines (204 loc) · 7.23 KB
/
tmuxc.1
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "TMUXC 1"
.TH TMUXC 1 2023-11-06 1.9.1 "tmuxc - TMUX terminal manager"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
tmuxc \- TMUX terminal manager
.SH SYNOPSIS
.IX Header "SYNOPSIS"
\&\fBtmuxc\fR [options]
.SH OPTIONS
.IX Header "OPTIONS"
.IP \fB\-\-host|h\fR 4
.IX Item "--host|h"
Connect to a tmux instance on the listed host.
.IP \fB\-\-session|s\fR 4
.IX Item "--session|s"
Attach to the listed tmux session, or attach to the session@hostname.
.IP \fB\-\-background|b\fR 4
.IX Item "--background|b"
After connecting to a host and instance, background the daemon.
.IP \fB\-\-config|c\fR 4
.IX Item "--config|c"
Use the specified configuration file, overriding the default location of \fI~/.tmuxc.conf\fR.
.IP \fB\-\-detach|d\fR 4
.IX Item "--detach|d"
After connecting to a host and instance, detach any clients connected to the session.
.IP \fB\-\-verbose|v\fR 4
.IX Item "--verbose|v"
Enable verbose/debugging mode to print extra details.
.IP \fB\-\-reconnect|R\fR 4
.IX Item "--reconnect|R"
Reconnect to a remote host via SSH if the connection drops. This is enabled by default. This option overrides a host/session specific disable flag.
.IP \fB\-\-closeas|C\fR 4
.IX Item "--closeas|C"
Exit the control daemon after spawning terminals for every window.
.IP \fB\-\-exitlast|E\fR 4
.IX Item "--exitlast|E"
Exit the control daemon after the last windown in the tmux session is closed.
.IP \fB\-\-new|n\fR 4
.IX Item "--new|n"
Create a new window for the specified tmux session on the specified host.
.IP \fB\-\-launcher|l\fR 4
.IX Item "--launcher|l"
Open up a menu listing sessions from the .tmuxc.conf file that aren't running.
.IP \fB\-\-menu|m\fR 4
.IX Item "--menu|m"
Open up a menu listing control options. If one instance is running, the command is executed on that instance. If multiple are running, prompt the running sessions.
.IP \fB\-\-poe|P\fR 4
.IX Item "--poe|P"
Enable purge-on-exit for sessions of type 'none', 'ephemeral' or 'all'. This executes a \fIkill-session\fR against the session on tmuxc exit.
.IP \fB\-\-singlemenu|M\fR 4
.IX Item "--singlemenu|M"
Open up a menu listing control options. The options take the form of session@host ~ <action>, and are shown as a single-depth menu. Smart pagers (rofi, bemenu, etc) allow you to type partial words in any order to narrow down the option to execute.
.IP \fB\-\-wm|w\fR 4
.IX Item "--wm|w"
.RS 4
.PD 0
.IP \fBsingle\fR 2
.IX Item "single"
.PD
Enable single-window-mode. This opens up a single terminal for an entire tmux session, consistent with typical tmux usage.
.IP \fBmulti\fR 2
.IX Item "multi"
Enable multi-window-mode. This opens up a terminal for each window in the tmux session. This is the default behavior.
.RE
.RS 4
.RE
.IP "\fB\-\-known|k\fR | \fB\-\-known|k=,\fR" 4
.IX Item "--known|k | --known|k=,"
List active and inactive sessions. Takes an optional character argument to enable CSV output for machine parsing.
.IP "\fBremote|K\fR | \fBremote|K host\fR" 4
.IX Item "remote|K | remote|K host"
List tmux sessions on a remote host that do not have a local instance of tmuxc attached to them, then connect to the session.
.IP \fB\-\-print|o\fR 4
.IX Item "--print|o"
Print configuration options for the host and session selected from command line arguments.
.IP \fB\-\-ephemeral|S\fR 4
.IX Item "--ephemeral|S"
Prompt for a new session. The session can take the form of \fBsession\fR or \fBsession@hostname\fR
.IP \fB\-\-exit|e\fR 4
.IX Item "--exit|e"
Tell a specified tmuxc instance to exit.
.IP \fB\-\-pause|p\fR 4
.IX Item "--pause|p"
Tell a specified tmuxc instance to toggle it's pause mode. When in pause mode, all tmux messages received are ignored, as are any commands sent to the FIFO or on the command line.
.IP \fB\-\-raw|r\fR 4
.IX Item "--raw|r"
Issue a raw tmux or tmuxc command to a specified instance.
.SH EXAMPLES
.IX Header "EXAMPLES"
Connect to a session labeled \fIglobal-session\fR on the host \fIshellhost\fR, then background.
.PP
.Vb 1
\& tmuxc \-h shellhost \-s global\-session \-b
.Ve
.PP
Connect to the default session on localhost, then background.
.PP
.Vb 1
\& tmuxc \-b
.Ve
.PP
Issue the raw tmux command \fInew-window \-d\fR to the default session on localhost.
.PP
.Vb 1
\& tmuxc \-r \*(Aqnew\-window \-d\*(Aq
.Ve
.SH SCRIPTING
.IX Header "SCRIPTING"
Each running instance of tmuxc creates a command FIFO that can be used to control tmux and tmuxc. The FIFO takes the form of \fIhostname\-session.control\fR, and by default is available in \fI~/.tmuxc/control/\fR. Once you've written a command to the FIFO, send the \fBUSR1\fR signal to tmuxc. The PID is available in \fI~/.tmuxc/pid/hostname\-session.pid\fR.
.PP
See \fBRAW COMMANDS\fR for examples.
.SH "RAW COMMANDS"
.IX Header "RAW COMMANDS"
Raw commands can take multiple forms. Commands prefaced with \fItmuxc\fR hit the internal
command dispatcher. Any other command is passed as-is to tmux. Most tmuxc commands are
of no real use to end-users.
.SS EXAMPLES
.IX Subsection "EXAMPLES"
.Vb 2
\& tmuxc PauseSelf
\& new\-window \-d
.Ve
.SS "TMUXC INTERNAL COMMANDS"
.IX Subsection "TMUXC INTERNAL COMMANDS"
.IP \fBBulkSpawn\fR 6
.IX Item "BulkSpawn"
Instruct tmuxc to spawn terminals for all windows that do not have an attached client.
.IP \fBBulkDetach\fR 6
.IX Item "BulkDetach"
Instruct tmuxc to close all clients attached to windows.
.IP \fBKillSelf\fR 6
.IX Item "KillSelf"
Instruct tmuxc to cleanly exit.
.IP \fBPauseSelf\fR 6
.IX Item "PauseSelf"
Instruct tmuxc to ignore all input from the command line and from tmux, until this option is toggled again.
.IP \fBLoadConfig\fR 6
.IX Item "LoadConfig"
Instruct tmuxc to reload the configuration file from disk. The configuration file path discovered at the initial start of tmuxc is re-used.
.IP \fBToggleEphemeral\fR 6
.IX Item "ToggleEphemeral"
Flip the internal ephemeral flag for a running instance of tmuxc. This change is not persisted to the configuration file.
.SH AUTHOR
.IX Header "AUTHOR"
Zach Dykstra <[email protected]>