Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: add springboard homescreen-icon-metrics subcommand (#1252) #1254

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pymobiledevice3/cli/springboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from pymobiledevice3.cli.cli_common import Command, print_json
from pymobiledevice3.lockdown import LockdownClient
from pymobiledevice3.lockdown_service_provider import LockdownServiceProvider
from pymobiledevice3.services.springboard import SpringBoardServicesService

SHELL_USAGE = '''
Expand Down Expand Up @@ -78,3 +79,10 @@ def springboard_wallpaper_preview_image(service_provider: LockdownClient, wallpa
if reload:
springboard_service.reload_icon_state()
out.write(springboard_service.get_wallpaper_preview_image(wallpaper_name))


@springboard.command('homescreen-icon-metrics', cls=Command)
def springboard_homescreen_icon_metrics(service_provider: LockdownServiceProvider) -> None:
""" Get homescreen icon metrics """
with SpringBoardServicesService(lockdown=service_provider) as springboard_service:
print_json(springboard_service.get_homescreen_icon_metrics())
Loading