forked from Shinonome/dots-hyprland
fixes and youtube button
This commit is contained in:
@@ -23,7 +23,7 @@ function findSuitableMaterialSymbol(summary = "") {
|
|||||||
'ai response': 'neurology',
|
'ai response': 'neurology',
|
||||||
'control': 'settings',
|
'control': 'settings',
|
||||||
'upsca': 'compare',
|
'upsca': 'compare',
|
||||||
'music': 'music_note',
|
'music': 'queue_music',
|
||||||
'install': 'deployed_code_update',
|
'install': 'deployed_code_update',
|
||||||
'startswith:file': 'folder_copy', // Declarative startsWith check
|
'startswith:file': 'folder_copy', // Declarative startsWith check
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -29,7 +29,7 @@ AndroidQuickToggleButton {
|
|||||||
}
|
}
|
||||||
musicReconizedProc.running = true
|
musicReconizedProc.running = true
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
Quickshell.execDetached(["notify-send", "Unable to recognize music", "Please make sure your music is playing and try again", "-a", "Shell"])
|
Quickshell.execDetached(["notify-send", Translation.tr("Unable to recognize music"), Translation.tr("Please make sure your music is playing and try again"), "-a", "Shell"])
|
||||||
} finally {
|
} finally {
|
||||||
root.toggled = false
|
root.toggled = false
|
||||||
}
|
}
|
||||||
@@ -64,12 +64,16 @@ AndroidQuickToggleButton {
|
|||||||
Translation.tr("Music Recognized"),
|
Translation.tr("Music Recognized"),
|
||||||
root.recognizedTrack.title + " - " + root.recognizedTrack.subtitle,
|
root.recognizedTrack.title + " - " + root.recognizedTrack.subtitle,
|
||||||
"-A", "Shazam",
|
"-A", "Shazam",
|
||||||
|
"-A", "YouTube",
|
||||||
"-a", "Shell"
|
"-a", "Shell"
|
||||||
]
|
]
|
||||||
stdout: StdioCollector {
|
stdout: StdioCollector {
|
||||||
onStreamFinished: {
|
onStreamFinished: {
|
||||||
if (this.text !== ""){
|
if (this.text === "") return
|
||||||
|
if (this.text == 0){
|
||||||
Qt.openUrlExternally(root.recognizedTrack.url);
|
Qt.openUrlExternally(root.recognizedTrack.url);
|
||||||
|
} else {
|
||||||
|
Qt.openUrlExternally("https://www.youtube.com/results?search_query=" + root.recognizedTrack.title + " - " + root.recognizedTrack.subtitle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
## can be added manually if not chosen automatically with running this on terminal 'pw-cli list-objects | grep node.name'
|
## can be added manually if not chosen automatically with running this on terminal 'pw-cli list-objects | grep node.name' and manually choose the one you want.
|
||||||
MONITOR_SOURCE=$(pactl list short sources 2>/dev/null | grep -m1 monitor | awk '{print $2}' || true)
|
MONITOR_SOURCE=$(pactl list short sources 2>/dev/null | grep -m1 monitor | awk '{print $2}' || true)
|
||||||
|
|
||||||
INTERVAL=5
|
INTERVAL=5
|
||||||
|
|||||||
Reference in New Issue
Block a user