feat(sideright): add Flatpak support for EasyEffects service and toggle

This commit is contained in:
0blivi0nis 2025-09-17 23:49:45 +00:00
parent c41364fb16
commit 103d349c5f
2 changed files with 5 additions and 5 deletions

View file

@ -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
} }

View file

@ -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
} }