Jump to content

A workflow to check battery charge cycles??


Recommended Posts

7 minutes ago, Rohit said:

Could you please correct it for me

 

When copying code, you need to do it exactly.

 

I wrote:

 

system_profiler SPPowerDataType | grep "Cycle Count" | awk '{print $3}'

 

And you did:

 

system_profiler SPPowerDataType
grep "Cycle Count"
awk '{print $3}'
.

 

Link to comment
19 hours ago, Rohit said:

just one thing instead of showing notification can i show it to alfred search box ??

try this: replace 'Run Script' with 'Script Filter', set to 'No Argument', and use this code: 

 

myCycleCount="$(system_profiler SPPowerDataType | grep "Cycle Count" | awk '{print $3}')"

cat << EOB

	{"items": [


    {
        "title": "My Cycle Count: $myCycleCount",
        "subtitle": "anything else you want to show",
        "arg": "any arguments you want to pass"
	}
]}
EOB

 

 

Link to comment
  • 8 months later...
  • 2 weeks later...
  • 4 months later...

I have updated an older Battery workflow that was pretty popular until it stopped working. This has been fixed for Apple Silicon and new information in Big Sur and later. It is still pending the PR acceptance, but if you want to try it out for now, you can use it from here.

Edited by Primaniac
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...