From 89203e8794727a9040f94e098ee42efb0dc21dbd Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Thu, 29 May 2025 11:41:58 +0200 Subject: [PATCH] cliphist service: delay a bit before grabbing entries from cliphist --- .config/quickshell/services/Cliphist.qml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/services/Cliphist.qml b/.config/quickshell/services/Cliphist.qml index 0178367f9..d0193f144 100644 --- a/.config/quickshell/services/Cliphist.qml +++ b/.config/quickshell/services/Cliphist.qml @@ -46,7 +46,16 @@ Singleton { Connections { target: Quickshell function onClipboardTextChanged() { - root.refresh() // TODO: Account for race condition with cliphist + delayedUpdateTimer.restart() + } + } + + Timer { + id: delayedUpdateTimer + interval: ConfigOptions.hacks.arbitraryRaceConditionDelay + repeat: false + onTriggered: { + root.refresh() } }