summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSisiutl <sisiutl@egregore.fun>2025-02-01 14:47:15 +0100
committerSisiutl <sisiutl@egregore.fun>2025-02-01 14:58:32 +0100
commit3fa666f957a14a43d81435aafb3c9994f79e3452 (patch)
tree913ec1678929865bcc1f8ae102f73b0552c520cd
parent169a5c0fca9703f45536eb1c5d88d59fcec9572d (diff)
reverse in socket detection
-rw-r--r--sigils/home/services/hyprland.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/sigils/home/services/hyprland.scm b/sigils/home/services/hyprland.scm
index ecf7b0e..117d58e 100644
--- a/sigils/home/services/hyprland.scm
+++ b/sigils/home/services/hyprland.scm
@@ -274,7 +274,11 @@
name)))
(and (string-match regex name)
(access? name O_RDWR)))))
- (or (scandir directory) '())))
+ ;; Hyprland names its sockets according to the timestamp
+ ;; of creation of the Hyprland instance. With `reverse`,
+ ;; we pick up on the last Hyprland instance created
+ ;; (what we always want to do).
+ (or (reverse (scandir directory)) '())))
(define hyprland-instance
(or env-hyprland-instance