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