bazzite/system_files/desktop/kinoite/usr/bin/system76-scheduler-dbus-proxy
Kyle Gospodnetich cbdb1b3b5f chore: Standardize all bash scripts on #!/usr/bin/bash
chore: Standardize all python scripts on #!/usr/bin/python3
chore: Update path for ds-inhibit patch
chore(readme): Remove unused package
2023-12-23 00:03:35 -08:00

12 lines
502 B
Bash
Executable File

#!/usr/bin/bash
DBUS_SERVICE="com.system76.Scheduler"
DBUS_PATH="/com/system76/Scheduler"
DBUS_INTERFACE="com.system76.Scheduler"
DBUS_METHOD="SetForegroundProcess"
dbus-monitor "destination=$DBUS_SERVICE,path=$DBUS_PATH,interface=$DBUS_INTERFACE,member=$DBUS_METHOD" |
while true; do
read method call time sender _ dest serial path interface member
read type pid
[ "$member" = "member=$DBUS_METHOD" ] && qdbus --system $DBUS_SERVICE $DBUS_PATH $DBUS_INTERFACE.$DBUS_METHOD $pid
done