Rohit Posted April 16, 2021 Share Posted April 16, 2021 Does anyone have a workflow to check battery charge cycles?? Link to comment
vitor Posted April 19, 2021 Share Posted April 19, 2021 All you need is a Run Script Action with default settings and the following code: system_profiler SPPowerDataType | grep "Cycle Count" | awk '{print $3}'. Then however you invoke it (e.g. Keyword Input) and how it outputs the information (e.g. Post Notification Output) is up to your preference. Rohit 1 Link to comment
Rohit Posted April 19, 2021 Author Share Posted April 19, 2021 @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 🙏 Link to comment
vitor Posted April 19, 2021 Share Posted April 19, 2021 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}' . Rohit 1 Link to comment
Rohit Posted April 19, 2021 Author Share Posted April 19, 2021 it worked..Yipeeee🥳 Thank You... just one thing instead of showing notification can i show it to alfred search box ?? Link to comment
giovanni Posted April 20, 2021 Share Posted April 20, 2021 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 Rohit 1 Link to comment
Guest Posted December 27, 2021 Share Posted December 27, 2021 I am new to here... Could you share the workflow with us? I would appreciate if you do this. Thanks! Link to comment
giovanni Posted January 4, 2022 Share Posted January 4, 2022 sure, please find it here. double click to install, keyword is `battery`, or you can set a hotkey Link to comment
Primaniac Posted May 6, 2022 Share Posted May 6, 2022 (edited) 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 May 6, 2022 by Primaniac Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now