From d49e316676442286f7d6e9399c26ebdcdf2c5212 Mon Sep 17 00:00:00 2001 From: Philipp Keck Date: Sun, 5 Feb 2023 22:07:42 +0100 Subject: [PATCH] Allow customizing the window title with an environment variable This allows me to configure `title=GitnuroDEV` in my IDE's run config for the app, to distinguish the dev version that I'm running to test it from the prod version I'm running to stage/commit stuff. --- src/main/kotlin/com/jetpackduba/gitnuro/App.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/App.kt b/src/main/kotlin/com/jetpackduba/gitnuro/App.kt index 5cc0364..9decabd 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/App.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/App.kt @@ -100,7 +100,7 @@ class App { if (isOpen) { Window( - title = AppConstants.APP_NAME, + title = System.getenv("title") ?: AppConstants.APP_NAME, onCloseRequest = { isOpen = false },