forked from Shinonome/dots-hyprland
Merge branch 'end-4:main' into parallax
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -77,7 +77,7 @@ Item { // Player instance
|
||||
id: coverArtDownloader
|
||||
property string targetFile: root.artUrl
|
||||
property string artFilePath: root.artFilePath
|
||||
command: [ "bash", "-c", `[ -f ${artFilePath} ] || curl -sSL '${targetFile}' -o '${artFilePath}'` ]
|
||||
command: [ "bash", "-c", `[ -f ${artFilePath} ] || curl -4 -sSL '${targetFile}' -o '${artFilePath}'` ]
|
||||
onExited: (exitCode, exitStatus) => {
|
||||
root.downloaded = true
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import Quickshell
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
signal requestCenter(string identifier)
|
||||
|
||||
readonly property list<var> availableWidgets: [
|
||||
{ identifier: "crosshair", materialSymbol: "point_scan" },
|
||||
{ identifier: "fpsLimiter", materialSymbol: "animation" },
|
||||
|
||||
@@ -119,6 +119,7 @@ Rectangle {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
toggled: Persistent.states.overlay.open.includes(identifier)
|
||||
altAction: () => OverlayContext.requestCenter(identifier)
|
||||
onClicked: {
|
||||
if (widgetButton.toggled) {
|
||||
Persistent.states.overlay.open = Persistent.states.overlay.open.filter(type => type !== identifier);
|
||||
|
||||
@@ -105,6 +105,15 @@ AbstractOverlayWidget {
|
||||
reportClickableState();
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: OverlayContext
|
||||
function onRequestCenter(identifier) {
|
||||
if (identifier === root.identifier) {
|
||||
root.center()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hooks
|
||||
onPressed: (event) => {
|
||||
// We're only interested in handling resize here
|
||||
|
||||
@@ -63,7 +63,7 @@ Item {
|
||||
|
||||
Process {
|
||||
id: translateProc
|
||||
command: ["bash", "-c", `trans -brief`
|
||||
command: ["bash", "-c", `trans -brief -no-bidi`
|
||||
+ ` -source '${StringUtils.shellSingleQuoteEscape(root.sourceLanguage)}'`
|
||||
+ ` -target '${StringUtils.shellSingleQuoteEscape(root.targetLanguage)}'`
|
||||
+ ` '${StringUtils.shellSingleQuoteEscape(root.inputField.text.trim())}'`]
|
||||
|
||||
Reference in New Issue
Block a user