Nathan Hoad

Pinebook Pro

June 13, 2021

I got a Pinebook Pro a couple of weeks ago. I wanted a cheap laptop that I can screw around with without having to feel weird about using my work laptop. I also missed being able to use Linux.

A couple of notes:

Overall I think this is actually a great laptop for the price. If you’re able to set your expectations accordingly and want a cheap laptop, I can recommend getting this.

Also I’m obliged to mention that I put Arch Linux on it.

$ uname -a
Linux carrotcake 5.12.9-1-ARCH #1 SMP Fri Jun 4 07:24:43 UTC 2021 aarch64 GNU/Linux

😎

Polybar Patch

This is hacky and gross. I don’t care, it works.

diff --git a/src/modules/battery.cpp b/src/modules/battery.cpp
index 4c6dd7ff..2c42d4fc 100644
--- a/src/modules/battery.cpp
+++ b/src/modules/battery.cpp
@@ -45,16 +45,14 @@ namespace modules {
     }
 
     // Make capacity reader
-    if ((m_fcapnow = file_util::pick({path_battery + "charge_now", path_battery + "energy_now"})).empty()) {
+    if ((m_fcapnow = file_util::pick({path_battery + "capacity", path_battery + "charge_now", path_battery + "energy_now"})).empty()) {
       throw module_error("No suitable way to get current capacity value");
     } else if ((m_fcapfull = file_util::pick({path_battery + "charge_full", path_battery + "energy_full"})).empty()) {
       throw module_error("No suitable way to get max capacity value");
     }
 
     m_capacity_reader = make_unique<capacity_reader>([=] {
-      auto cap_now = std::strtoul(file_util::contents(m_fcapnow).c_str(), nullptr, 10);
-      auto cap_max = std::strtoul(file_util::contents(m_fcapfull).c_str(), nullptr, 10);
-      return math_util::percentage(cap_now, 0UL, cap_max);
+      return std::strtoul(file_util::contents(m_fcapnow).c_str(), nullptr, 10);
     });
 
     // Make rate reader