From 60ed23734d4febd57c183308b9f5ddbcd27642bc Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Tue, 13 Jan 2026 14:48:15 -0500 Subject: [PATCH] remove --settings --- README.md | 2 +- data/io.github.alyraffauf.Switchyard.desktop | 4 ---- src/main.go | 22 ++------------------ 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index cc9ab69..0f75f8a 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Or use your desktop environment's settings to set Switchyard as the default brow ```bash # Open settings -switchyard --settings +switchyard # Open a URL (typically called automatically by the system) switchyard "https://example.com" diff --git a/data/io.github.alyraffauf.Switchyard.desktop b/data/io.github.alyraffauf.Switchyard.desktop index deac10b..10ba043 100644 --- a/data/io.github.alyraffauf.Switchyard.desktop +++ b/data/io.github.alyraffauf.Switchyard.desktop @@ -10,7 +10,3 @@ Categories=Network;WebBrowser; MimeType=x-scheme-handler/http;x-scheme-handler/https; StartupNotify=true Keywords=browser;web;url;link; - -[Desktop Action Settings] -Name=Settings -Exec=switchyard --settings diff --git a/src/main.go b/src/main.go index 5c92860..42959d4 100644 --- a/src/main.go +++ b/src/main.go @@ -18,17 +18,7 @@ import ( const appID = "io.github.alyraffauf.Switchyard" -var showSettings bool - func main() { - // Parse flags before GTK takes over - for _, arg := range os.Args[1:] { - if arg == "--settings" || arg == "-settings" { - showSettings = true - break - } - } - app := adw.NewApplication(appID, gio.ApplicationHandlesOpen) app.ConnectActivate(func() { @@ -36,7 +26,7 @@ func main() { }) app.ConnectOpen(func(files []gio.Filer, hint string) { - if showSettings || len(files) == 0 { + if len(files) == 0 { showSettingsWindow(app) return } @@ -45,15 +35,7 @@ func main() { handleURL(app, url) }) - // Filter out our custom flags before passing to GTK - gtkArgs := []string{os.Args[0]} - for _, arg := range os.Args[1:] { - if arg != "--settings" && arg != "-settings" { - gtkArgs = append(gtkArgs, arg) - } - } - - if code := app.Run(gtkArgs); code > 0 { + if code := app.Run(os.Args); code > 0 { os.Exit(code) } } -- 2.51.2