From b032bd6a541b82fc9db27ebab008b310eccb287f Mon Sep 17 00:00:00 2001 From: Foldex <47908676+Foldex@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:34:53 -0400 Subject: [PATCH] Windows support (#158) --- README.md | 13 ++- colorthemes/metro/metro.theme | 76 ++++++++++++++ colorthemes/metro/preview.png | Bin 0 -> 9518 bytes install.py | 91 +++++++++++++---- install_windows.bat | 181 ++++++++++++++++++++++++++++++++++ 5 files changed, 339 insertions(+), 22 deletions(-) create mode 100644 colorthemes/metro/metro.theme create mode 100644 colorthemes/metro/preview.png create mode 100644 install_windows.bat diff --git a/README.md b/README.md index d99ec9f9..f666b6d3 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,9 @@ A skin to make Steam look more like a native GNOME app ## Requirements +* [Python 3](https://www.python.org/downloads/) * [Cantarell fonts](https://gitlab.gnome.org/GNOME/cantarell-fonts): An option to install these is included in the install script, but fonts packaged by your distro are preferred. -* The skin was created for the Linux version of Steam and wasn't tested on Windows or macOS. It will work with some visual problems. +* The skin is created and tested mostly on the Linux version of Steam. Steam's new UI has largely unified platform differences, so other platforms should work, but are not a priority. ## Previews @@ -66,6 +67,10 @@ A skin to make Steam look more like a native GNOME app ![Kate](/colorthemes/kate/preview.png?raw=true) +### Metro + +![Metro](/colorthemes/metro/preview.png?raw=true) + ### Nord ![Nord](/colorthemes/nord/preview.png?raw=true) @@ -123,6 +128,12 @@ cd Adwaita-for-Steam ./install.py -c nord -fi -p windowcontrols/right-all -we login/hide_qr -we library/hide_whats_new ``` +#### Windows + +- Download the [Latest Release](https://github.com/tkashkin/Adwaita-for-Steam/releases) +- Ensure you have [Python](#requirements) installed +- Double click the `install_windows` bat script and follow the prompts + ### With graphical installer Use the [graphical installer](https://github.com/Foldex/AdwSteamGtk) by [@Foldex](https://github.com/Foldex). diff --git a/colorthemes/metro/metro.theme b/colorthemes/metro/metro.theme new file mode 100644 index 00000000..f357e39b --- /dev/null +++ b/colorthemes/metro/metro.theme @@ -0,0 +1,76 @@ +[general] +bg = #1A1A1AFF +fg = #FFFFFFFF + +[window] +border = #FFFFFF26 +window_bg = #1A1A1AFF +window_fg = #FFFFFFFF + +[headerbar] +headerbar_backdrop = #1A1A1AFF +headerbar_bg = #141414FF +headerbar_fg = #FFFFFFFF +headerbar_shade = #00000061 + +[popover] +popover_bg = #262626FF +popover_fg = #FFFFFFFF + +[toast] +toast_bg = #000000B3 +toast_fg = #FFFFFFFF + +[view] +view_bg = #1E1E1EFF +view_fg = #FFFFFFFF + +[accent] +accent = #0073C6FF +accent_bg = #0073C6FF +accent_fg = #FFFFFFFF +accent_disabled = #0073C680 +accent_hover_bg = #0073C612 +accent_active_bg = #0073C629 + +[destructive] +destructive = #F17079FF +destructive_bg = #E81224FF +destructive_fg = #FFFFFFFF +destructive_disabled = #F1707980 +destructive_hover_bg = #F1707912 +destructive_active_bg = #F1707929 + +[error] +error = #F17079FF +error_bg = #E81224FF +error_fg = #FFFFFFFF + +[success] +success = #82BA00FF +success_bg = #82BA00FF +success_fg = #FFFFFFFF + +[warning] +warning = #FFFF63FF +warning_bg = #FFF63FFF +warning_fg = #FFFFFFFF + +[button] +button_bg = #FFFFFF0D +button_fg = #FFFFFFFF + +[label] +dim_label_fg = #FFFFFF8C + +[card] +card_bg = #FFFFFF0D +card_solid_bg = #262626FF + +[focusring] +focusring = #0073C6FF + +[scrollbar] +scrollbar = #FFFFFF33 +scrollbar_hover = #FFFFFF66 +scrollbar_active = #FFFFFF99 diff --git a/colorthemes/metro/preview.png b/colorthemes/metro/preview.png new file mode 100644 index 0000000000000000000000000000000000000000..d747aa6f2da5dd8f53d6e408f0a93b191304d59f GIT binary patch literal 9518 zcmeHscQl;e`{1iYMjs_2`XD0F8NHhky^|t(^xj(#gfT`hiRdL-NQel6XweCyM33G( z5uMoA=llKb+1>N|WB2Tyv-`)+Idk6kKKI_Iz4xg%Qd?7rl!%T9002@IWuz_u;I;q& z&Q}O72;rjnSOY%rJQP&)ArQ#ayw)55u&<~f<@J3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uc~U4lC`$SG5aW2=g6mwzvf+_k ze;#P_BdB*DJH5^f>IJW=@q<}C`|MwewXJyczsa)ebWCJFd}Qj35({vNMw`TTEUyG+ zGKnLWmhmbyy|th^opQzhVq!>mzJ}ylxshjg{T$V zk`)-fQ1ZMjP^-W|2#~*$E#!D67g(upnc_aexCkdRWG;Y(ow6CB!#_qMG$R})((f2-?067T2 zQ4uNvyWVb)hArP>ww6klRn;;)_(%b)L4*B#FJLwS(J-eKG4fw~1PcG~LofVgV$df_ z$Ejb8Y*uGVgz#E`jGt!pLodQZoT}l6CI+v}ae~Qk-lmSN`fSVej*Do$*%mK4z4&Ll ztOgZV^|sfaY3m?*`pa8i9A}H{t|vZGy09$8l1-d33-pqz9F$QxYU6^4zZ=o(0ICyEQPf11DVT-+7mTo5UH||9 literal 0 HcmV?d00001 diff --git a/install.py b/install.py index 622690e6..a6c249e3 100755 --- a/install.py +++ b/install.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 from argparse import ArgumentParser from pathlib import Path +from sys import platform from tempfile import TemporaryDirectory, NamedTemporaryFile from typing import NoReturn import configparser @@ -9,17 +10,36 @@ import time import os -TEXT_BOLD = "\033[1m" -TEXT_BLUE = "\033[1;34m" -TEXT_GREEN = "\033[1;32m" -TEXT_PURPLE = "\033[1;35m" -TEXT_RED = "\033[1;31m" -TEXT_RESET = "\033[0m" - -TEXT_ARROW="→" -TEXT_CHECK="✓" -TEXT_CROSS="✖" -TEXT_INFO="✦" +# Platform Specific +if platform == "win32": + import winreg + WINDOWS_RUN = True + + TEXT_BOLD = "" + TEXT_BLUE = "" + TEXT_GREEN = "" + TEXT_PURPLE = "" + TEXT_RED = "" + TEXT_RESET = "" + + TEXT_ARROW = "" + TEXT_CHECK = "" + TEXT_CROSS = "" + TEXT_INFO = "" +else: + WINDOWS_RUN = False + + TEXT_BOLD = "\033[1m" + TEXT_BLUE = "\033[1;34m" + TEXT_GREEN = "\033[1;32m" + TEXT_PURPLE = "\033[1;35m" + TEXT_RED = "\033[1;31m" + TEXT_RESET = "\033[0m" + + TEXT_ARROW = "→" + TEXT_CHECK = "✓" + TEXT_CROSS = "✖" + TEXT_INFO = "✦" COLOR_THEME_DIR = "colorthemes" FONTS_DIR = "fonts" @@ -30,8 +50,10 @@ TARGET_NORMAL = "~/.steam/steam" TARGET_FLATPAK = "~/.var/app/com.valvesoftware.Steam/.steam/steam" +TARGET_WINDOWS = "C:/Program Files (x86)/Steam" TARGET_FONTS = "~/.local/share/fonts" +TARGET_FONTS_WIN = "AppData/Local/Microsoft/Windows/Fonts" STEAM_LOOPBACK = "https://steamloopback.host" STEAM_PATCHED_HEADER = "/*patched*/" @@ -132,17 +154,38 @@ def list_options(type: str, options: list[Path], suffix: str, sourcedir: Path, a print(f"{TEXT_PURPLE}{TEXT_INFO} No {type} available\n{TEXT_RESET}") # Fonts -def install_font(name: str, ext: str): - font = fontdir / name / ext - if font.exists(): - print(f"\n{TEXT_BLUE}{TEXT_ARROW} Installing font {TEXT_BOLD}{name}{TEXT_RESET}{TEXT_BLUE}...{TEXT_RESET}") - files = font.glob(f"*.{ext}") - target = Path(TARGET_FONTS).expanduser().resolve() - target.mkdir(exist_ok = True) - for f in files: - shutil.copy(f, target) +def install_font(name: str): + if WINDOWS_RUN: + target = Path.home() / TARGET_FONTS_WIN + ext = "ttf" else: + target = Path(TARGET_FONTS).expanduser().resolve() + ext = "otf" + + font = fontdir / name / ext + + if not font.is_dir(): print(f"{TEXT_PURPLE}{TEXT_INFO} Font: {TEXT_BOLD}{name}{TEXT_RESET}{TEXT_PURPLE} not found!{TEXT_RESET}") + return + + print(f"\n{TEXT_BLUE}{TEXT_ARROW} Installing font {TEXT_BOLD}{name}{TEXT_RESET}{TEXT_BLUE}...{TEXT_RESET}") + files = font.glob(f"*.{ext}") + target.mkdir(exist_ok = True) + for f in files: + target_file = target / f.name + + if target_file.is_file(): + print(f" {TEXT_BLUE}{TEXT_ARROW} Font {TEXT_BOLD}{f.name}{TEXT_RESET}{TEXT_BLUE} exists. Skipping...{TEXT_RESET}") + continue + + shutil.copy(f, target) + if WINDOWS_RUN: + win_reg_font(f.name, target_file) + +def win_reg_font(name: str, target: Path): + key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts", 0, winreg.KEY_ALL_ACCESS) + winreg.SetValueEx(key, str(name), 0, winreg.REG_SZ, str(target)) + winreg.CloseKey(key) # Webkit CSS def find_web_extras() -> list[Path]: @@ -280,6 +323,7 @@ def dev_reload(target: Path): tmpfile.write(b"") time.sleep(3) +# Run if __name__ == "__main__": if not webthemedir.exists(): raise SystemExit(f"{TEXT_RED}{TEXT_CROSS} Web Theme directory {TEXT_BOLD}{WEB_THEME_DIR}{TEXT_RESET}{TEXT_RED} does not exist. Make sure you're running the installer from its root directory{TEXT_RESET}") @@ -297,13 +341,16 @@ def dev_reload(target: Path): parser.add_argument("-we", "--web-extras", nargs = "+", action = "extend", help = "Enable one or multiple web theme extras") args = parser.parse_args() + if WINDOWS_RUN: + args.target = ["windows"] + if args.list_options: list_options("color themes", find_color_themes(), ".theme", colorthemedir, "color-theme") list_options("web extras", find_web_extras(), ".css", webextrasdir, "web-extras") exit(0) if args.font_install: - install_font("Cantarell", "otf") + install_font("Cantarell") selected_theme = None if args.color_theme: @@ -342,6 +389,8 @@ def dev_reload(target: Path): targets.add(Path(TARGET_NORMAL).expanduser().resolve()) elif t == "flatpak": targets.add(Path(TARGET_FLATPAK).expanduser().resolve()) + elif t == "windows": + targets.add(Path(TARGET_WINDOWS)) else: targets.add(Path(t).expanduser().resolve()) diff --git a/install_windows.bat b/install_windows.bat new file mode 100644 index 00000000..e88fa6f8 --- /dev/null +++ b/install_windows.bat @@ -0,0 +1,181 @@ +@echo off +ECHO ---------------------------- +ECHO Adwaita for Steam Installer +ECHO ---------------------------- + +:: ----------------- +:: --- VARIABLES --- +:: ----------------- +:: --- Do not edit these --- + +:: --- General --- +SET NO_ROUNDED_CORNERS=-we general/no_rounded_corners + +:: --- Library --- +SET HIDE_WHATS_NEW=-we library/hide_whats_new +SET SIDEBAR_HOVER_ONLY=-we library/sidebar_hover + +:: --- Login --- +SET LOGIN_HIDE_QR=-we login/hide_qr +SET LOGIN_HOVER_ONLY_QR=-we login/hover_qr + +:: --- Top Bar --- +SET HIDE_BIG_PICTURE_BUTTON=-we topbar/hide_bp +SET HIDE_PAGE_URL=-we topbar/hide_url +SET SHOW_NAVIGATION_ARROWS=-we topbar/show_arrows +SET ORIGINAL_STYLE_TOP_BAR=-we topbar/vanilla_bar + +:: --- Bottom Bar --- +SET HIDE_BOTTOM_BAR=-we bottombar/hide_bar + +:: --- Window Controls --- +SET WINDOW_CONTROLS=-we windowcontrols/right-all + +GOTO START_SECTION + +:: --------------- +:: --- DEFAULT --- +:: --------------- +:DEFAULT_SECTION +SET CHOSEN_COLORTHEME=adwaita + +:: SET CHOSEN_NO_ROUNDED_CORNERS=%NO_ROUNDED_CORNERS% + +:: SET CHOSEN_HIDE_WHATS_NEW=%HIDE_WHATS_NEW% +:: SET CHOSEN_SIDEBAR_HOVER_ONLY=%SIDEBAR_HOVER_ONLY% + +:: Only uncomment one +:: SET CHOSEN_LOGIN_QR=%LOGIN_HOVER_ONLY_QR% +:: SET CHOSEN_LOGIN_QR=%LOGIN_HIDE_QR% + +:: SET CHOSEN_ORIGINAL_STYLE_TOP_BAR=%ORIGINAL_STYLE_TOP_BAR% +:: SET CHOSEN_HIDE_BIG_PICTURE_BUTTON=%HIDE_BIG_PICTURE_BUTTON% +:: SET CHOSEN_HIDE_PAGE_URL=%HIDE_PAGE_URL% +:: SET CHOSEN_SHOW_NAVIGATION_ARROWS=%SHOW_NAVIGATION_ARROWS% + +:: SET CHOSEN_HIDE_BOTTOM_BAR=%HIDE_BOTTOM_BAR% + +GOTO INSTALL_SECTION + +:: ------------- +:: --- METRO --- +:: ------------- +:METRO_SECTION +SET CHOSEN_COLORTHEME=metro +SET CHOSEN_NO_ROUNDED_CORNERS=%NO_ROUNDED_CORNERS% +GOTO INSTALL_SECTION + +:: -------------- +:: --- CUSTOM --- +:: -------------- +:CUSTOM_SECTION +ECHO --- Colortheme --- +ECHO 1) adwaita +ECHO 2) breeze +ECHO 3) catppuccin-frappe +ECHO 4) catppuccin-macchiato +ECHO 5) catppuccin-mocha +ECHO 6) dracula +ECHO 7) gruvbox +ECHO 8) kate +ECHO 9) metro +ECHO 10) nord +ECHO 11) one-pro +ECHO 12) pop +ECHO 13) tokyo-night +ECHO 14) tomorrow-night +ECHO 15) yaru +SET /p MENUCHOICE="Enter a number: " +IF %MENUCHOICE%==1 SET CHOSEN_COLORTHEME=adwaita +IF %MENUCHOICE%==2 SET CHOSEN_COLORTHEME=breeze +IF %MENUCHOICE%==3 SET CHOSEN_COLORTHEME=catppuccin-frappe +IF %MENUCHOICE%==4 SET CHOSEN_COLORTHEME=catppuccin-macchiato +IF %MENUCHOICE%==5 SET CHOSEN_COLORTHEME=catppuccin-mocha +IF %MENUCHOICE%==6 SET CHOSEN_COLORTHEME=dracula +IF %MENUCHOICE%==7 SET CHOSEN_COLORTHEME=gruvbox +IF %MENUCHOICE%==8 SET CHOSEN_COLORTHEME=kate +IF %MENUCHOICE%==9 SET CHOSEN_COLORTHEME=metro +IF %MENUCHOICE%==10 SET CHOSEN_COLORTHEME=nord +IF %MENUCHOICE%==11 SET CHOSEN_COLORTHEME=one-pro +IF %MENUCHOICE%==12 SET CHOSEN_COLORTHEME=pop +IF %MENUCHOICE%==13 SET CHOSEN_COLORTHEME=tokyo-night +IF %MENUCHOICE%==14 SET CHOSEN_COLORTHEME=tomorrow-night +IF %MENUCHOICE%==15 SET CHOSEN_COLORTHEME=yaru +ECHO. + +ECHO --- General --- +ECHO Disable Rounded Corners? +SET /p MENUCHOICE="(y/n): " +IF %MENUCHOICE%==y SET CHOSEN_NO_ROUNDED_CORNERS=%NO_ROUNDED_CORNERS% +ECHO. + +ECHO --- Library --- +ECHO Hide the Library What's New Shelf? +SET /p MENUCHOICE="(y/n): " +IF %MENUCHOICE%==y SET CHOSEN_HIDE_WHATS_NEW=%HIDE_WHATS_NEW% +ECHO. +ECHO Show Library Sidebar only on mouse over? +SET /p MENUCHOICE="(y/n): " +IF %MENUCHOICE%==y SET CHOSEN_SIDEBAR_HOVER_ONLY=%SIDEBAR_HOVER_ONLY% +ECHO. + +ECHO --- Login --- +ECHO Login Dialog Mobile QR Code +ECHO 1) Show +ECHO 2) Show only on mouse over +ECHO 3) Hide +SET /p MENUCHOICE="Enter a number: " +IF %MENUCHOICE%==2 SET CHOSEN_LOGIN_QR=%LOGIN_HOVER_ONLY_QR% +IF %MENUCHOICE%==3 SET CHOSEN_LOGIN_QR=%LOGIN_HIDE_QR% +ECHO. + +ECHO --- Top Bar --- +ECHO Use the Original Steam Style Top Bar? +SET /p MENUCHOICE="(y/n): " +IF %MENUCHOICE%==y SET CHOSEN_ORIGINAL_STYLE_TOP_BAR=%ORIGINAL_STYLE_TOP_BAR% +ECHO. +ECHO Hide Big Picture Button? +SET /p MENUCHOICE="(y/n): " +IF %MENUCHOICE%==y SET CHOSEN_HIDE_BIG_PICTURE_BUTTON=%HIDE_BIG_PICTURE_BUTTON% +ECHO. +ECHO Hide Page URL? +SET /p MENUCHOICE="(y/n): " +IF %MENUCHOICE%==y SET CHOSEN_HIDE_PAGE_URL=%HIDE_PAGE_URL% +ECHO. +ECHO Show Forward/Backward Navigation Arrows? +SET /p MENUCHOICE="(y/n): " +IF %MENUCHOICE%==y SET CHOSEN_SHOW_NAVIGATION_ARROWS=%SHOW_NAVIGATION_ARROWS% +ECHO. + +ECHO --- Bottom Bar --- +ECHO Hide the Bottom Bar? +SET /p MENUCHOICE="(y/n): " +IF %MENUCHOICE%==y SET CHOSEN_HIDE_BOTTOM_BAR=%HIDE_BOTTOM_BAR% +ECHO. + +GOTO INSTALL_SECTION + +:: ------------- +:: --- START --- +:: ------------- +:START_SECTION + +ECHO. +ECHO ------------------- +ECHO --- Menu Select --- +ECHO ------------------- +ECHO 1) Default Install (Quick) +ECHO 2) Metro Install (Quick) +ECHO 3) Custom Install (Interactive) + +SET /p MENUCHOICE="Enter a number: " + +IF %MENUCHOICE%==2 GOTO METRO_SECTION +IF %MENUCHOICE%==3 GOTO CUSTOM_SECTION + +GOTO DEFAULT_SECTION + +:: --- Install --- +:INSTALL_SECTION +install.py -fi -c %CHOSEN_COLORTHEME% %CHOSEN_NO_ROUNDED_CORNERS% %CHOSEN_HIDE_WHATS_NEW% %CHOSEN_SIDEBAR_HOVER_ONLY% %CHOSEN_LOGIN_QR% %CHOSEN_HIDE_BIG_PICTURE_BUTTON% %CHOSEN_HIDE_PAGE_URL% %CHOSEN_SHOW_NAVIGATION_ARROWS% %CHOSEN_ORIGINAL_STYLE_TOP_BAR% %CHOSEN_HIDE_BOTTOM_BAR% %WINDOW_CONTROLS% +PAUSE