ARM PC Throws Oh-My-Posh Curve

ARM PC Throws Oh-My-Posh Curve

There are lots of interesting wrinkles that distinguish ARM-based PCs running Windows 11 from their Intel- or AMD-based counterparts. Nothing huge or deal-breaking. Just interesting and sometimes, mildy vexing. In setting up Windows Terminal and PowerShell “the way I like it,” I encountered just such a wrinkle. Indeed, my new ASUS Zenbook A14 AMR throws oh-my-posh curve that took some research to work around. The lead-in graphic shows where I started out.

How ARM PC Throws Oh-My-Posh Curve Ball

I used the OneDrive connection through my common MSA (Microsoft Account) to inherit a lot of my local set-up and preferences. So it is with Windows Terminal and PowerShell, for which I like to use Jan DeDobbeleer’s excellent Oh My Posh (OMP) customization tool. Note the end of the prompt that shows up on the A14 in the preceding screencap: “CONFIG ERROR.” Not good!

In figuring out what causes this, I learned that the way ARM PCs handle some errors differs from AMD and Intel X64 CPUs. Indeed, the issue seems to come from a slight change in folder structures, where OMP expects x64 and doesn’t accommodate ARM automatically.

Fixing the CONFIG ERROR

Fixing CONFIG ERROR, in this case, is as easy as reassingning the folder from whence Oh-My-Posh reads its configuration file. This comes from changing where OMP gets its theme — namely:

oh-my-posh init pwsh --config "C:\Program Files\WindowsApps\ohmyposh.cli_
28.0.0.0_arm64__96v55e8n804z4\themes\jandedobbeleer.omp.json" | Invoke-Expression

Note: I broke this command across multiple lines for improved rendering. Be sure to suck it into a text editor and remove the line-break in the middle before trying this yourself.

To make this change permanent, one must run notepad $PROFILE at the PowerShell prompt, and replace the current path specification for the startup-theme.  That means the path specification in the OMP invocation line must match the one shown in the preceding command string. Save the edited profielss and thereafter, when Windows Terminal boots into PowerShell, it will use the right version of the theme file to avoid CONFIG ERROR.

As you can see, after making that config change, I ran winfetch in a new PowerShell/Windows Terminal session (for something to see). OMP no longer throws a CONFIG ERROR. Problem solved!

 

wing

Facebooklinkedin
Facebooklinkedin

Leave a Reply

Your email address will not be published. Required fields are marked *