forked from Shinonome/dots-hyprland
feat(sideright): add Flatpak support for EasyEffects service and toggle (#2013)
This commit is contained in:
@@ -21,7 +21,7 @@ QuickToggleButton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
altAction: () => {
|
altAction: () => {
|
||||||
Quickshell.execDetached(["easyeffects"])
|
Quickshell.execDetached(["bash", "-c", "flatpak run com.github.wwmm.easyeffects || easyeffects"])
|
||||||
GlobalStates.sidebarRightOpen = false
|
GlobalStates.sidebarRightOpen = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ Singleton {
|
|||||||
|
|
||||||
function disable() {
|
function disable() {
|
||||||
root.active = false
|
root.active = false
|
||||||
Quickshell.execDetached(["pkill", "easyeffects"])
|
Quickshell.execDetached(["bash", "-c", "pkill easyeffects || flatpak pkill com.github.wwmm.easyeffects"])
|
||||||
}
|
}
|
||||||
|
|
||||||
function enable() {
|
function enable() {
|
||||||
root.active = true
|
root.active = true
|
||||||
Quickshell.execDetached(["easyeffects", "--gapplication-service"])
|
Quickshell.execDetached(["bash", "-c", "easyeffects --gapplication-service || flatpak run com.github.wwmm.easyeffects --gapplication-service"])
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggle() {
|
function toggle() {
|
||||||
@@ -44,7 +44,7 @@ Singleton {
|
|||||||
Process {
|
Process {
|
||||||
id: fetchAvailabilityProc
|
id: fetchAvailabilityProc
|
||||||
running: true
|
running: true
|
||||||
command: ["bash", "-c", "command -v easyeffects"]
|
command: ["bash", "-c", "command -v easyeffects || flatpak info com.github.wwmm.easyeffects > /dev/null 2>&1"]
|
||||||
onExited: (exitCode, exitStatus) => {
|
onExited: (exitCode, exitStatus) => {
|
||||||
root.available = exitCode === 0
|
root.available = exitCode === 0
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,7 @@ Singleton {
|
|||||||
Process {
|
Process {
|
||||||
id: fetchActiveStateProc
|
id: fetchActiveStateProc
|
||||||
running: true
|
running: true
|
||||||
command: ["pidof", "easyeffects"]
|
command: ["bash", "-c", "pidof easyeffects || flatpak ps | grep com.github.wwmm.easyeffects > /dev/null 2>&1"]
|
||||||
onExited: (exitCode, exitStatus) => {
|
onExited: (exitCode, exitStatus) => {
|
||||||
root.active = exitCode === 0
|
root.active = exitCode === 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user