forked from Shinonome/dots-hyprland
Fix dock first launch (#2707)
This commit is contained in:
@@ -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
|
exec-once = hyprctl setcursor Bibata-Modern-Classic 24
|
||||||
|
|
||||||
# Fix dock pinned apps not launching properly (https://github.com/end-4/dots-hyprland/issues/2200)
|
# 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
|
# For fedora to setup polkit
|
||||||
exec-once = /usr/libexec/kf6/polkit-kde-authentication-agent-1
|
exec-once = /usr/libexec/kf6/polkit-kde-authentication-agent-1
|
||||||
|
|||||||
@@ -19,22 +19,17 @@ DockButton {
|
|||||||
|
|
||||||
readonly property bool isSeparator: appToplevel.appId === "SEPARATOR"
|
readonly property bool isSeparator: appToplevel.appId === "SEPARATOR"
|
||||||
property var desktopEntry: DesktopEntries.heuristicLookup(appToplevel.appId)
|
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
|
enabled: !isSeparator
|
||||||
implicitWidth: isSeparator ? 1 : implicitHeight - topInset - bottomInset
|
implicitWidth: isSeparator ? 1 : implicitHeight - topInset - bottomInset
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: DesktopEntries
|
||||||
|
|
||||||
|
function onApplicationsChanged() {
|
||||||
|
root.desktopEntry = DesktopEntries.heuristicLookup(appToplevel.appId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
active: isSeparator
|
active: isSeparator
|
||||||
anchors {
|
anchors {
|
||||||
|
|||||||
Reference in New Issue
Block a user