KittyKatt / screenFetch

Fetches system/theme information in terminal for Linux desktop screenshots.
GNU General Public License v3.0
3.87k stars 456 forks source link

Slightly broken layout on Windows 8.1 Pro #632

Open Jorge9811 opened 5 years ago

Jorge9811 commented 5 years ago

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. mintty-2019-08-29_12-58-30

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. notepad++-2019-08-29_13-16-15

KittyKatt commented 5 years ago

Hey there @Jorge9811 would you mind sharing what you've changed? Line numbers would help.

almitydave commented 3 years ago

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.