aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2022-09-24 11:54:35 +0200
committerMiguel Ángel Moreno <mail@migalmoreno.com>2023-03-15 12:19:31 +0100
commit79de2c0dd1d39825b4247758cdcdb53b9411f377 (patch)
treeed58f8e8fe58d6c764c903acf4b98446ed6913f8
parent4b82f38529276208ed35853539ae965ac9b31ff8 (diff)
feat: Add note for delay and extra check at startup
-rw-r--r--nyxt.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/nyxt.el b/nyxt.el
index 5743d6c..046ec0d 100644
--- a/nyxt.el
+++ b/nyxt.el
@@ -122,7 +122,10 @@ it switches to its corresponding workspace."
If FOCUS, change focus to the Nyxt exwm workspace. If AUTOSTART is non-nil
and a Nyxt system process is not found, it will automatically create one and
-connect Slynk to it."
+connect Slynk to it.
+
+Additionally, you may specify an AUTOSTART-DELAY to invoke Nyxt features that
+might require some delay to be correctly loaded."
(let* ((sly-log-events nil)
(sly-default-connection (or (nyxt--slynk-connected-p)
(when (or nyxt-process
@@ -145,7 +148,8 @@ connect Slynk to it."
((string-match (rx (: (+ any) "Slynk server started at port")) output)
(run-at-time autostart-delay nil
(lambda ()
- (while (not (sly-connected-p))
+ (while (or (not (sly-connected-p))
+ (not (nyxt--slynk-connected-p)))
(nyxt-connect-to-slynk)
(sleep-for 0.1))
(nyxt-sly-eval sexps)