How to fix the annoying display names of Windows 10 themes

A couple of things today… I’m testing the connection of my new phone. Yup, I’ve gone from zero phones, since my previous one was stolen out of a locked locker at gym on December 22nd, to two phones – since I bought a new one, and then was informed that the contract tablet I bought for Megan two years ago was due for an upgrade. So now I have a second phone – it’s a super-cheap generic Android phone, but is perfectly functional. Both Megan and Josh want it, which I figured was unfair since she and I are not together, plus she stays 1400km away, and Josh, being eight years old, will either lose or break it just like everything else. If you can see this post, it means my ultra cheap phone tethered its connection successfully…

Anyway, I recently downloaded a bunch of Windows 10 themes, since Josh and I use this computer, and it needs more colour… as well as some weirdly sexualized Supergirl background images, apparently. (Actually the overly sexualized Supergirl images were a surprize. One that raises the facetious question I asked on Facebook, “Does Supergirl wear panties?”)

Because, I assume, some of the people who create Windows themes, are idiots, we end up with some where the theme is named supergirl.desktopthemepack, but the display name, once the theme is installed, is “bl”. I also have a spider-man theme with an undecidedly non-descriptive display name of “aa”, and a DC Comics theme with the display name of “ss”. This might seem like a trivial peeve, but if the themes names in the theme settings UI have nothing to do with the actual themes, it becomes an issue when you have more than a few like this. Like, I want to select a different theme because I or Josh are getting bored with the current one, and I have to remember that, bl is supergirl, aa is the second spider-man theme, ss is the DC Comics theme, and so on…

So there are a couple of ways of fixing the theme display names, which I’ve discovered today, while offline, so my description and steps will not be exactly the same as what you find anywhere else…

To fix a theme display name from the Windows 10 “themes settings” UI:

Just do it this way. It’s quick and easy…

  1. With the theme that you want to change being active, right-click it in the settings UI, and choose “Save theme”.  (I only see two context menu options for the active theme, that and “Save theme for sharing”.)
  2. Give it a name that makes sense.
  3. (You can only delete an inactive theme, also via right-click.) Do not delete the original one yet. Saving only creates a new shortcut with a new display name, for the existing theme. Deleting the existing theme will leave the one with a good display name as an empty theme. Yet now you have two themes for the same thing.
  4. Right-click the sensibly named one and this time choose “Save theme for sharing”. This exports the theme to a file, of the same type that you can find online and download.
  5. Now you can delete both the stupidly named and the sensibly named one that you created, and reinstall the theme from the one you exported (by double-clicking it – this is how one installs downloaded themes); the end result being a single theme with a sensible display name.

I trust those instructions make sense? I have a Themes directory where I keep all the ones I downloaded, so I can install them on my work laptop too. When exporting the themes that have “fixed” display names, I overwrite the ones I downloaded.

To fix the theme manually…

I haven’t done this, so have no idea if you need to restart Windows or log off and back on for changes to take effect, but I doubt that’s necessary.

You can find all the themes you’ve installed in:
C:\Users\UserName\AppData\Local\Microsoft\Windows\Themes
Mine is at:
C:\Users\Jerome\AppData\Local\Microsoft\Windows\Themes

Each theme is a directory, which two things inside it:

  1. A directory called DesktopBackground. Inside that you find all the background images.
  2. A text file (an old style INI file), with extension .theme – You can edit it with any text editor like notepad.

So to change the display name, just look for the entry, in the [Theme] section, that starts with Displayname=

That’s it. Quite simple.

Incidentally, an exported theme (*.themepack) is just one of those directories compressed as a .cab file. On my computer, I can edit them with Winrar, if I rename them to have extension .cab. Just remember to name them back afterwards so Windows recognizes them as themes “saved for sharing”.

Aside… If only I had more time, I’d think about writing an application that could edit or create Windows 10 themes. I once looked for one and didn’t find any. It wouldn’t be too difficult – just find out what all the settings are that can be edited in the .theme file (or a reasonable subset of them) and write a GUI that supports editing them and browsing for images to use as desktop backgrounds, as well as reading and writing to .themepack files. Once, many years ago, I wrote such an application (in Delphi) for managing Winamp 2 skins – which even supported showing a preview of each skin, transparencies and all. But alas, I do not have time like that – not anymore.

