From 9c3e2fffbd31c3864ef7edc6212c1c601357f031 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 13 May 2025 17:43:04 +1000 Subject: osd: fix show on hover + show on audio/brightness change --- services/Brightness.qml | 1 + services/Hyprland.qml | 14 ++++++++++++++ 2 files changed, 15 insertions(+) (limited to 'services') diff --git a/services/Brightness.qml b/services/Brightness.qml index ef90511..2de51a0 100644 --- a/services/Brightness.qml +++ b/services/Brightness.qml @@ -95,6 +95,7 @@ Singleton { if (Math.round(brightness * 100) === rounded) return; brightness = value; + console.log(brightness) setProc.command = isDdc ? ["ddcutil", "-b", busNum, "setvcp", "10", rounded] : ["brightnessctl", "s", `${rounded}%`]; setProc.startDetached(); } diff --git a/services/Hyprland.qml b/services/Hyprland.qml index a1f5cbb..515441e 100644 --- a/services/Hyprland.qml +++ b/services/Hyprland.qml @@ -15,6 +15,7 @@ Singleton { readonly property HyprlandWorkspace activeWorkspace: focusedMonitor?.activeWorkspace ?? null readonly property HyprlandMonitor focusedMonitor: Hyprland.focusedMonitor readonly property int activeWsId: activeWorkspace?.id ?? 1 + property point cursorPos function reload() { Hyprland.refreshWorkspaces(); @@ -38,6 +39,19 @@ Singleton { } } + FrameAnimation { + running: true + onTriggered: getCursorPos.running = true + } + + Process { + id: getCursorPos + command: ["hyprctl", "cursorpos"] + stdout: SplitParser { + onRead: data => root.cursorPos = data + } + } + Process { id: getClients command: ["sh", "-c", "hyprctl -j clients | jq -c"] -- cgit v1.2.3-freya