Know which machine you are on
Every tab ends its folder line with the machine it runs on: • workshop. In
the VCode app on app.fezu.dev it is the box the tab lives on, so tabs from
several boxes in one strip each name their own.
Why you would use it
You run VCode on more than one box (a desktop and a file server), and both are bookmarked on the same phone behind the same login page. The two look identical until something names the machine.
How to use it
Look at the tab in the strip (
#tabstrip) or in the drawer. Under its name is its folder, and after the folder,•and the machine (.fmachine).
In the app, a tab whose box refused this device shows the refusal in the banner above the composer. Tap the banner and that box's screen opens: its pair screen, key screen or version screen (work-on-several-boxes).
What you see
- The name as the operator set it in
VCODE_NAME, or the machine's hostname when that is unset. In the app, the name the box has on your fezu.dev account. - A long folder is cut with an ellipsis; the machine after it is not.
- No machine at all if the box did not answer with its name. The app carries on without it.
- The status bar does not repeat it.
Options and settings
| Option | Default | What it changes |
|---|---|---|
VCODE_NAME |
the machine's hostname | The name shown on each tab |
VCODE_URL |
(empty) | This machine's public URL; nothing in the UI shows it today |
VCODE_PEERS |
(empty) | Sibling machines, name|url comma separated. The server returns them with its name; nothing in the UI reads them today |
Set them in ~/.config/v-code/env (see
environment-variables) and
restart the unit.
Limits and known gaps
- There is no server switcher.
VCODE_PEERSis parsed, validated and returned by the API, but nothing draws it. Link both boxes to the account and their tabs share one strip in the app. - A malformed
VCODE_PEERSentry fails the boot rather than disappearing quietly: each entry must bename|url, the name must be non-empty, and the URL must behttp(s)://…or empty. - The name is read once per load with a 5-second timeout. A machine renamed while the app is open keeps the old name until the page reloads.
Related
- status-bar: the facts about the tab, without the machine
- work-on-several-boxes: the app, where each tab names its box
- environment-variables: where
VCODE_NAMEis set - reach-it-from-a-phone: giving a machine a public URL