Fix dock first launch (#2707)

This commit is contained in:
Minh
2026-03-04 23:33:12 +01:00
committed by GitHub
2 changed files with 9 additions and 14 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ exec-once = wl-paste --type image --watch bash -c 'cliphist store && qs -c $qsCo
exec-once = hyprctl setcursor Bibata-Modern-Classic 24
# Fix dock pinned apps not launching properly (https://github.com/end-4/dots-hyprland/issues/2200)
exec-once = sleep 3.5 && hyprctl reload && sleep 0.5 && touch ~/.config/quickshell/ii/shell.qml
# exec-once = sleep 3.5 && hyprctl reload && sleep 0.5 && touch ~/.config/quickshell/ii/shell.qml
# For fedora to setup polkit
exec-once = /usr/libexec/kf6/polkit-kde-authentication-agent-1
@@ -19,22 +19,17 @@ DockButton {
readonly property bool isSeparator: appToplevel.appId === "SEPARATOR"
property var desktopEntry: DesktopEntries.heuristicLookup(appToplevel.appId)
Timer {
// Retry looking up the desktop entry if it failed (e.g. database not loaded yet)
property int retryCount: 5
interval: 1000
running: !root.isSeparator && root.desktopEntry === null && retryCount > 0
repeat: true
onTriggered: {
retryCount--;
root.desktopEntry = DesktopEntries.heuristicLookup(root.appToplevel.appId);
}
}
enabled: !isSeparator
implicitWidth: isSeparator ? 1 : implicitHeight - topInset - bottomInset
Connections {
target: DesktopEntries
function onApplicationsChanged() {
root.desktopEntry = DesktopEntries.heuristicLookup(appToplevel.appId);
}
}
Loader {
active: isSeparator
anchors {