Open equeim opened 10 years ago
i can only make separate application when phone is locked and when it's not locked, not separate action itself
Do you mean check if the phone is locked in bash script (and set .desktop file as application)?
It seems that I've solved this issue :D This script for longtap action will pause music if screen is off or show power menu of screen is on.
#!/bin/bash
status=$(cat /sys/power/wait_for_fb_status)
if [ "$status" == "off" ]; then
dbus-send --session --type=method_call --dest=com.jolla.mediaplayer.remotecontrol /com/jolla/mediaplayer/remotecontrol com.jolla.mediaplayer.remotecontrol.Interface.executeCommand string:"toggle_pause"
else
dbus-send --session --type=method_call --dest=com.jolla.lipstick.PowerMenuDialog /org/coderus/powermenu com.jolla.lipstick.PowerMenuDialogIf.openDialog
fi
Could you add possibility to set actions for volume buttons long tap (e.g. to change tracks)?
No, volume butons can't be overriden this way :)
In cyanogenmod there is an option to pause the music player on power button long tap. I can write .desktop file, but I want to execute it only when screen is off.