Open Jorge9811 opened 5 years ago
Hey there @Jorge9811 would you mind sharing what you've changed? Line numbers would help.
I just fixed this locally. On my machine (Win10), reg query outputs 3 lines: a blank line, key name, key value:
reg query 'HKCU\Software\Microsoft\Windows\CurrentVersion\Themes' //v 'CurrentTheme'
returns
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes
CurrentTheme REG_SZ C:\Users\foobar\AppData\Local\Microsoft\Windows\Themes\Custom.theme
which the line
Win_theme=$(echo "$themeFile" | awk -F"\\" '{print $NF}' | sed 's|\.theme$||')
shortens to
Themes
Custom
I fixed it by piping the reg query call through tail:
themeFile="$(reg query 'HKCU\Software\Microsoft\Windows\CurrentVersion\Themes' //v 'CurrentTheme' | tail +3)"
which starts with the 3rd line (key value). I don't know if there's a "better" way. The code is in detectwmtheme(), my detected distro is Msys (I'm using mintty), and my windowmanager is DWM/Explorer, so the relevant line for me is 2454.
As you can see right below, the WM Theme field seems to be a tad broken on Windows Embedded 8.1 Industry Pro x64. I am using a custom theme, if it matters.
EDIT: Could it be because it's trying to retrieve the visual theme from the wrong path? I'm honestly not sure, just throwing a guess. Themes are located in C:\Windows\Resources\Themes for what it's worth.
EDIT2: I might have fixed it, somewhat.