mirror of
https://github.com/jbowdre/virtuallypotato.git
synced 2024-11-21 22:42:19 +00:00
updates posts with image descriptions
This commit is contained in:
parent
9921cbd5cc
commit
bf5f99bf61
4 changed files with 33 additions and 33 deletions
|
@ -22,7 +22,7 @@ The instructions worked well for me so I won't rehash them all here. When it cam
|
|||
All I need to do now is execute `sudo ./wsl-vpnkit` and leave that running in the background when I need to use WSL while connected to the corporate VPN.
|
||||
|
||||
|
||||
![Annotation 2020-10-07 083947.png](/images/posts-2020/MnmMuA0HC.png)
|
||||
![Successful connection via wsl-vpnkit](/images/posts-2020/MnmMuA0HC.png)
|
||||
|
||||
Whew! Okay, back to work.
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ tags:
|
|||
title: Safeguard your Android's battery with Tasker + Home Assistant
|
||||
---
|
||||
|
||||
A few months ago, I started using the [Accubattery app](https://play.google.com/store/apps/details?id=com.digibites.accubattery) to keep a closer eye on how I'd been charging my phones. The app has a handy feature that notifies you once the battery level reaches a certain threshold so you can pull the phone off the charger and extend the lithium battery's service life, and it even offers an estimate for what that impact might be. For instance, right now the app indicates that charging my Pixel 5 from 51% to 100% would cause 0.92 wear cycles, while stopping the charge at 80% would impose just 0.17 cycles.
|
||||
A few months ago, I started using the [AccuBattery app](https://play.google.com/store/apps/details?id=com.digibites.accubattery) to keep a closer eye on how I'd been charging my phones. The app has a handy feature that notifies you once the battery level reaches a certain threshold so you can pull the phone off the charger and extend the lithium battery's service life, and it even offers an estimate for what that impact might be. For instance, right now the app indicates that charging my Pixel 5 from 51% to 100% would cause 0.92 wear cycles, while stopping the charge at 80% would impose just 0.17 cycles.
|
||||
|
||||
![Screenshot_20201114-135308.png](/images/posts-2020/aeIOr8w6k.png)
|
||||
![AccuBattery screenshot](/images/posts-2020/aeIOr8w6k.png)
|
||||
|
||||
But that depends on me being near my phone and conscious so I can take action when the notification goes off. That's often a big assumption to make - and, frankly, I'm lazy.
|
||||
|
||||
|
@ -29,17 +29,17 @@ I'm not going to go through how to install Home Assistant on the Pi or how to co
|
|||
|
||||
### The Recipe
|
||||
1. Plug the Wemo into a wall outlet, and plug a phone charger into the Wemo. Add the Belkin Wemo integration in Home Assistant, and configure the device and entity. I named mine `switchy`. Make a note of the Entity ID: `switch.switchy`. We'll need that later.
|
||||
![Screenshot 2020-11-14 at 15.28.53.png](/images/posts-2020/Gu5I3LUep.png)
|
||||
![The new entity in HA](/images/posts-2020/Gu5I3LUep.png)
|
||||
2. Either point your phone's browser to your [Home Assistant instance's local URL](http://homeassistant.local:8123/), or use the [Home Assistant app](https://play.google.com/store/apps/details?id=io.homeassistant.companion.android) to access it. Tap your username at the bottom of the menu and scroll all the way down to the Long-Lived Access Tokens section. Tap to create a new token. It doesn't matter what you name it, but be sure to copy to token data once it is generated since you won't be able to display it again.
|
||||
3. Install the [Home Assistant Plug-In for Tasker](https://play.google.com/store/apps/details?id=com.markadamson.taskerplugin.homeassistant). Open Tasker, create a new Task called 'ChargeOff', and set the action to `Plugin > Home Assistant Plug-in for Tasker > Call Service`. Tap the pencil icon to edit the configuration, and then tap the plus sign to add a new server. Give it whatever name you like, and then enter your Home Assistant's IP address for the Base URL, followed by the port number `8123`. For example, `http://192.168.1.99:8123`. Paste in the Long-Lived Access Token you generated earlier. Go on and hit the Test Server button to make sure you got it right. It'll wind up looking something like this:
|
||||
![Screenshot_20201114-160839.png](/images/posts-2020/8Jg4zgrgB.png)
|
||||
![Configuring the HA connection in Tasker](/images/posts-2020/8Jg4zgrgB.png)
|
||||
For the Service field, you need to tell HA what you want it to do. We want it to turn off a switch so enter `switch.turn_off`. We'll use the Service Data field to tell it which switch, in JSON format:
|
||||
```json
|
||||
{"entity_id": "switch.switchy"}
|
||||
```
|
||||
Tap Test Service to make sure it works - and verify that the switch does indeed turn off.
|
||||
![Screenshot_20201114-164514.png](/images/posts-2020/U3LfmEJ_7.png)
|
||||
![Creating and testing the service](/images/posts-2020/U3LfmEJ_7.png)
|
||||
4. Hard part is over. Now we just need to set up a profile in Tasker to fire our new task. I named mine 'Charge Limiter'. I started with `State > Power > Battery Level` and set it to trigger between 81-100%., and also added `State > Power > Source: Any` so it will only be active while charging. I also only want this to trigger while my phone is charging at home, so I added `State > Net > Wifi Connected` and then specified my home SSID. Link this profile to the Task you created earlier, and never worry about overcharging your phone again.
|
||||
![Screenshot_20201114-172454.png](/images/posts-2020/h7tl6facr.png)
|
||||
![Tasker profile to kill power above 80%](/images/posts-2020/h7tl6facr.png)
|
||||
|
||||
You can use a similar Task to turn the switch back on at a set time - or you could configure that automation directly in Home Assistant. I added an action to turn on the switch to my Google Assistant bedtime routine and that works quite well for my needs.
|
||||
|
|
|
@ -14,24 +14,24 @@ title: Setting up Linux on a new Lenovo Chromebook Duet (bonus arm64 complicatio
|
|||
|
||||
I've [written in the past](/3d-modeling-and-printing-on-chrome-os) about the Linux setup I've been using on my Pixel Slate. My Slate's keyboard stopped working over the weekend, though, and there don't seem to be any replacements (either Google or Brydge) to be found. And then I saw that [Walmart had the 64GB Lenovo Chromebook Duet temporarily marked down](https://twitter.com/johndotbowdre/status/1320733614426988544) to a mere $200 - just slightly more than the Slate's *keyboard* originally cost. So I jumped on that deal, and the little Chromeblet showed up today.
|
||||
|
||||
![PXL_20201027_154908725.PORTRAIT.jpg](/images/posts-2020/kULHPeDuc.jpeg)
|
||||
![Aww, it's so cute!](/images/posts-2020/kULHPeDuc.jpeg)
|
||||
|
||||
I'll be putting the Duet through the paces in the coming days to see if/how it can replace my now-tablet-only Slate, but first things first: I need Linux. And this may be a little bit different than the setup on the Slate since the Duet's Mediatek processor uses the aarch64/arm64 architecture instead of amd64.
|
||||
I'll be putting the Duet through the paces in the coming days to see if/how it can replace my now-tablet-only Slate, but first things first: I need Linux. And this may be a little bit different than the setup on the Slate since the Duet's Mediatek processor uses the aarch64/arm64 architecture instead of amd64. (And while I'm writing these steps specific to the Duet, the same steps should work on basically any arm64 Chromebook.)
|
||||
|
||||
So journey with me as I get this little guy set up!
|
||||
|
||||
### Installing Linux
|
||||
This part is dead simple. Just head into **Settings > Linux (Beta)** and hit the **Turn on** button:
|
||||
![Screenshot 2020-10-27 at 15.59.12.png](/images/posts-2020/oLso9Wyzj.png)
|
||||
![It doesn't take much to get Linux turned on](/images/posts-2020/oLso9Wyzj.png)
|
||||
|
||||
Click **Next**, review the options for username and initial disk size (which can be easily increased later so there's no real need to change it right now), and then select **Install**:
|
||||
![Screenshot 2020-10-27 at 16.01.19.png](/images/posts-2020/ACUKsohq6.png)
|
||||
![Selecting username and storage allocation](/images/posts-2020/ACUKsohq6.png)
|
||||
|
||||
It takes just a few minutes to download and initialize the `termina` VM and then create the default `penguin` container:
|
||||
![Screenshot 2020-10-27 at 16.04.07.png](/images/posts-2020/2LTaCEdWH.png)
|
||||
![Installing...](/images/posts-2020/2LTaCEdWH.png)
|
||||
|
||||
You're ready to roll once the Terminal opens and gives you a prompt:
|
||||
![Screenshot 2020-10-27 at 16.05.23.png](/images/posts-2020/0-h1flLZs.png)
|
||||
![Hello, Penguin!](/images/posts-2020/0-h1flLZs.png)
|
||||
|
||||
Your first action should be to go ahead and install any patches:
|
||||
```shell
|
||||
|
@ -50,12 +50,12 @@ Just grab the installer script like so:
|
|||
```shell
|
||||
wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
|
||||
```
|
||||
Review it if you'd like, and then execute it:
|
||||
Review it if you'd like (and you should! *Always* review code before running it!!), and then execute it:
|
||||
```shell
|
||||
sh install.sh
|
||||
```
|
||||
When asked if you'd like to change your default shell to `zsh` now, **say no**. This is because it will prompt for your password, but you probably don't have a password set on your brand-new Linux (Beta) account and that just makes things complicated. We'll clear this up later, but for now just check out that slick new prompt:
|
||||
![Screenshot 2020-10-27 at 16.30.01.png](/images/posts-2020/8q-WT0AyC.png)
|
||||
![Oh my!](/images/posts-2020/8q-WT0AyC.png)
|
||||
|
||||
Oh My Zsh is pretty handy because you can easily enable [additional plugins](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins) to make your prompt behave exactly the way you want it to. Let's spruce it up even more with the [powerlevel10k theme](https://github.com/romkatv/powerlevel10k)!
|
||||
```shell
|
||||
|
@ -70,7 +70,7 @@ We'll need to launch another instance of `zsh` for the theme change to take effe
|
|||
sudo chsh -s /bin/zsh [username]
|
||||
```
|
||||
Now close out the terminal and open it again, and you should be met by the powerlevel10k configurator which will walk you through getting things set up:
|
||||
![Screenshot 2020-10-27 at 16.47.02.png](/images/posts-2020/K1ScSuWcg.png)
|
||||
![pwerlevel10k configurator](/images/posts-2020/K1ScSuWcg.png)
|
||||
|
||||
This theme is crazy-configurable, but fortunately the configurator wizard does a great job of helping you choose the options that work best for you.
|
||||
I pick the Classic prompt style, Unicode character set, Dark prompt color, 24-hour time, Angled separators, Sharp prompt heads, Flat prompt tails, 2-line prompt height, Dotted prompt connection, Right prompt frame, Sparse prompt spacing, Fluent prompt flow, Enabled transient prompt, Verbose instant prompt, and (finally) Yes to apply the changes.
|
||||
|
@ -84,15 +84,15 @@ curl -L https://aka.ms/linux-arm64-deb > code_arm64.deb
|
|||
sudo apt install ./code_arm64.deb
|
||||
```
|
||||
VS Code should automatically appear in the Chromebook's Launcher, or you can use it to open a file directly with `code [filename]`:
|
||||
![Screenshot 2020-10-27 at 17.01.30.png](/images/posts-2020/XtmaR9Z0J.png)
|
||||
![VS Code editing my .zshrc file](/images/posts-2020/XtmaR9Z0J.png)
|
||||
Nice!
|
||||
|
||||
### Android platform tools (adb and fastboot)
|
||||
I sometimes don't want to wait for my Pixel to get updated naturally, so I love using `adb sideload` to manually update my phones. Here's what it takes to set that up. Installing adb is as simple as `sudo apt install adb`. To use it, enable the USB Debugging Developer Option on your phone, and then connect the phone to the Chromebook. You'll get a prompt to connect the phone to Linux:
|
||||
![Screenshot 2020-10-27 at 18.02.17.png](/images/posts-2020/MkGu29HKl.png)
|
||||
![Connecting a phone to Linux](/images/posts-2020/MkGu29HKl.png)
|
||||
|
||||
Once you connect the phone to Linux, check the phone to approve the debugging connection. You can then issue `adb devices` to verify the phone is connected:
|
||||
![Screenshot 2020-10-27 at 18.06.49.png](/images/posts-2020/a0uqHkJiC.png)
|
||||
![Verifying the ADB connection](/images/posts-2020/a0uqHkJiC.png)
|
||||
|
||||
*I've since realized that the platform-tools (adb/fastboot) available in the repos are much older than what are required for flashing a factory image or sideloading an OTA image to a modern Pixel phone. This'll do fine for installing APKs either to your Chromebook or your phone, but I had to pull out my trusty Pixelbook to flash GrapheneOS to my Pixel 4a.*
|
||||
|
||||
|
@ -109,11 +109,11 @@ sudo chmod +x /opt/microsoft/powershell/7/pwsh
|
|||
sudo ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
|
||||
```
|
||||
You can then just run `pwsh`:
|
||||
![Screenshot 2020-10-27 at 17.28.44.png](/images/posts-2020/QRP4iyLnu.png)
|
||||
![Powershell, in Linux, on Chrome OS](/images/posts-2020/QRP4iyLnu.png)
|
||||
That was the hard part. To install PowerCLI into your new Powershell environment, just run `Install-Module -Name VMware.PowerCLI` at the `PS >` prompt, and accept the warning about installing a module from an untrusted repository.
|
||||
|
||||
I'm planning to use PowerCLI against my homelab without trusted SSL certificates so (note to self) I need to run `Set-PowerCLIConfiguration -InvalidCertificateAction Ignore` before I try to connect.
|
||||
![Screenshot 2020-10-27 at 17.34.39.png](/images/posts-2020/YaFNJJG_c.png)
|
||||
![PowerCLI connected to my vCenter](/images/posts-2020/YaFNJJG_c.png)
|
||||
|
||||
Woot!
|
||||
|
||||
|
@ -145,12 +145,12 @@ And finally update the package cache and install `docker` and its friends:
|
|||
sudo apt update
|
||||
sudo apt install docker-ce docker-ce-cli containerd.io
|
||||
```
|
||||
![Screenshot 2020-10-27 at 18.48.34.png](/images/posts-2020/k2uiYi5e8.png)
|
||||
![I put a container in your container](/images/posts-2020/k2uiYi5e8.png)
|
||||
Xzibit would be proud!
|
||||
|
||||
### 3D printing utilities
|
||||
Just like last time, I'll want to be sure I can do light 3D part design and slicing on this Chromebook. Once again, I can install FreeCAD with `sudo apt install freecad`, and this time I didn't have to implement any workarounds for graphical issues:
|
||||
![Screenshot 2020-10-27 at 19.16.31.png](/images/posts-2020/q1inyuUOb.png)
|
||||
Just like [last time](/3d-modeling-and-printing-on-chrome-os), I'll want to be sure I can do light 3D part design and slicing on this Chromebook. Once again, I can install FreeCAD with `sudo apt install freecad`, and this time I didn't have to implement any workarounds for graphical issues:
|
||||
![FreeCAD](/images/posts-2020/q1inyuUOb.png)
|
||||
|
||||
Unfortunately, though, I haven't found a slicer application compiled with support for aarch64/arm64. There's a *much* older version of Cura available in the default Debian repos but it crashes upon launch. Neither Cura nor PrusaSlicer (or the Slic3r upstream) offer arm64 releases.
|
||||
|
||||
|
@ -172,7 +172,7 @@ conda install -c conda-forge notebook
|
|||
|
||||
You can then launch the notebook with `jupyter notebook` and it will automatically open up in a Chrome OS browser tab:
|
||||
|
||||
![Screenshot 2020-11-03 at 14.34.09.png](/images/posts-2020/U5E556eXf.png)
|
||||
![To Jupyter and beyond!](/images/posts-2020/U5E556eXf.png)
|
||||
|
||||
Cool! Now I just need to learn what I'm doing with Jupyter - but at least I don't have an excuse about "my laptop won't run it".
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ title: 'Showdown: Lenovo Chromebook Duet vs. Google Pixel Slate'
|
|||
|
||||
Okay, okay, this isn't actually going to be a comparison review between the two wildly-mismatched-but-also-kind-of-similar [Chromeblets](https://www.reddit.com/r/chromeos/comments/bp1nwo/branding/), but rather a (hopefully) brief summary of my experience moving from an $800 Pixel Slate + $200 Google keyboard to a Lenovo Chromebook Duet I picked up on sale for just $200.
|
||||
|
||||
![PXL_20201104_160532096.MP.jpg](/images/posts-2020/P-x5qEg_9.jpeg)
|
||||
![A Tale of Two Chromeblets](/images/posts-2020/P-x5qEg_9.jpeg)
|
||||
|
||||
### Background
|
||||
Up until last week, I'd been using the Slate as my primary personal computing device for the previous 20 months or so, mainly in laptop mode (as opposed to tablet mode). I do a lot of casual web browsing, and I spend a significant portion of my free time helping other users on Google's product support forums as a part of the [Google Product Experts program](https://productexperts.withgoogle.com/what-it-is). I also work a lot with the [Chrome OS Linux (Beta) environment](/setting-up-linux-on-a-new-lenovo-chromebook-duet-bonus-arm64-complications), but I avoid Android apps as much as I can. And I also used the Slate for a bit of Stadia gaming when I wasn't near a Chromecast.
|
||||
|
@ -20,32 +20,32 @@ I was pretty happy with the Slate, but its expensive keyboard stopped working re
|
|||
|
||||
### Size
|
||||
When you put these machines side by side, the first difference that jumps out is the size disparity. The 12.3" Pixel Slate is positively massive next to the 10.1" Lenovo Duet.
|
||||
![PXL_20201104_160825979.MP (1).jpg](/images/posts-2020/gVj7d_2Nu.jpeg)
|
||||
![Big 'un and little 'un](/images/posts-2020/gVj7d_2Nu.jpeg)
|
||||
|
||||
The Duet is physically smaller so the display itself is of course smaller. I had a brief moment of panic when I first logged in and the setup wizard completely filled the screen. Dialing Chrome OS's display scaling down to 80% strikes a good balance for me between fonts being legible while still displaying enough content to be worthwhile. It can get a bit tight when you've got windows docked side-by-side but I'm getting by okay.
|
||||
|
||||
Of course, the smaller size of the Duet also makes it work better as a tablet in my mind. It's comfortable enough to hold with one hand while you interact with the other, whereas the Slate always felt a little too big for that to me.
|
||||
![PXL_20201104_213309828.MP.jpg](/images/posts-2020/qne9SybLi.jpeg)
|
||||
![One-handing the Duet](/images/posts-2020/qne9SybLi.jpeg)
|
||||
|
||||
### Keyboard
|
||||
A far more impactful size difference is the keyboards though. The Duet keyboard gets a bit cramped, particularly over toward the right side (you know, those pesky braces and semicolons that are *never* needed when coding):
|
||||
![PXL_20201104_160747877.MP.jpg](/images/posts-2020/CBziPHD8A.jpeg)
|
||||
![The Duet's keyboard is MUCH smaller](/images/posts-2020/CBziPHD8A.jpeg)
|
||||
|
||||
Getting used to typing on this significantly smaller keyboard has been the biggest adjustment so far. The pad on my pinky finger is wider than the last few keys at the right edge of the keyboard so I've struggled with accurately hitting the correct `[` or `]`, and also with smacking Return (and inevitably sending a malformed chat message) when trying to insert an apostrophe. I feel like I'm slowly getting the hang of it, but like I said, it's been an adjustment.
|
||||
|
||||
### Cover
|
||||
![PXL_20201104_160703333._exported_1604610747029.jpg](/images/posts-2020/yiCW6XZbF.jpeg)
|
||||
![Cover up!](/images/posts-2020/yiCW6XZbF.jpeg)
|
||||
The Pixel Slate's keyboard + folio cover is a single (floppy) piece. The keyboard connects to contacts on the bottom edge of the Slate, and magnets hold it in place. The rear cover then folds and sticks to the back of the Slate with magnets to prop up the tablet in different angles. The magnet setup means you can smoothly transition it through varying levels of tilt, which is pretty nice. But being a single piece means the keyboard might get in the way if you're trying to use it as just a propped-up tablet. And the extra folding in the back takes up a bit of space so the Slate may not work well as a laptop on your actual lap.
|
||||
|
||||
![PXL_20201104_160949342.MP.jpg](/images/posts-2020/9_Ze3zyBk.jpeg)
|
||||
![Duet's fabric cover](/images/posts-2020/9_Ze3zyBk.jpeg)
|
||||
|
||||
The Duet's rear cover has a fabric finish kind of similar to the cases Google offers for their phones, and it provides a great texture for holding the tablet. It sticks to the back of the Duet through the magic of magnets, and the lower half of it folds out to create a really sturdy kickstand. And it's completely separate from the keyboard which is great for when you're using the Duet as a tablet (either handheld or propped up for watching a movie or gaming with Stadia).
|
||||
|
||||
![PXL_20201104_161022969.MP.jpg](/images/posts-2020/nWRu2TB8i.jpeg)
|
||||
![Duet kickstand](/images/posts-2020/nWRu2TB8i.jpeg)
|
||||
|
||||
And this little kickstand can go *low*, much lower than the Slate. This makes it perfect for my late-night Stadia sessions while sitting in bed. I definitely prefer this approach compared to what Google did with the Pixel Slate.
|
||||
|
||||
![PXL_20201104_161057794.MP.jpg](/images/posts-2020/BAf7knBk5.jpeg)
|
||||
![The Duet handily wins this limbo competition](/images/posts-2020/BAf7knBk5.jpeg)
|
||||
|
||||
### Performance
|
||||
The Duet does struggle a bit here. It's basically got a [smartphone processor](https://www.notebookcheck.net/Mediatek-Helio-P60T-Processor-Benchmarks-and-Specs.470711.0.html) and half the RAM of the Slate. Switching between windows and tabs sometimes takes an extra moment or two to catch up (particularly if said tab has been silently suspended in the background). Similarly, working with Linux apps is just a bit slower than you'd like it to be. Still, I've spent a bit more than a week now with the Duet as my go-to computer and it's never really been slow enough to bother me.
|
||||
|
|
Loading…
Reference in a new issue