diff --git a/dev.deedles.Trayscale.gschema.xml b/dev.deedles.Trayscale.gschema.xml
index 3333dc15..1b726e4a 100644
--- a/dev.deedles.Trayscale.gschema.xml
+++ b/dev.deedles.Trayscale.gschema.xml
@@ -10,6 +10,11 @@
example, display the current Tailscale connection status.
+
+ true
+ Show Notification on Startup
+ When enabled, shows a notification when the application starts
+
5
Interval at which to poll the Tailscale daemon
diff --git a/internal/ui/app.go b/internal/ui/app.go
index 8a85e622..cea04ab4 100644
--- a/internal/ui/app.go
+++ b/internal/ui/app.go
@@ -170,7 +170,11 @@ func (a *App) update(s tsutil.Status) {
if online {
body = "Tailscale is connected."
}
- a.notify("Tailscale Status", body) // TODO: Notify on startup if not connected?
+ showNotification := a.settings.Boolean("show-notification-on-startup")
+ if showNotification {
+ a.notify("Tailscale Status", body) // TODO: Notify on startup if not connected?
+
+ }
}
if a.win == nil {
return
diff --git a/internal/ui/preferences.go b/internal/ui/preferences.go
index e21280f5..56690e72 100644
--- a/internal/ui/preferences.go
+++ b/internal/ui/preferences.go
@@ -13,9 +13,10 @@ var preferencesXML string
type PreferencesWindow struct {
*adw.PreferencesWindow `gtk:"PreferencesWindow"`
- UseTrayIconRow *adw.SwitchRow
- PollingIntervalRow *adw.SpinRow
- PollingIntervalAdjustment *gtk.Adjustment
+ UseTrayIconRow *adw.SwitchRow
+ PollingIntervalRow *adw.SpinRow
+ ShowNotificationOnStartupRow *adw.SwitchRow
+ PollingIntervalAdjustment *gtk.Adjustment
}
func NewPreferencesWindow() *PreferencesWindow {
diff --git a/internal/ui/preferences.ui b/internal/ui/preferences.ui
index c4f8b416..1ca217f3 100644
--- a/internal/ui/preferences.ui
+++ b/internal/ui/preferences.ui
@@ -15,6 +15,12 @@
Use Tray Icon
+
+
+