A quick and dirty solution for an annoying problem: How to use ffmpeg to copy the video stream from one file and the audio stream from another

No idea if this will be useful to anybody, but just in case…

I downloaded a video the other day, Final Girl (from here), and for some annoying and unknown reason, it doesn’t play on my TV. So, I converted it from AVI to MP4 using ffmpeg (I use the static build downloaded from here). Problem is, my crappy conversion loses the audio quality. The downloaded file has six channel audio, and is great quality. (The movie is not so great though. I should’ve read the reviews.)

So here’s my quick and dirty fix:

  1. Convert to mp4 with crappy audio.
  2. Use my hacky batch file, that uses ffmpeg again, to copy the video stream from the converted file, and the audio stream from the original file, into a new file.

The parameters used in the first conversion are not that important. The important part is coming later. Basically, I could have used a batch file that looked something like this:

@echo off
pushd %~p1

G:\Tools\ffmpeg\ffmpeg.exe -i "%~nx1" -q:v 1.0 -an -y "%~n1.mp4"


popd

(I wrote most of my batch files years ago. My “standard pattern” for writing batch files is as above. Switch echo off so it doesn’t echo the commands; “push” the current directory to the directory of the first parameter – and I always have all relevant files in the same directory; do some shit; then “pop” to the original directory. In the old days that meant I could then call another batch file, and always knew in which directory I would end up. My old batch files included GOTO statements to handle errors and could be chained so they’d call each other, or be called from a batch file that made use of a few other batch files, so pushd and popd was crucial for flow control. Actually I don’t use batch files for anything complicated anymore because they are a pain in the arse, but still use the pattern.)

That will convert to MP4 using default settings, without sound. (-an tells it not to convert the audio.) Not actually what I did… I have an application of my own that generates the command line. Also not important, but included for interest. My program only supports certain ffmpeg video/audio conversions and certain audio/video filters… quite a few actually, including converting between all the formats I know of, changing aspect ratio to fix it for files that set it wrong, changing contrast, increasing or decreasing volume, removing noise, cropping, logo-blurr and so on. But it doesn’t know how to fiddle with streams and some other shit, so I still use batch files for that. (The reason this command-line is calling ffmpeg64.exe is that I have both builds – renamed so as not to conflict – in my application’s directory, and my code launches the process of the relevant one depending on whether it’s running on 32 bit or 64 bit Windows.) The actual command-line used was this:

G:\Documents\Visual Studio 2012\Projects\RomyView\RomyView\bin\Debug\ffmpeg64.exe"  -i "G:\Videos\movies\Final.Girl.2015.BRRip.XviD.AC3-EVO.avi" -c:v libx264 -vprofile Baseline -preset Veryfast -b:v 367.35k -maxrate 2500k -bufsize 1200k -threads 0 -acodec libvo_aacenc -b:a 128k -r 23.976 -ar 44100 -ac 2 -y "G:\Videos\movies\Final.Girl.2015.BRRip.XviD.AC3-EVO.mp4"

The important part follows:

This batch file, which I then used to copy the video from the new file and the audio from the old file, looks like this:

@echo off
pushd %~p1

REM Copy the video stream from parameter one, and the audio stream from parameter two.

G:\Tools\ffmpeg\ffmpeg.exe -i "%~nx1" -i "%~nx2" -map 0:0 -map 1:1 -c:v:0:0 copy -c:a:1:0 copy -y "%~n1 streams copied.MP4"

popd

i.e. I opened a command prompt, and just typed out a line to the effect of:
call G:\Tools\CopyStreamsMp4.cmd “Path_To_New_File” “Path_To_Old_File”

Edit: Correction – I’d copied the wrong batch file here. (I have a few for slightly different uses.) The second input parameter is supposed to be “%~nx2“. I’d copied one of my versions that’s used simply to copy the streams to a different but compatible container file (itunes to standard MP4), which used the same parameter for both, that is the same file for both streams.