{"id":37424,"date":"2016-04-13T00:56:24","date_gmt":"2016-04-12T15:56:24","guid":{"rendered":"http:\/\/www.softantenna.com\/wp\/?p=37424"},"modified":"2016-04-13T00:56:24","modified_gmt":"2016-04-12T15:56:24","slug":"battery-3","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/battery-3\/","title":{"rendered":"Battery - \u30d0\u30c3\u30c6\u30ea\u30fc\u60c5\u5831\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u78ba\u8a8d\u3067\u304d\u308b\u30b9\u30e2\u30fc\u30eb\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2016\/04\/Is-2016-04-12-19.17.10.png\" alt=\"S 2016 04 12 19 17 10\" title=\"s 2016-04-12 19.17.10.png\" border=\"0\" width=\"816\" height=\"542\" \/><\/p>\n<p>\u30d0\u30c3\u30c6\u30ea\u30fc\u306e\u72b6\u614b\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u5c0f\u3055\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u300c<a href=\"https:\/\/github.com\/Goles\/Battery\">Battery<\/a>\u300d\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u30b0\u30e9\u30d5\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b<a href=\"https:\/\/github.com\/holman\/spark\">Spark<\/a>\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3044\u3066\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u3082\u7f8e\u3057\u304f\u30d0\u30c3\u30c6\u30ea\u30fc\u6b8b\u91cf\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30b0\u30e9\u30d5\u306e\u8868\u793a\u65b9\u6cd5\u3084\u8272\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3001tmux\u3078\u306e\u7d44\u307f\u3082\u53ef\u80fd\u3002\u74b0\u5883\u306fMac OS X\u3068Linux\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<h2>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>Mac\u3067Homebrew\u3092\u4f7f\u3063\u3066\u3044\u308b\u306a\u3089\u3070\u4ee5\u4e0b\u306e\u65b9\u6cd5\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u304c\u7c21\u5358\u3067\u3059\u3002<\/p>\n<pre>\n$ brew tap Goles\/battery\n$ brew install battery\n<\/pre>\n<p>Homebrew\u3092\u4f7f\u308f\u306a\u3044\u5834\u5408\u3084Linux\u306e\u5834\u5408\u306a\u3069\u3001\u305d\u306e\u4ed6\u306e\u74b0\u5883\u306b\u304a\u3051\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306f\u516c\u5f0f\u30b5\u30a4\u30c8\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u4f7f\u7528\u65b9\u6cd5<\/h2>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u958b\u3044\u3066\u3044\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre>\n$ battery\n<\/pre>\n<p>\u30aa\u30d7\u30b7\u30e7\u30f3\u7121\u3057\u3060\u3068Spark\u3092\u4f7f\u3063\u305f\u68d2\u30b0\u30e9\u30d5\u3067\u30d0\u30c3\u30c6\u30ea\u30fc\u306e\u6b8b\u91cf\u3092\u77e5\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2016\/04\/INewImage-45.png\" alt=\"NewImage\" title=\"NewImage.png\" border=\"0\" width=\"300\" height=\"28\" \/><\/p>\n<p>\u25b2\u30b0\u30ea\u30fc\u30f3\u304c\u30d0\u30c3\u30c6\u30ea\u30fc\u6b8b\u91cf\u3042\u308a\u3002\u9ec4\u8272\u304c\u4e2d\u9593\u3002\u8d64\u304c\u5371\u967a\u72b6\u614b\u3092\u8868\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>\n$ battery -a\n[81%] [========  ] \n<\/pre>\n<p>\u25b2-a\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3068ASCII\u5f62\u5f0f\u3067\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>\n$ battery --help\nbattery: usage:\n\n  general:\n    -h, --help    print this message\n    -p            use pmset (more accurate)\n    -t            output tmux status bar format\n    -a            output ascii bar instead of spark's\n\n  colors:\n    -g <color>    good battery level      default: green or 1;32\n    -m <color>    middle battery level    default: yellow or 1;33\n    -w <color>    warn battery level      default: red or 0;31\n<\/pre>\n<p>\u25b2--help\u3067\u30d8\u30eb\u30d7\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u300cbattery -g \"0;32\"\u300d\u306e\u3088\u3046\u306b\u5b9f\u884c\u3059\u308b\u3068good\u72b6\u614b\u306e\u8272\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2016\/04\/Is_2016-04-12_19_32_40.png\" alt=\"S 2016 04 12 19 32 40\" title=\"s_2016-04-12_19_32_40.png\" border=\"0\" width=\"790\" height=\"621\" \/><\/p>\n<p>\u25b2\u5b9f\u969b\u306b\u8868\u793a\u3055\u308c\u308b\u8272\u306f\u30bf\u30fc\u30df\u30ca\u30eb\u306eANSI\u30ab\u30e9\u30fc\u8a2d\u5b9a\u306b\u3088\u3063\u3066\u6c7a\u307e\u308a\u307e\u3059\u3002\"0;32\"\u306f\"\u4e0a\u306e\u884c\u306e\u5de6\u304b\u30893\u756a\u76ee\u306e\u8272\u3068\u306a\u308a\u307e\u3059\u3002\u8a73\u3057\u304f\u306f<a href=\"http:\/\/www.tldp.org\/HOWTO\/Bash-Prompt-HOWTO\/x329.html\">Bash Prompt HOWTO<\/a>\u306a\u3069\u3092\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>\nset -g status-right \"#(\/usr\/local\/bin\/battery -t)\"\n<\/pre>\n<p>\u25b2\u307e\u305f~\/.tmux.conf\u306b\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u3001tmux\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Battery\u306f\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u5b9f\u88c5\u3055\u308c\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002\u305d\u308c\u307b\u3069\u9577\u304f\u306a\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u306e\u3067\u3001\u3069\u306e\u3088\u3046\u306b\u30d0\u30c3\u30c6\u30ea\u30fc\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u306e\u304b\u3001Spark\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u306e\u304b\u78ba\u8a8d\u3057\u3066\u307f\u308b\u306e\u3082\u826f\u3044\u3067\u3057\u3087\u3046\u3002Battery\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306b\u306fMIT\u30e9\u30a4\u30bb\u30f3\u30b9\u304c\u9069\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d0\u30c3\u30c6\u30ea\u30fc\u306e\u72b6\u614b\u3092\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u5c0f\u3055\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u300cBattery\u300d\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u30b0\u30e9\u30d5\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308bSpark\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3044\u3066\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u3082\u7f8e\u3057\u304f\u30d0\u30c3\u30c6\u30ea\u30fc\u6b8b\u91cf\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":37421,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75],"tags":[225,3477],"class_list":["post-37424","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-battery","tag-spark"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/37424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=37424"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/37424\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/37421"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=37424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=37424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=37424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}