Slack comes from the AUR and Toolbox from JetBrains' self-updating tarball, so neither is declared: the host installs official packages only, and a pinned archive would fight Toolbox's own updates. Slack's start and the operator's i3 window rules become one node-display-session contribution, because Slack's own launch-on-login is a symlink in ~/.config/autostart. Toolbox keeps its own autostart entry as its one start. The shared desktop.go header now names all four bundles.
53 lines
2.2 KiB
Go
53 lines
2.2 KiB
Go
// The jetbrains-toolbox module's Go tools bundle (novox/hq ADR 0188, ADR 0193, ADR 0208): JetBrains
|
|
// Toolbox, which installs and updates the IDEs, in the operator's session, served by the node's
|
|
// runtime as the operator account. The module holds no seat, so every tool is its own.
|
|
//
|
|
// Toolbox and what it installs are kept as found: the tools read its files and never write them, and
|
|
// no answer carries the JetBrains account or anything from its secure storage.
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
stdio "git.novox.be/novox/mesh-sdk/go"
|
|
)
|
|
|
|
func main() {
|
|
if err := stdio.Serve("", tools()); err != nil {
|
|
fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
var machine = NewMachine()
|
|
|
|
func tools() []stdio.Tool {
|
|
return []stdio.Tool{
|
|
{
|
|
Name: "toolbox_status",
|
|
Description: "JetBrains Toolbox: whether it is installed and its version, whether it runs (pid, since, " +
|
|
"and the unit or session scope), what starts it at login, its switches (launch at login, update " +
|
|
"the tools automatically, shell scripts, theme), and every IDE it installed with its version, " +
|
|
"build, update channel (Release, EAP …), whether it updates itself, and whether it is on disk. " +
|
|
"Never the JetBrains account. (r)",
|
|
Run: func(map[string]any) (any, error) { return machine.Status() },
|
|
},
|
|
{
|
|
Name: "toolbox_restart",
|
|
Description: "End Toolbox (asked first, then forced after 8 s) and start it again minimised to the tray " +
|
|
"in the operator's desktop session, under the account's service manager. The IDEs it launched " +
|
|
"keep running. Answers the pids ended and the new one. Needs someone logged in to the desktop. (a)",
|
|
Run: func(map[string]any) (any, error) { return machine.Restart() },
|
|
},
|
|
{
|
|
Name: "toolbox_check",
|
|
Description: "Check what the module promises: Toolbox is installed where it keeps itself; it starts at " +
|
|
"most once (its own XDG autostart entry, in agreement with its launch-at-login switch; no " +
|
|
"window-manager exec); it runs at most once; every IDE in its list is on disk. Answers ok, each " +
|
|
"finding with what to do, and notes. (r)",
|
|
Run: func(map[string]any) (any, error) { return machine.Check() },
|
|
},
|
|
}
|
|
}
|