From 4f1afdd2527e5def0ec49666e58d6270ad77a6d0 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 26 Feb 2026 19:34:25 +0100 Subject: ... --- accounts/gkleen@sif/niri.nix | 10 +++++++++- accounts/gkleen@sif/shell/quickshell/Lockscreen.qml | 7 ------- .../shell/quickshell/NotificationInhibitorWidget.qml | 2 +- accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml | 3 +++ accounts/gkleen@sif/shell/quickshell/Services/Worktime.qml | 9 +++++++++ 5 files changed, 22 insertions(+), 9 deletions(-) (limited to 'accounts') diff --git a/accounts/gkleen@sif/niri.nix b/accounts/gkleen@sif/niri.nix index d676f613..3918efcb 100644 --- a/accounts/gkleen@sif/niri.nix +++ b/accounts/gkleen@sif/niri.nix @@ -933,7 +933,15 @@ in { "Mod+D".action = with-urgent-window-action "{\"Action\":{\"FocusWindow\":{\"id\": .id}}}"; "Mod+Shift+D".action = with-focused-window-action "{\"Action\":{\"UnsetUrgent\":{\"id\": .id}}}"; - "Mod+K".action = spawn (lib.getExe' pkgs.worktime "worktime-ui"); + "Mod+K".action = spawn (toString (pkgs.resholve.writeScript "worktime-ui" { + interpreter = pkgs.runtimeShell; + inputs = [ pkgs.worktime config.programs.quickshell.package ]; + execer = [ + "cannot:${lib.getExe' config.programs.quickshell.package "qs"}" + ]; + } '' + worktime-ui && qs ipc call Worktime refresh + '')); "Mod+Shift+K".action = spawn (lib.getExe' pkgs.worktime "worktime-stop"); })) (lib.mapAttrsToList (name: cfg: node name [(lib.removeAttrs cfg ["action"])] [cfg.action]) (let diff --git a/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml b/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml index 996fd41b..fc2e1f9f 100644 --- a/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml +++ b/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml @@ -31,13 +31,6 @@ Scope { } } - IpcHandler { - target: "Lockscreen" - - function setLocked(locked: bool): void { lock.locked = locked; } - function getLocked(): bool { return lock.locked; } - } - Connections { target: Custom.Systemd function onSleep(before: bool) { diff --git a/accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml b/accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml index b58467b3..80cbba19 100644 --- a/accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml +++ b/accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml @@ -70,7 +70,7 @@ Item { sourceComponent: PopupWindow { id: tooltip - property bool nextVisible: NotificationManager.active && (widgetMouseArea.containsMouse || tooltipMouseArea.containsMouse) + property bool nextVisible: NotificationManager.active && NotificationManager.history.length > 0 && (widgetMouseArea.containsMouse || tooltipMouseArea.containsMouse) anchor { item: widgetMouseArea diff --git a/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml b/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml index 58201bd2..6dbff134 100644 --- a/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml +++ b/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml @@ -11,6 +11,7 @@ Singleton { property var outputs: {} property var keyboardLayouts: {} property var windows: [] + property var casts: [] readonly property string socketPath: Quickshell.env("NIRI_SOCKET") function refreshOutputs() { @@ -71,6 +72,8 @@ Singleton { eventWindowLayoutsChanged(event.WindowLayoutsChanged); else if (event.WindowFocusTimestampChanged) eventWindowFocusTimestampChanged(event.WindowFocusTimestampChanged); + else if (event.CastsChanged) + root.casts = event.CastsChanged.casts else if (event.Ok && !eventStreamSocket.acked) { eventStreamSocket.acked = true; } else if (event.OverviewOpenedOrClosed) {} else if (event.ConfigLoaded) {} diff --git a/accounts/gkleen@sif/shell/quickshell/Services/Worktime.qml b/accounts/gkleen@sif/shell/quickshell/Services/Worktime.qml index fdb45aa0..d98378f1 100644 --- a/accounts/gkleen@sif/shell/quickshell/Services/Worktime.qml +++ b/accounts/gkleen@sif/shell/quickshell/Services/Worktime.qml @@ -20,6 +20,15 @@ Singleton { command: "today" } + IpcHandler { + target: "Worktime" + + function refresh(): void { + time.running = true; + today.running = true; + } + } + component CommandState : Scope { id: commandState -- cgit v1.2.3