You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a few examples to the `connections.mdx` file to show:
- hiding a connection
- re-ordering connections
- theming connections
- disabling wsh for a connection
Copy file name to clipboardExpand all lines: docs/docs/connections.mdx
+66Lines changed: 66 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,72 @@ In addition to the regular ssh config file, wave also has its own config file to
76
76
| term:theme | This string can be used to specify a terminal theme for blocks using this connection. The block metadata takes priority over this setting. It defaults to null which means the global setting will be used instead. |
77
77
| ssh:identityfile | A list of strings containing the paths to identity files that will be used. If a `wsh ssh` command using the `-i` flag is successful, the identity file will automatically be added here. |
78
78
79
+
### Example Internal Configurations
80
+
81
+
Here are a couple examples of things you can do using the internal configuration file `connections.json`:
82
+
83
+
#### Hiding a Connection
84
+
85
+
Suppose you have a connection named `github.com` in your `~/.ssh/config` file that shows up as `[email protected]` in the connections dropdown. While it does belong in the config file for authentication reasons, it makes no sense to be in the dropdown since it doesn't involve connecting to a remote environment. In that case, you can hide it as in the example below:
Suppose you have a connection named `rarelyused` that shows up as `myusername@rarelyused:9999` in the connections dropdown. Since it's so rarely used, you would prefer to move it later in the list. In that case, you can move it as in the example below:
100
+
101
+
```json
102
+
{
103
+
<... other connections go here ...>,
104
+
"myusername@rarelyused:9999" : {
105
+
"display:order": 100
106
+
},
107
+
<... other connections go here ...>
108
+
}
109
+
```
110
+
111
+
#### Theming a Connection
112
+
113
+
Suppose you have a connection named `myhost` that shows up as `myusername@myhost` in the connections dropdown. You use this connection a lot, but you keep getting it mixed up with your local connections. In this case, you can use the internal configuration file to style it differently. For example:
114
+
115
+
```json
116
+
{
117
+
<... other connections go here ...>,
118
+
"myusername@myhost" : {
119
+
"term:theme": "warmyellow",
120
+
"term:fontsize": 16,
121
+
"term:fontfamily": "menlo"
122
+
},
123
+
<... other connections go here ...>
124
+
}
125
+
```
126
+
127
+
This style, font size, and font family will then only apply to the widgets that are using this connection.
128
+
129
+
### Disabling Wsh for a Connection
130
+
131
+
While Wave provides an option disable `wsh` when first connecting to a remote, there are cases where you may wish to disable it afterward. The easiest way to do this is by editing the `connections.json` file. Suppose the connection shows up in the dropdown as `root@wshless`. Then you can disable it manually with the following line:
132
+
133
+
```json
134
+
{
135
+
<... other connections go here ...>,
136
+
"root@wshless" : {
137
+
"conn:enablewsh": false,
138
+
},
139
+
<... other connections go here ...>
140
+
}
141
+
```
142
+
143
+
Note that this same line gets added to your `connections.json` file automatically when you choose to disable `wsh` in gui when initially connecting.
144
+
79
145
## Managing Connections with the CLI
80
146
81
147
The `wsh` command gives some commands specifically for interacting with the connections. You can view these [here](/wsh-reference#conn).
0 commit comments