feat: support custom --config path in CLI and GUI
Add config.LoadFrom/SaveTo for arbitrary paths and thread a --config flag through both entry points: - CLI: --config loads a file first; explicit flags override file values - GUI: --config selects the settings file used for load and save - tests for LoadFrom/SaveTo and default fallback
This commit is contained in:
@@ -3,12 +3,21 @@
|
||||
//
|
||||
// The streaming engine lives in internal/flinger; this command only wires the
|
||||
// GUI and tray around it. Headless use is handled by cmd/teleportfling.
|
||||
//
|
||||
// Usage:
|
||||
//
|
||||
// teleportfling-gui [--config PATH]
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
|
||||
"teleportfling/internal/gui"
|
||||
)
|
||||
|
||||
func main() {
|
||||
gui.Run()
|
||||
configPath := flag.String("config", "", "config file path (default: ~/.config/teleportfling/config.json)")
|
||||
flag.Parse()
|
||||
|
||||
gui.Run(*configPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user