add xterm settings to the config

This commit is contained in:
Jeff Carr 2025-01-16 10:26:19 -06:00
parent 49a06843e9
commit 2398e30048
2 changed files with 12 additions and 0 deletions

View File

@ -39,4 +39,6 @@ message ForgeConfigs { // `autogenpb:marshal` `autogenpb:nomutex`
string version = 2; // could be used for protobuf schema change violations?
repeated ForgeConfig ForgeConfigs = 3;
string username = 4; // what to use for the user branch (default ENV{USER})
string xterm = 14; // what xterm the user wants as the default
repeated string xtermArgv = 15; // the argv line for xterm
}

10
init.go
View File

@ -28,6 +28,16 @@ func Init() *Forge {
f.Config.Username = usr.Username
f.SetConfigSave(true)
}
if f.Config.Xterm == "" {
f.Config.Xterm = "xterm"
f.Config.XtermArgv = append(f.Config.XtermArgv, "-bg")
f.Config.XtermArgv = append(f.Config.XtermArgv, "black")
f.Config.XtermArgv = append(f.Config.XtermArgv, "-fg")
f.Config.XtermArgv = append(f.Config.XtermArgv, "white")
f.SetConfigSave(true)
}
f.Machine.InitWit()
now := time.Now()