Jump to content

A workflow to check battery charge cycles??


Recommended Posts

@vitor Thanks for the reply

I am new to this workflow thing

i somewhat tried following your steps but couldn’t 😔

i have attached my failed attempt workflow below👇

Could you please correct it for me..

Thanks 🙏 

Screenshot 2021-04-19 at 9.31.16 PM.png

Screenshot 2021-04-19 at 9.31.37 PM.png

Screenshot 2021-04-19 at 9.31.46 PM.png

Link to post
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 post
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 post

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...