{"id":445,"date":"2024-03-08T11:44:06","date_gmt":"2024-03-08T03:44:06","guid":{"rendered":"http:\/\/www.wengdao.net\/?p=445"},"modified":"2024-06-25T10:16:48","modified_gmt":"2024-06-25T02:16:48","slug":"%e5%85%b3%e4%ba%8e-mbp-battery","status":"publish","type":"post","link":"https:\/\/jiandao.zliby.com\/?p=445","title":{"rendered":"\u5173\u4e8e mbp Battery \u7535\u6e90\u7ba1\u7406"},"content":{"rendered":"\n<p><strong>Battery\uff1aApple Silicon MacBook \u8bbe\u5907\u7684\u7535\u6c60\u5145\u7535\u9650\u5236\u5668<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5de5\u5177\u7b80\u4ecb<\/h3>\n\n\n\n<p>Battery \u662f\u4e00\u4e2a\u9002\u7528\u4e8e Apple Silicon MacBook \u8bbe\u5907\u7684\u514d\u8d39\u4e14\u5f00\u6e90\u7684\u7535\u6c60\u5145\u7535\u9650\u5236\u5668\u3002\u901a\u8fc7\u8be5\u5de5\u5177\uff0c\u6211\u4eec\u53ef\u4ee5\u9650\u5236 MacBook \u5728\u63d2\u5165\u7535\u6e90\u65f6\u7684\u5145\u7535\u884c\u4e3a\uff0c\u4f7f\u5f97\u7535\u6c60\u59cb\u7ec8\u4fdd\u6301\u5728 80% \u7535\u91cf\uff0c\u4ece\u800c\u5ef6\u957f\u7535\u6c60\u7684\u4f7f\u7528\u5bff\u547d\u3002<\/p>\n\n\n\n<p>\u5730\u5740: https:\/\/github.com\/actuallymentor\/battery<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b89\u88c5\u65b9\u6cd5<\/h3>\n\n\n\n<ol>\n<li>\u901a\u8fc7 Homebrew \u5b89\u88c5<\/li>\n\n\n\n<li>\u4e0b\u8f7d\u6700\u65b0\u7684\u5e94\u7528\u7a0b\u5e8f dmg \u7248\u672c\u3002<\/li>\n\n\n\n<li>\u4ec5\u547d\u4ee4\u884c\u5b89\u88c5\uff08\u8be6\u60c5\u8bf7\u89c1\u4e0b\u6587\uff09<\/li>\n<\/ol>\n\n\n\n<p>\u7b2c\u4e00\u6b21\u6253\u5f00\u8be5\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u5b83\u4f1a\u8be2\u95ee\u60a8\u7684\u7ba1\u7406\u5458\u5bc6\u7801\uff0c\u4ee5\u4fbf\u5b89\u88c5\u6240\u9700\u7684\u7ec4\u4ef6\u3002\u8bf7\u6ce8\u610f\uff0c\u8be5\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u5373\u4f7f\u5df2\u63d2\u5165<\/strong>\u7535\u6e90\uff0c\u4e5f\u4f1a\u5c06\u7535\u6c60\u653e\u7535\u76f4\u81f3\u7535\u91cf\u8fbe\u5230 80%<strong><\/strong><\/li>\n\n\n\n<li>\u5f53\u7535\u6c60\u7535\u91cf\u9ad8\u4e8e 80% \u65f6\u7981\u7528\u5145\u7535<\/li>\n\n\n\n<li>\u5f53\u7535\u6c60\u7535\u91cf\u4f4e\u4e8e 80% \u65f6\u542f\u7528\u5145\u7535<\/li>\n\n\n\n<li>\u5373\u4f7f\u91cd\u65b0\u542f\u52a8\u540e\u4ecd\u4fdd\u6301\u9650\u5236<\/li>\n\n\n\n<li>\u5373\u4f7f\u5173\u95ed\u6258\u76d8\u5e94\u7528\u7a0b\u5e8f\u540e\u4ecd\u4fdd\u6301\u9650\u5236<\/li>\n\n\n\n<li>\u8fd8\u4f1a\u81ea\u52a8\u5b89\u88c5<code class=\"prettyprint\" >battery<\/code>\u547d\u4ee4\u884c\u5de5\u5177\u3002\u5982\u679c\u60a8\u60f3\u8981\u81ea\u5b9a\u4e49\u6536\u8d39\u767e\u5206\u6bd4\uff0cCLI \u662f\u552f\u4e00\u7684\u65b9\u6cd5\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f7f\u7528\u8bf4\u660e<\/h3>\n\n\n\n<p>Battery \u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u5de5\u5177\u6216\u8005 GUI \u5e94\u7528\u7a0b\u5e8f\u8fdb\u884c\u4f7f\u7528\u3002\u547d\u4ee4\u884c\u5de5\u5177\u63d0\u4f9b\u4e86\u591a\u79cd\u529f\u80fd\uff0c\u4f8b\u5982\u8bbe\u7f6e\u5145\u7535\u767e\u5206\u6bd4\u3001\u624b\u52a8\u542f\u7528\/\u7981\u7528\u5145\u7535\u3001\u67e5\u770b\u7535\u6c60\u72b6\u6001\u7b49\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"text-transform:uppercase\">\u5b89\u88c5dmg\u5305\u7248\u672c<\/h3>\n\n\n\n<p>https:\/\/github.com\/actuallymentor\/battery\/releases<a href=\"\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"text-transform:uppercase\">\u5b89\u88c5\u547d\u4ee4\u884c\u7248\u672c<\/h3>\n\n\n\n<p>\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n\n\n\n<p><code class=\"prettyprint\" >curl -s https:\/\/raw.githubusercontent.com\/actuallymentor\/battery\/main\/setup.sh | bash<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"text-transform:uppercase\">brew\u547d\u4ee4\u884c\u7248\u672c<\/h3>\n\n\n\n<p><code class=\"prettyprint\" >brew install battery<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f7f\u7528\u793a\u4f8b<\/h3>\n\n\n\n<ul>\n<li>\u542f\u7528\u5145\u7535\u7ef4\u6301\u529f\u80fd\uff0c\u9650\u5236\u7535\u6c60\u5145\u7535\u81f3 80%\uff1a<\/li>\n<\/ul>\n\n\n\n<p><code class=\"prettyprint\" >battery maintain 80<\/code><\/p>\n\n\n\n<ul>\n<li>\u624b\u52a8\u542f\u7528\u5145\u7535\uff1a<\/li>\n<\/ul>\n\n\n\n<p><code class=\"prettyprint\" >battery charging on<\/code><\/p>\n\n\n\n<ul>\n<li>\u67e5\u770b\u7535\u6c60\u72b6\u6001\uff1a<\/li>\n<\/ul>\n\n\n\n<p><code class=\"prettyprint\" >battery status<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >battery\n\nBattery CLI utility v1.0.1\n\nUsage:\n\n  battery status\n    output battery SMC status, % and time remaining\n\n  battery maintain LEVEL&#091;1-100,stop]\n    reboot-persistent battery level maintenance: turn off charging above, and on below a certain value\n    eg: battery maintain 80\n    eg: battery maintain stop\n\n  battery charging SETTING&#091;on\/off]\n    manually set the battery to (not) charge\n    eg: battery charging on\n\n  battery adapter SETTING&#091;on\/off]\n    manually set the adapter to (not) charge even when plugged in\n    eg: battery adapter off\n\n  battery charge LEVEL&#091;1-100]\n    charge the battery to a certain percentage, and disable charging when that percentage is reached\n    eg: battery charge 90\n\n  battery discharge LEVEL&#091;1-100]\n    block power input from the adapter until battery falls to this level\n    eg: battery discharge 90\n\n  battery visudo\n    ensure you don&#039;t need to call battery with sudo\n    This is already used in the setup script, so you should&#039;t need it.\n\n  battery update\n    update the battery utility to the latest version\n\n  battery reinstall\n    reinstall the battery utility to the latest version (reruns the installation script)\n\n  battery uninstall\n    enable charging, remove the smc tool, and the battery script\n```\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Battery\uff1aApple Silicon MacBook \u8bbe\u5907\u7684\u7535\u6c60\u5145\u7535\u9650\u5236\u5668 \u5de5\u5177\u7b80\u4ecb Battery \u662f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/jiandao.zliby.com\/index.php?rest_route=\/wp\/v2\/posts\/445"}],"collection":[{"href":"https:\/\/jiandao.zliby.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jiandao.zliby.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jiandao.zliby.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jiandao.zliby.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=445"}],"version-history":[{"count":15,"href":"https:\/\/jiandao.zliby.com\/index.php?rest_route=\/wp\/v2\/posts\/445\/revisions"}],"predecessor-version":[{"id":462,"href":"https:\/\/jiandao.zliby.com\/index.php?rest_route=\/wp\/v2\/posts\/445\/revisions\/462"}],"wp:attachment":[{"href":"https:\/\/jiandao.zliby.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jiandao.zliby.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jiandao.zliby.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}