From 680378e68fe8ff7aa64b9313b0f73e5a2eb72d29 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 17 Aug 2025 18:15:01 +0700 Subject: [PATCH] clipboard history: make updates happen immediately after change Updates previously wouldn't trigger immediately because no focus = no clipboard grab https://quickshell.org/docs/v0.2.0/types/Quickshell/Quickshell/#clipboardText --- .config/hypr/hyprland/execs.conf | 4 ++-- .config/quickshell/ii/services/Cliphist.qml | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.config/hypr/hyprland/execs.conf b/.config/hypr/hyprland/execs.conf index 6d92de1c..88b64f99 100644 --- a/.config/hypr/hyprland/execs.conf +++ b/.config/hypr/hyprland/execs.conf @@ -18,8 +18,8 @@ exec-once = easyeffects --gapplication-service # Clipboard: history # exec-once = wl-paste --watch cliphist store & -exec-once = wl-paste --type text --watch cliphist store -exec-once = wl-paste --type image --watch cliphist store +exec-once = wl-paste --type text --watch bash -c 'cliphist store && qs -c ii ipc call cliphistService update' +exec-once = wl-paste --type image --watch bash -c 'cliphist store && qs -c ii ipc call cliphistService update' # Cursor exec-once = hyprctl setcursor Bibata-Modern-Classic 24 diff --git a/.config/quickshell/ii/services/Cliphist.qml b/.config/quickshell/ii/services/Cliphist.qml index 6e3f7a1f..3bd9cbc0 100644 --- a/.config/quickshell/ii/services/Cliphist.qml +++ b/.config/quickshell/ii/services/Cliphist.qml @@ -98,4 +98,12 @@ Singleton { } } } + + IpcHandler { + target: "cliphistService" + + function update(): void { + root.refresh() + } + } }