diff --git a/windows/batch/Audio Engine Restart.bat b/Batch Scripts/Audio Engine Restart.bat similarity index 99% rename from windows/batch/Audio Engine Restart.bat rename to Batch Scripts/Audio Engine Restart.bat index 75450bf..48e3422 100644 --- a/windows/batch/Audio Engine Restart.bat +++ b/Batch Scripts/Audio Engine Restart.bat @@ -1,3 +1,3 @@ -@rem For use with Lenovo Legion laptops when the Audio driver outright dies from sleep or hardware change???? -pnputil /disable-device "SWD\DRIVERENUM\{C3A63EDD-2D27-4B66-B155-5E94B43D926A}#REALTEKAPO&6&1DC6BD64&0" +@rem For use with Lenovo Legion laptops when the Audio driver outright dies from sleep or hardware change???? +pnputil /disable-device "SWD\DRIVERENUM\{C3A63EDD-2D27-4B66-B155-5E94B43D926A}#REALTEKAPO&6&1DC6BD64&0" pnputil /enable-device "SWD\DRIVERENUM\{C3A63EDD-2D27-4B66-B155-5E94B43D926A}#REALTEKAPO&6&1DC6BD64&0" \ No newline at end of file diff --git a/Batch Scripts/ConvertHEIC.bat b/Batch Scripts/ConvertHEIC.bat new file mode 100644 index 0000000..42a67b8 --- /dev/null +++ b/Batch Scripts/ConvertHEIC.bat @@ -0,0 +1,4 @@ +@REM Converts a given JPEG to HEIC +cd "C:\Users\Jose\Documents\Code\Scripts\Shell Scripts\python" +pip install -r requirements.txt +python.exe convert_heic.py "%1" \ No newline at end of file diff --git a/windows/batch/FixTime.bat b/Batch Scripts/FixTime.bat similarity index 94% rename from windows/batch/FixTime.bat rename to Batch Scripts/FixTime.bat index dd5357d..487379b 100644 --- a/windows/batch/FixTime.bat +++ b/Batch Scripts/FixTime.bat @@ -1,8 +1,8 @@ -@rem Fixes system time when rebooting -@echo off - -net stop w32time -w32tm /unregister -w32tm /register -net start w32time +@rem Fixes system time when rebooting +@echo off + +net stop w32time +w32tm /unregister +w32tm /register +net start w32time w32tm /resync \ No newline at end of file diff --git a/OBS/PlexAmp/main.css b/OBS/PlexAmp/main.css new file mode 100644 index 0000000..b03999f --- /dev/null +++ b/OBS/PlexAmp/main.css @@ -0,0 +1,61 @@ +body { + margin: 0; + background-color: black; +} + +:root { + font-family: "Montserrat"; + --teal: #00e7a9; + --height: 64px; +} + +.main { + display: flex; + flex-direction: row; + + width: 384px; + height: var(--height); + padding: 1rem; + border-radius: 8px; + + color: white; + /* background-color: #252525; */ + background-color: transparent; + + outline: 4px solid var(--teal); + outline-offset: -8px; +} + +.main img { + width: auto; + height: var(--height); + margin-right: 1rem; + border-radius: 1px; +} + +.main .text { + width: 100%; + display: flex; + flex-direction: column; + justify-content: flex-start; +} + +.main .text b { + font-size: 1.15rem; +} + +#artist, +#album { + white-space: nowrap; +} + +.row-text { + display: flex; + flex-direction: row; + justify-content: space-between; + width: 100%; +} + +.row-text div { + width: 50%; +} diff --git a/OBS/PlexAmp/main.html b/OBS/PlexAmp/main.html new file mode 100644 index 0000000..1b13dd2 --- /dev/null +++ b/OBS/PlexAmp/main.html @@ -0,0 +1,25 @@ + + + + + + +   + + + + + +
+ +
+ +
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/OBS/PlexAmp/main.js b/OBS/PlexAmp/main.js new file mode 100644 index 0000000..2e47807 --- /dev/null +++ b/OBS/PlexAmp/main.js @@ -0,0 +1,123 @@ +let intvl = null; +let lastSongData = null; + +const PLEX_TOKEN = "hisKts9QfWyfLsAhkwDu"; +const sessionUrl = `http://172.16.1.3:32400/status/sessions?X-Plex-Token=${PLEX_TOKEN}`; + +const marqueeify = (text, elementType, amt) => { + if (text.length > amt) { + return `<${elementType}>${text}`; + } else { + return `<${elementType}>${text}`; + } +}; + +const parseXml = (xml, arrayTags) => { + let dom = null; + if (window.DOMParser) dom = new DOMParser().parseFromString(xml, "text/xml"); + else if (window.ActiveXObject) { + dom = new ActiveXObject("Microsoft.XMLDOM"); + dom.async = false; + if (!dom.loadXML(xml)) + throw dom.parseError.reason + " " + dom.parseError.srcText; + } else throw new Error("cannot parse xml string!"); + + const parseNode = (xmlNode, result) => { + if (xmlNode.nodeName == "#text") { + let v = xmlNode.nodeValue; + if (v.trim()) result["#text"] = v; + return; + } + + let jsonNode = {}, + existing = result[xmlNode.nodeName]; + if (existing) { + if (!Array.isArray(existing)) + result[xmlNode.nodeName] = [existing, jsonNode]; + else result[xmlNode.nodeName].push(jsonNode); + } else { + if (arrayTags && arrayTags.indexOf(xmlNode.nodeName) != -1) + result[xmlNode.nodeName] = [jsonNode]; + else result[xmlNode.nodeName] = jsonNode; + } + + if (xmlNode.attributes) + for (let attribute of xmlNode.attributes) + jsonNode[attribute.nodeName] = attribute.nodeValue; + + for (let node of xmlNode.childNodes) parseNode(node, jsonNode); + }; + + let result = {}; + for (let node of dom.childNodes) { + parseNode(node, result); + } + + return result; +}; + +const getTrackData = async () => { + const resp = await fetch(sessionUrl); + if (!resp.ok) return; + + const xml = await resp.text(); + const data = parseXml(xml); + + // Tracks need to be normalized into an array for the sake of my own sanity + const tracks = Array.isArray(data.MediaContainer.Track) + ? data.MediaContainer.Track + : [data.MediaContainer.Track]; + + if (tracks.length === 0) return null; + if (tracks.length === 1) return tracks[0]; + + const [bestMatch] = data.MediaContainer.Track.filter((track) => { + return ( + track.User.title === "oitsjustjose" && + track.Player.product === "Chromatix" + ); + }); + + return bestMatch; +}; + +const getData = async () => { + const track = await getTrackData(); + if (!track) return; + + const songData = { + song: track.title, + artist: track.grandparentTitle, + album: track.parentTitle, + art: `http://172.16.1.3:32400${track.thumb}?X-Plex-Token=${PLEX_TOKEN}`, + state: track.Player.state, + }; + + // Same as last time, nothing to do here + if (JSON.stringify(songData) === lastSongData) return; + + const art = document.getElementById("art"); + art.setAttribute("src", songData.art); + art.style.filter = songData.state === "playing" ? "none" : "saturate(0)"; + + document.getElementById("name").innerHTML = marqueeify( + songData.song, + "b", + 45 + ); + document.getElementById("artist-album").innerHTML = marqueeify( + `${songData.album} by ${songData.artist}`, + "p", + 45 + ); + + lastSongData = JSON.stringify(songData); +}; + +document.addEventListener("DOMContentLoaded", async () => { + intvl = setInterval(async () => await getData(), 250); +}); + +document.addEventListener("beforeunload", () => { + clearInterval(intvl); +}); diff --git a/windows/obs/ResolutionUtils/MonitorSwitcher.exe b/OBS/ResolutionUtils/MonitorSwitcher.exe similarity index 100% rename from windows/obs/ResolutionUtils/MonitorSwitcher.exe rename to OBS/ResolutionUtils/MonitorSwitcher.exe diff --git a/OBS/ResolutionUtils/Normal.xml b/OBS/ResolutionUtils/Normal.xml new file mode 100644 index 0000000..8dd0726 --- /dev/null +++ b/OBS/ResolutionUtils/Normal.xml @@ -0,0 +1 @@ +84209001InUse84209043550DisplayportExternalRotate270Identity1439811000ProgressivetrueInUse184209013InUse84209043572DisplayportExternalIdentityIdentity1649001000ProgressivetrueInUse14355842090Target346500000346500000208014398110001920108020801157OtherProgressive0842090Source19201080Pixelformat32Bpp344004357842090Target10192800001019280000360016490010003440144036001717OtherProgressive1842090Source34401440Pixelformat32Bpp002793423474trueXAAAAFwAAAA/AAAAXAAAAEQAAABJAAAAUwAAAFAAAABMAAAAQQAAAFkAAAAjAAAARwAAAFMAAABNAAAANQAAAEIAAABCAAAAMgAAACMAAAA1AAAAJgAAADIAAABhAAAANwAAADQAAAA1AAAAOQAAADcAAAAwAAAAJgAAADAAAAAmAAAAVQAAAEkAAABEAAAANAAAADMAAAA1AAAANQAAACMAAAB7AAAAZQAAADYAAABmAAAAMAAAADcAAABiAAAANQAAAGYAAAAtAAAAZQAAAGUAAAA5AAAANwAAAC0AAAA0AAAAYQAAADkAAAAwAAAALQAAAGIAAAAwAAAANwAAADYAAAAtAAAAMwAAADMAAABmAAAANQAAADcAAABiAAAAZgAAADQAAABlAAAAYQAAAGEAAAA3AAAAfQAAAA==TAAAAEcAAAAgAAAAVQAAAEwAAABUAAAAUgAAAEEAAABHAAAARQAAAEEAAABSAAAA00false4404841490trueXAAAAFwAAAA/AAAAXAAAAEQAAABJAAAAUwAAAFAAAABMAAAAQQAAAFkAAAAjAAAARAAAAEUAAABMAAAAQQAAADIAAAAxAAAAMgAAACMAAAA1AAAAJgAAADIAAABhAAAANwAAADQAAAA1AAAAOQAAADcAAAAwAAAAJgAAADAAAAAmAAAAVQAAAEkAAABEAAAANAAAADMAAAA1AAAANwAAACMAAAB7AAAAZQAAADYAAABmAAAAMAAAADcAAABiAAAANQAAAGYAAAAtAAAAZQAAAGUAAAA5AAAANwAAAC0AAAA0AAAAYQAAADkAAAAwAAAALQAAAGIAAAAwAAAANwAAADYAAAAtAAAAMwAAADMAAABmAAAANQAAADcAAABiAAAAZgAAADQAAABlAAAAYQAAAGEAAAA3AAAAfQAAAA==QQAAAFcAAAAzAAAANAAAADIAAAAzAAAARAAAAFcAAABGAAAA00false \ No newline at end of file diff --git a/OBS/ResolutionUtils/Py/OBS.py b/OBS/ResolutionUtils/Py/OBS.py new file mode 100644 index 0000000..6c0db49 --- /dev/null +++ b/OBS/ResolutionUtils/Py/OBS.py @@ -0,0 +1,16 @@ +from subprocess import Popen +from pathlib import Path + +cwd = Path(__file__).parent.parent.resolve() +print(f"cwd={cwd}") + +def on_event(event): + if event == obspython.OBS_FRONTEND_EVENT_SCRIPTING_SHUTDOWN: + proc = Popen(["MonitorSwitcher.exe", "-load:Normal.xml"], cwd=cwd, shell=True) + _ = proc.communicate() + + +def script_load(settings): + obspython.obs_frontend_add_event_callback(on_event) + proc = Popen(["MonitorSwitcher.exe", "-load:Recording.xml"], cwd=cwd, shell=True) + _ = proc.communicate() diff --git a/OBS/ResolutionUtils/Py/__pycache__/OBS.cpython-310.pyc b/OBS/ResolutionUtils/Py/__pycache__/OBS.cpython-310.pyc new file mode 100644 index 0000000..51fdb7e Binary files /dev/null and b/OBS/ResolutionUtils/Py/__pycache__/OBS.cpython-310.pyc differ diff --git a/OBS/ResolutionUtils/Recording.xml b/OBS/ResolutionUtils/Recording.xml new file mode 100644 index 0000000..50a5a86 --- /dev/null +++ b/OBS/ResolutionUtils/Recording.xml @@ -0,0 +1 @@ +84209001InUse84209043550DisplayportExternalRotate270Identity1439811000ProgressivetrueInUse184209013InUse84209043572DisplayportExternalIdentityIdentity1649001000ProgressivetrueInUse14355842090Target346500000346500000208014398110001920108020801157OtherProgressive0842090Source19201080Pixelformat32Bpp256004357842090Target10192800001019280000360016490010003440144036001717OtherProgressive1842090Source25601440Pixelformat32Bpp002793423474trueXAAAAFwAAAA/AAAAXAAAAEQAAABJAAAAUwAAAFAAAABMAAAAQQAAAFkAAAAjAAAARwAAAFMAAABNAAAANQAAAEIAAABCAAAAMgAAACMAAAA1AAAAJgAAADIAAABhAAAANwAAADQAAAA1AAAAOQAAADcAAAAwAAAAJgAAADAAAAAmAAAAVQAAAEkAAABEAAAANAAAADMAAAA1AAAANQAAACMAAAB7AAAAZQAAADYAAABmAAAAMAAAADcAAABiAAAANQAAAGYAAAAtAAAAZQAAAGUAAAA5AAAANwAAAC0AAAA0AAAAYQAAADkAAAAwAAAALQAAAGIAAAAwAAAANwAAADYAAAAtAAAAMwAAADMAAABmAAAANQAAADcAAABiAAAAZgAAADQAAABlAAAAYQAAAGEAAAA3AAAAfQAAAA==TAAAAEcAAAAgAAAAVQAAAEwAAABUAAAAUgAAAEEAAABHAAAARQAAAEEAAABSAAAA00false4404841490trueXAAAAFwAAAA/AAAAXAAAAEQAAABJAAAAUwAAAFAAAABMAAAAQQAAAFkAAAAjAAAARAAAAEUAAABMAAAAQQAAADIAAAAxAAAAMgAAACMAAAA1AAAAJgAAADIAAABhAAAANwAAADQAAAA1AAAAOQAAADcAAAAwAAAAJgAAADAAAAAmAAAAVQAAAEkAAABEAAAANAAAADMAAAA1AAAANwAAACMAAAB7AAAAZQAAADYAAABmAAAAMAAAADcAAABiAAAANQAAAGYAAAAtAAAAZQAAAGUAAAA5AAAANwAAAC0AAAA0AAAAYQAAADkAAAAwAAAALQAAAGIAAAAwAAAANwAAADYAAAAtAAAAMwAAADMAAABmAAAANQAAADcAAABiAAAAZgAAADQAAABlAAAAYQAAAGEAAAA3AAAAfQAAAA==QQAAAFcAAAAzAAAANAAAADIAAAAzAAAARAAAAFcAAABGAAAA00false \ No newline at end of file diff --git a/linux/python/.gitignore b/Shell Scripts/python/.gitignore similarity index 100% rename from linux/python/.gitignore rename to Shell Scripts/python/.gitignore diff --git a/Shell Scripts/python/convert_heic.py b/Shell Scripts/python/convert_heic.py new file mode 100644 index 0000000..15eb3db --- /dev/null +++ b/Shell Scripts/python/convert_heic.py @@ -0,0 +1,19 @@ +from PIL import Image +from pillow_heif import register_heif_opener +from pathlib import Path +from sys import argv + +def main() -> None: + if len(argv) < 2: + return + + path = Path(argv[1]).resolve() + if path.suffix.lower() != ".heic": + return + + register_heif_opener() + im = Image.open(path) + im.save(path.with_suffix(".jpeg"), quality=100) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/linux/python/make_random.py b/Shell Scripts/python/make_random.py similarity index 100% rename from linux/python/make_random.py rename to Shell Scripts/python/make_random.py diff --git a/linux/python/new-uuid.py b/Shell Scripts/python/new-uuid.py similarity index 100% rename from linux/python/new-uuid.py rename to Shell Scripts/python/new-uuid.py diff --git a/Shell Scripts/python/requirements.txt b/Shell Scripts/python/requirements.txt new file mode 100644 index 0000000..c0ff117 --- /dev/null +++ b/Shell Scripts/python/requirements.txt @@ -0,0 +1,2 @@ +pillow==11.3.0 +pillow_heif==1.1.1 \ No newline at end of file diff --git a/linux/python/scan_jars.py b/Shell Scripts/python/scan_jars.py similarity index 100% rename from linux/python/scan_jars.py rename to Shell Scripts/python/scan_jars.py diff --git a/linux/python/utils.py b/Shell Scripts/python/utils.py similarity index 100% rename from linux/python/utils.py rename to Shell Scripts/python/utils.py diff --git a/linux/python/wifi_qr.py b/Shell Scripts/python/wifi_qr.py similarity index 100% rename from linux/python/wifi_qr.py rename to Shell Scripts/python/wifi_qr.py diff --git a/linux/setup/setup_jarscan.sh b/Shell Scripts/setup/setup_jarscan.sh old mode 100755 new mode 100644 similarity index 100% rename from linux/setup/setup_jarscan.sh rename to Shell Scripts/setup/setup_jarscan.sh diff --git a/linux/setup/setup_makerand.sh b/Shell Scripts/setup/setup_makerand.sh old mode 100755 new mode 100644 similarity index 100% rename from linux/setup/setup_makerand.sh rename to Shell Scripts/setup/setup_makerand.sh diff --git a/linux/setup/setup_uuid.sh b/Shell Scripts/setup/setup_uuid.sh old mode 100755 new mode 100644 similarity index 100% rename from linux/setup/setup_uuid.sh rename to Shell Scripts/setup/setup_uuid.sh diff --git a/linux/setup/setup_wifiqr.sh b/Shell Scripts/setup/setup_wifiqr.sh old mode 100755 new mode 100644 similarity index 100% rename from linux/setup/setup_wifiqr.sh rename to Shell Scripts/setup/setup_wifiqr.sh diff --git a/windows/terminal/settings.json b/Windows Terminal/settings.json similarity index 100% rename from windows/terminal/settings.json rename to Windows Terminal/settings.json diff --git a/macos/UsefulTools.sh b/macos/UsefulTools.sh deleted file mode 100644 index 09c2c55..0000000 --- a/macos/UsefulTools.sh +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/bash - - - -# --------------------------------------------------------- # -# RC-file discovery # -# --------------------------------------------------------- # - -# Try to use zshrc, but if no zsh use bash -RC_FILE=$(realpath ~/.zshrc) -IS_ZSH=true - -if [ ! -f $RC_FILE ] ; -then - RC_FILE=$(realpath ~/.bashrc) - IS_ZSH=false -fi - -echo "Using ${RC_FILE} as rcfile" - -# --------------------------------------------------------- # -# bat -- a syntax-aware, themable cat replacement # -# --------------------------------------------------------- # - - -BAT_VERSION="0.18.1" -BAT_THEME="Nord" - -echo "Installing Bat Version ${BAT_VERSION}" -wget -q "https://github.com/sharkdp/bat/releases/download/v${BAT_VERSION}/bat-musl_${BAT_VERSION}_amd64.deb" 2>&1>/dev/null -sudo dpkg -i "bat-musl_${BAT_VERSION}_amd64.deb" 2>&1>/dev/null -rm "bat-musl_${BAT_VERSION}_amd64.deb" - -# Add the nord theme variable -if /bin/cat "$RC_FILE" | grep -i "export BAT_THEME=" > /dev/null; -then - echo "Theme is already installed -- NOT overriden" -else - echo "export BAT_THEME=${BAT_THEME}" >> ~/.zshrc - echo "Set bat theme to ${BAT_THEME}" -fi - - -# --------------------------------------------------------- # -# delta -- a replacement for `git diff` # -# --------------------------------------------------------- # - -DELTA_VERSION="0.8.0" - -echo "Installing Delta Version ${DELTA_VERSION}" -wget -q "https://github.com/dandavison/delta/releases/download/${DELTA_VERSION}/git-delta-musl_${DELTA_VERSION}_amd64.deb" -sudo dpkg -i "git-delta-musl_${DELTA_VERSION}_amd64.deb" 2>&1>/dev/null -rm "git-delta-musl_${DELTA_VERSION}_amd64.deb" - -# Alias diff to delta -if /bin/cat "$RC_FILE" | grep -e "alias diff=delta" > /dev/null; -then - echo "Diff is already aliased to delta. Skipping.." -else - echo "Aliasing diff to delta" - echo "alias diff=delta" >> $RC_FILE -fi - - -# --------------------------------------------------------- # -# dust - a more visual, yet slower, du # -# --------------------------------------------------------- # - - -DUST_VERSION="0.5.4" - -echo "Installing Dust Version ${DUST_VERSION}" - -wget -q "https://github.com/bootandy/dust/releases/download/v${DUST_VERSION}/dust-v${DUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" -tar -xzf "dust-v${DUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" -rm "dust-v${DUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" -sudo mv dust-v0.5.4-x86_64-unknown-linux-musl/dust /usr/local/bin -rm -r "dust-v${DUST_VERSION}-x86_64-unknown-linux-musl" - -# --------------------------------------------------------- # -# duf - a more visual df alternative # -# --------------------------------------------------------- # - -DUF_VERSION="0.6.2" - -echo "Installing Duf Version ${DUF_VERSION}" - -wget -q "https://github.com/muesli/duf/releases/download/v${DUF_VERSION}/duf_${DUF_VERSION}_linux_amd64.deb" -sudo dpkg -i "duf_${DUF_VERSION}_linux_amd64.deb" -rm "duf_${DUF_VERSION}_linux_amd64.deb" - -# Alias df to duf -if /bin/cat "$RC_FILE" | grep -e "alias df=duf" > /dev/null; -then - echo "Df is already aliased to duf. Skipping.." -else - echo "Aliasing df to duf" - echo "alias df=duf" >> $RC_FILE -fi - - -# --------------------------------------------------------- # -# McFly - a faster alt to ctrl+r rev search # -# --------------------------------------------------------- # - -MCF_VERSION="0.5.6" - -echo "Installing mcfly Version ${MCF_VERSION}" - -wget -q "https://github.com/cantino/mcfly/releases/download/v${MCF_VERSION}/mcfly-v${MCF_VERSION}-x86_64-unknown-linux-gnu.tar.gz" -tar -xzf "mcfly-v${MCF_VERSION}-x86_64-unknown-linux-gnu.tar.gz" -rm "mcfly-v${MCF_VERSION}-x86_64-unknown-linux-gnu.tar.gz" -sudo mv mcfly /usr/local/bin - -rm mcfly.bash mcfly.fish mcfly.zsh 2>&1 > /dev/null - -if /bin/cat "$RC_FILE" | grep -i 'mcfly init' > /dev/null; -then - echo "Looks like mcfly init script is already in ${RC_FILE}!" -else - if [ "$IS_ZSH" = true ]; - then - echo 'eval "$(mcfly init zsh)"' >> "$RC_FILE" - else - echo 'eval "$(mcfly init bash)"' >> "$RC_FILE" - fi - echo "Added McFly init to ${RC_FILE}" -fi - - -# --------------------------------------------------------- # -# GTOP - a nicer TOP GUI, requires Node... # -# --------------------------------------------------------- # - -if command -v npm &> /dev/null && ! which npm | grep /mnt/c/ &> /dev/null ; -then - echo "Installing GTOP via NPM" - npm i -g gtop -else - if command -v docker &> /dev/null ; - then - echo "Installing GTOP via Docker" - if /bin/cat "$RC_FILE" | grep -i 'alias gtop=' > /dev/null; - then - echo "Looks like gtop is already aliased!" - else - echo $'alias gtop=\'docker run --rm -it --name gtop --net=host --pid=host aksakalli/gtop\'' >> "$RC_FILE" - echo $'eval "$(alias gtop=\'docker run --rm -it --name gtop --net=host --pid=host aksakalli/gtop\')"' >> "$RC_FILE" - fi - else - echo "Neither NPM nor Docker could not be found, skipping GTOP installation" - fi -fi - -echo "Done installing tools! Restarting shell" -exec "$SHELL" diff --git a/minecraft/Modpack Finalizers/1.20-/Pack Finalizer.bat b/minecraft/Modpack Finalizers/1.20-/Pack Finalizer.bat deleted file mode 100644 index 3a23570..0000000 --- a/minecraft/Modpack Finalizers/1.20-/Pack Finalizer.bat +++ /dev/null @@ -1,12 +0,0 @@ -@echo off - -:loop - -@echo Processing file: %1 -python.exe .\main.py %1 -@echo "Done!" - -shift -if not "%~1"=="" goto loop - -@REM pause \ No newline at end of file diff --git a/minecraft/Modpack Finalizers/1.20-/main.py b/minecraft/Modpack Finalizers/1.20-/main.py deleted file mode 100644 index 0ae63a2..0000000 --- a/minecraft/Modpack Finalizers/1.20-/main.py +++ /dev/null @@ -1,187 +0,0 @@ -"""@author Jose Stovall | github.com/oitsjustjose""" - -import json -import os -import shutil -import sys -import zipfile -from pathlib import Path -from typing import List - -import toml - -THIS_DIR = Path(__file__).absolute().parent -CLEANUP_CONF_PATH = THIS_DIR.joinpath("..").joinpath("configuration.json").resolve() -MMC_EXPORT_CONFIG_PATH = THIS_DIR.joinpath("config.toml").resolve() -TROUBLEMAKERS_PATH = THIS_DIR.joinpath("troublemakers").resolve() -WORKING_FOLDER: Path = Path(".").resolve() # Temp, gets resolved from sys.argv in main() - -# Temporary variables that aren't actually persistent really -__TMP_PACK_UNZIPPED_PATH = THIS_DIR.joinpath("activepack").resolve() -__TMP_PACK_ZIP_PATH = THIS_DIR.joinpath("activepack.zip").resolve() -__TMP_RESPACK_DIR = __TMP_PACK_UNZIPPED_PATH.joinpath("minecraft").joinpath("resourcepacks").resolve() - - -def print(obj): - """override""" - # log_nm_base = sys.argv[1].split("\\")[-1] - - log_nm_base = Path() - - with open(f"./{log_nm_base}.log", "a+", encoding="utf-8") as log_handle: - log_handle.write(f"{str(obj)}\n") - - -def _clean_pack(): - """ - Removes client-only configs/files - """ - with open(CLEANUP_CONF_PATH, "r", encoding="utf-8") as handle: - config = json.loads(handle.read()) - - for to_del in config["remove"]: - fpath = __TMP_PACK_UNZIPPED_PATH.joinpath("minecraft").joinpath(to_del) - - if not fpath.exists(): - continue - - if fpath.is_dir(): - shutil.rmtree(fpath) - print(f"Removed directory {fpath}") - continue - - fpath.unlink() - print(f"Removed file {fpath}") - - -def _get_modpack_outnames(join: bool = False) -> List[str]: - """ - Gets the MR_{packname}.mrpack and CF_{packname}.zip names based off of the config.toml contents - Args: join (bool) [False]: Whether to join them to the current dir or not - Returns: Tuple[str, str]: The MR_ and CF_ paths (in that order) - """ - with open(MMC_EXPORT_CONFIG_PATH, "r", encoding="utf-8") as handle: - name = toml.loads(handle.read())["name"] - if join: - return [ - str(THIS_DIR.joinpath(f"MR_{name}.mrpack")), - str(THIS_DIR.joinpath(f"CF_{name}.zip")), - ] - return [f"MR_{name}.mrpack", f"CF_{name}.zip"] - - -def __cleanup() -> None: - """Cleans up output files""" - os.unlink(MMC_EXPORT_CONFIG_PATH) - os.unlink(__TMP_PACK_ZIP_PATH) - shutil.rmtree(__TMP_PACK_UNZIPPED_PATH) - shutil.rmtree(TROUBLEMAKERS_PATH) - for file in os.listdir(THIS_DIR): - if file.startswith("CF_") or file.startswith("MR_"): - THIS_DIR.joinpath(file).unlink() - - -def main() -> None: - """ - The main run function. - Args: None - Returns: None - Process Flow: - 1. Move file to this dir - 2. Unzip it, then: - 1. Clean up the client mods - 2. Grab the config.toml - 3. Find any exceptive files that are going to be a PITA and remove them (a. la. Witchery in the RP's dir) - 3. Re-zip - 4. mmc-export - 5. Move files from step 3 into output files - 6. Move output folders back to originating dir - """ - if len(sys.argv) != 2: - print("Missing 2nd parameter File") - return - - INPUT_FILE_PATH = Path(sys.argv[1]).resolve().parent - if not TROUBLEMAKERS_PATH.exists(): - TROUBLEMAKERS_PATH.mkdir() - - # STEP 1: copy the modpack locally - shutil.copy(INPUT_FILE_PATH.parent, __TMP_PACK_ZIP_PATH) - print("STEP 1: SUCCESS") - - # STEP 2: unzip the pack - shutil.unpack_archive(__TMP_PACK_ZIP_PATH, __TMP_PACK_UNZIPPED_PATH, "zip") - print("STEP 2: SUCCESS") - - # STEP 2.1: clean up client mods - _clean_pack() - print("STEP 2.1: SUCCESS") - - # STEP 2.2: grab the config.toml file - config_toml_path = __TMP_PACK_UNZIPPED_PATH.joinpath("config.toml") - if config_toml_path.exists(): - shutil.move(config_toml_path, MMC_EXPORT_CONFIG_PATH) - print("STEP 2.2: SUCCESS") - - # STEP 2.3: grab PITA resourcepacks files like Witchery's 1.7.10 jar - if __TMP_RESPACK_DIR.exists() and __TMP_RESPACK_DIR.is_dir(): - for respack_path in __TMP_RESPACK_DIR.iterdir(): - if not respack_path.is_dir() and not respack_path.name.endswith(".zip"): - shutil.move(respack_path, TROUBLEMAKERS_PATH.joinpath(respack_path.name)) - print(f"STEP 2.3: Potential Troublemaker Found & Relocated: {respack_path.name}") - else: - print("No resourcepacks dir - skipping") - - # STEP 3: re-zip & cleanup - shutil.make_archive(str(__TMP_PACK_ZIP_PATH.with_suffix("")), "zip", __TMP_PACK_UNZIPPED_PATH) - shutil.rmtree(__TMP_PACK_UNZIPPED_PATH) - print("STEP 3: SUCCESS") - - # ---- ANY FURTHER REFERENCES TO PACK_UNZIPPED_PATH ARE BAD!! ---- # - - # STEP 4: MMC-EXPORT - print("MMC-Exporter is running, please wait") - status = os.system( - " ".join( - f""" - mmc-export.exe - -i "{__TMP_PACK_ZIP_PATH}" - -f Modrinth CurseForge - -c "{MMC_EXPORT_CONFIG_PATH}" - -o "{THIS_DIR}" - """.split() - ) - ) - - if status != 0: - print("Failed to convert MMC pack to Curse and/or Modrinth. See above log.") - return - - print("STEP 4: SUCCESS") - - # STEP 5: Move Troublemakers back to inside each zip - output_files = _get_modpack_outnames(join=True) - for fname in output_files: - with zipfile.ZipFile(THIS_DIR.joinpath(fname), "a") as zipf: - for file in TROUBLEMAKERS_PATH.iterdir(): - troublemaker_path = TROUBLEMAKERS_PATH.joinpath(file) - zipf.write(troublemaker_path, f"overrides/resourcepacks/{file}") - print("STEP 5: SUCCESS") - - # STEP 6: Move finished pack files back to OG dir - output_files = _get_modpack_outnames(join=False) - for fname in output_files + ["bundled_links.md"]: - shutil.move(THIS_DIR.joinpath(fname), INPUT_FILE_PATH.parent.joinpath(fname)) - - print("STEP 6: SUCCESS") - - __cleanup() - print("DONE") - - -if __name__ == "__main__": - try: - main() - except Exception as e: - __cleanup() - print(e) diff --git a/minecraft/Modpack Finalizers/1.21+/.gitignore b/minecraft/Modpack Finalizers/1.21+/.gitignore deleted file mode 100644 index 2502504..0000000 --- a/minecraft/Modpack Finalizers/1.21+/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.log -activepack.zip -activepack.mrpack \ No newline at end of file diff --git a/minecraft/Modpack Finalizers/1.21+/main.py b/minecraft/Modpack Finalizers/1.21+/main.py deleted file mode 100644 index 4520940..0000000 --- a/minecraft/Modpack Finalizers/1.21+/main.py +++ /dev/null @@ -1,193 +0,0 @@ -"""@author Jose Stovall | github.com/oitsjustjose""" - -import json -import os -import shutil -import sys -import zipfile -from dataclasses import dataclass -from typing import List - -THIS_DIR = "\\".join(os.path.realpath(__file__).split("\\")[:-1]) -IS_MODRINTH = sys.argv[1].endswith(".mrpack") - -CONFIG_PATH = os.path.join(THIS_DIR, "..", "configuration.json") -PACK_UNZIP_PATH = os.path.join(THIS_DIR, "activepack") -PACK_ZIP_PATH = f"{PACK_UNZIP_PATH}.{'mrpack' if IS_MODRINTH else 'zip'}" - - -@dataclass -class ModpackInfo: - name: str - version: str - - -def print(obj) -> None: - """Override the initial print so it goes to a logfile instead!""" - log_nm_base = sys.argv[1].split("\\")[-1] - with open(f"./{log_nm_base}.log", "a+", encoding="utf-8") as log_handle: - log_handle.write(f"{str(obj)}\n") - - -def __cleanup() -> None: - """File and dir cleanup for when the program exits""" - # remove the copied zip file - if os.path.exists(PACK_ZIP_PATH): - os.unlink(PACK_ZIP_PATH) - # remove any unzipped files - if os.path.exists(PACK_UNZIP_PATH): - shutil.rmtree(PACK_UNZIP_PATH) - - -def __get_pack_info() -> ModpackInfo: - """ - Gets the modpack info based on the currently unzipped pack - Returns None in the event of any failures - """ - if not os.path.exists(PACK_UNZIP_PATH): - print( - f"[__get_pack_info]: Failed to get Modpack Info: {PACK_UNZIP_PATH} does not exist!" - ) - return None - - manifest_path: str = None - - if IS_MODRINTH: - manifest_path = os.path.join(PACK_UNZIP_PATH, "modrinth.index.json") - else: - manifest_path = os.path.join(PACK_UNZIP_PATH, "manifest.json") - - if not manifest_path: - print( - "[__get_pack_info]: Failed to get Modpack Info: could not find a valid manifest path!" - ) - return None - - with open(manifest_path, "r") as handle: - manifest = json.loads(handle.read()) - - return ModpackInfo( - manifest["name"], manifest["versionId" if IS_MODRINTH else "version"] - ) - - -def __patch_neo_curse() -> None: - """ - Fixes an issue with CurseForge exports from Prism that makes them incompatible - with the CurseForge launcher because CurseForge is fucking stupid - """ - manifest_path = os.path.join(PACK_UNZIP_PATH, "manifest.json") - - if not os.path.exists(manifest_path): - print(f"[__patch_neo_curse]: Failed to find manifest at {manifest_path}") - return - - with open(manifest_path, "r") as handle: - manifest = json.loads(handle.read()) - - if "minecraft" not in manifest: - print("[__patch_neo_curse]: Missing key \{minecraft\}") - return - - if "modLoaders" not in manifest["minecraft"]: - print("[__patch_neo_curse]: Missing key \{minecraft.modLoaders\}") - return - - mc_version = manifest["minecraft"]["version"] - if mc_version not in ["1.20.1"]: - print( - f"[__patch_neo_curse]: Minecraft {mc_version} does not need NeoForge cleanup (or if it does, clean up this script!)" - ) - return - - for modloader in manifest["minecraft"]["modLoaders"]: - if "neo" not in modloader["id"]: - continue - - # Other versions might not need this patch, hard to say - 1.20.1 definitely does. - if mc_version == "1.20.1": - neo_version = modloader["id"].replace("neoforge-", "") - modloader["id"] = f"neoforge-{mc_version}-{neo_version}" - - with open(manifest_path, "w") as handle: - handle.write(json.dumps(manifest)) - - -def main() -> None: - """ - Processing flow (souper crude): - - 1. Load the cleanup config - 2. Open the original zipped file - 3. Iterate through each cleanup config entry (don't forget to path prepend "overrides/"), deleting - 4. Re-zip if necessary? - 5. Profit? - """ - - if len(sys.argv) != 2: - print("Missing 2nd parameter File") - return - - # Copy the original file to ./activepack.[mrpack|zip] - shutil.copy(sys.argv[1], PACK_ZIP_PATH) - print("Copied pack to local dir") - - # Unzip the modpack -- .mrpacks are just glorified zip files too :) - shutil.unpack_archive(PACK_ZIP_PATH, PACK_UNZIP_PATH, "zip") - print("Unarchived pack successfully!") - - # Read in the config if it exists - if it doesn't, early exit - if not os.path.exists(CONFIG_PATH): - print(f"Failed to find configuration at {CONFIG_PATH}") - __cleanup() - return - - with open(CONFIG_PATH, "r") as handle: - config = json.loads(handle.read())["remove"] - - # Prepend the "overrides/" path, remove all files necessary - for target in [f"overrides/{x}" for x in config]: - rm_path = os.path.join(PACK_UNZIP_PATH, target) - if not os.path.exists(rm_path): - continue - - if os.path.isdir(rm_path): - shutil.rmtree(rm_path) - print(f"Removed dir {rm_path}") - else: - os.unlink(rm_path) - print(f"Removed file {rm_path}") - - # Fix CurseForge packs being pissed about NeoForge :V - if not IS_MODRINTH: - __patch_neo_curse() - - # Zip up the pack & cleanup the old working directory - info = __get_pack_info() - shutil.make_archive( - os.path.join(THIS_DIR, f"{info.name} {info.version}"), "zip", PACK_UNZIP_PATH - ) - shutil.rmtree(PACK_UNZIP_PATH) - if IS_MODRINTH: - os.rename( - os.path.join(THIS_DIR, f"{info.name} {info.version}.zip"), - os.path.join(THIS_DIR, f"{info.name} {info.version}.mrpack"), - ) - - # Rename .zip to .mrpack if it was a modrinth pack - file_name = f"{info.name} {info.version}.{'mrpack' if IS_MODRINTH else 'zip'}" - - # Move the file back to where it should've started from - og_dirname = "\\".join(sys.argv[1].split("\\")[:-1]) - shutil.move(os.path.join(THIS_DIR, file_name), os.path.join(og_dirname, file_name)) - print( - f"Successfully processed & moved/replaced {'Modrinth' if IS_MODRINTH else 'CurseForge'} modpack" - ) - - -if __name__ == "__main__": - try: - main() - except Exception as e: - __cleanup() - print(e) diff --git a/minecraft/Modpack Finalizers/one-time-setup.bat b/minecraft/Modpack Finalizers/one-time-setup.bat deleted file mode 100644 index ab0e016..0000000 --- a/minecraft/Modpack Finalizers/one-time-setup.bat +++ /dev/null @@ -1,3 +0,0 @@ -@REM Sets up the Python dependency one time -pip install git+https://github.com/tanaydin/gql-query-builder.git@patch-2 -pip install -U mmc-export \ No newline at end of file diff --git a/minecraft/Client Mod Cleanup/mods.json b/minecraft/client-mod-cleanup/mods.json similarity index 100% rename from minecraft/Client Mod Cleanup/mods.json rename to minecraft/client-mod-cleanup/mods.json diff --git a/minecraft/Client Mod Cleanup/remove.py b/minecraft/client-mod-cleanup/remove.py similarity index 100% rename from minecraft/Client Mod Cleanup/remove.py rename to minecraft/client-mod-cleanup/remove.py diff --git a/minecraft/Convert NFP/convert.bat b/minecraft/convert-nfp/convert.bat similarity index 100% rename from minecraft/Convert NFP/convert.bat rename to minecraft/convert-nfp/convert.bat diff --git a/minecraft/Convert NFP/main.py b/minecraft/convert-nfp/main.py similarity index 100% rename from minecraft/Convert NFP/main.py rename to minecraft/convert-nfp/main.py diff --git a/minecraft/Convert NFP/nfp.py b/minecraft/convert-nfp/nfp.py similarity index 100% rename from minecraft/Convert NFP/nfp.py rename to minecraft/convert-nfp/nfp.py diff --git a/minecraft/Convert NFP/pastebin.py b/minecraft/convert-nfp/pastebin.py similarity index 100% rename from minecraft/Convert NFP/pastebin.py rename to minecraft/convert-nfp/pastebin.py diff --git a/minecraft/Convert NFP/requirements.txt b/minecraft/convert-nfp/requirements.txt similarity index 100% rename from minecraft/Convert NFP/requirements.txt rename to minecraft/convert-nfp/requirements.txt diff --git a/minecraft/Modpack Finalizers/1.21+/Pack Finalizer (1.21+).bat b/minecraft/publishing/Pack Cleanup.bat similarity index 88% rename from minecraft/Modpack Finalizers/1.21+/Pack Finalizer (1.21+).bat rename to minecraft/publishing/Pack Cleanup.bat index 3a23570..47a60ac 100644 --- a/minecraft/Modpack Finalizers/1.21+/Pack Finalizer (1.21+).bat +++ b/minecraft/publishing/Pack Cleanup.bat @@ -4,7 +4,7 @@ @echo Processing file: %1 python.exe .\main.py %1 -@echo "Done!" +pause shift if not "%~1"=="" goto loop diff --git a/minecraft/Modpack Finalizers/configuration.json b/minecraft/publishing/configuration.json similarity index 100% rename from minecraft/Modpack Finalizers/configuration.json rename to minecraft/publishing/configuration.json diff --git a/minecraft/publishing/main.py b/minecraft/publishing/main.py new file mode 100644 index 0000000..9c83eea --- /dev/null +++ b/minecraft/publishing/main.py @@ -0,0 +1,197 @@ +import json +import shutil +import sys +from dataclasses import dataclass +from pathlib import Path + + +@dataclass +class ModpackInfo: + name: str + version: str + + +@dataclass +class Paths: + is_modrinth: bool + this_dir: Path + config: Path + activepath: Path + activepath_zip: Path + + @staticmethod + def create(file: Path): + this_dir = Path(__file__).parent.resolve() + ap = this_dir.joinpath("activepack").resolve() + + return Paths( + is_modrinth=file.suffix == ".mrpack", + this_dir=this_dir, + config=this_dir.joinpath("configuration.json").resolve(), + activepath=ap, + activepath_zip=ap.with_suffix(file.suffix).resolve(), + ) + + def clean(self): + if self.activepath.exists(): + shutil.rmtree(self.activepath) + if self.activepath_zip.exists(): + self.activepath_zip.unlink() + + +class Processor: # TODO: we need Prism native pack support too + def __init__(self, pack_path: Path): + self.pack_path = pack_path + self.paths = Paths.create(pack_path) + self.step = "Copy Pack to Temp Dir & Unzip It" + + # Read in the config + with open(self.paths.config, "r", encoding="utf-8") as fh: + self.config = json.loads(fh.read()) + + def override(self, path: Path) -> Path: + """Unlinks / rmtrees a path if it exists, then returns it""" + if path.exists(): + if path.is_dir(): + shutil.rmtree(path) + else: + path.unlink() + return path + + def run(self) -> None: + """Common staging steps between both packs""" + # Copy the original file to ./activepack.[mrpack|zip] + shutil.copy(self.pack_path, self.paths.activepath_zip) + shutil.unpack_archive(self.paths.activepath_zip, self.paths.activepath, "zip") + print(f"✅ {self.step}") + + self.step = "Clean up files we don't want to ship" + for p in [f"overrides/{x}" for x in self.config["remove"]]: + rm_path = self.paths.activepath.joinpath(p) + if not rm_path.exists(): + continue + if rm_path.is_dir(): + shutil.rmtree(rm_path) + print(f" 🗑️ 📁 {rm_path.name}") + else: + rm_path.unlink() + print(f" 🗑️ {rm_path.name}") + print(f"✅ {self.step}") + + def post_run(self) -> None: + """Common post-run staging steps between both types""" + info = self.get_pack_info() + + # Always use .zip, shutil.make_archive has no clue what an mrpack is + self.step = "Re-archive the modified, cleaned up pack" + out_file = self.override(self.paths.this_dir.joinpath(f"{info.name} {info.version}.zip").resolve()) + shutil.make_archive(out_file.with_suffix("").name, "zip", self.paths.activepath) + print(f"✅ {self.step}") + + self.step = "Clean up unzipped pack and rename to mrpack if necessary" + shutil.rmtree(self.paths.activepath) + out_file = out_file.rename(self.override(out_file.with_suffix(self.pack_path.suffix))) + print(f"✅ {self.step}") + + self.step = "Move re-packed modpack to the original pack's directory" + final_output = self.pack_path.parent.joinpath(out_file.name).resolve() + if final_output.exists(): + final_output.unlink() + + shutil.move(out_file, final_output) + self.paths.clean() + print("🎉 Done! Successfully cleaned modpack!") + + def get_pack_info(self) -> ModpackInfo: + """Common method for getting pack info in general""" + manifest_path = self.paths.activepath.joinpath("manifest.json").resolve() + with open(manifest_path, "r", encoding="utf-8") as fh: + manifest = json.loads(fh.read()) + return ModpackInfo(manifest["name"], manifest["version"]) + + +class ModrinthProcessor(Processor): + def __init__(self, pack_path: Path): + super().__init__(pack_path) + + def run(self): + super().run() + self.post_run() + + def get_pack_info(self) -> ModpackInfo: + """Uses modrinth.index.json instead of manifest.json, and versionId instead of version""" + manifest_path = self.paths.activepath.joinpath("modrinth.index.json").resolve() + with open(manifest_path, "r", encoding="utf-8") as fh: + manifest = json.loads(fh.read()) + return ModpackInfo(manifest["name"], manifest["versionId"]) + + +class CurseForgeProcessor(Processor): + def __init__(self, pack_path: Path): + super().__init__(pack_path) + + def run(self): + super().run() + self.__patch_neo_compat() + self.post_run() + + def __patch_neo_compat(self): + """Fixes an issue with CurseForge exports from Prism that makes them + incompatible with the CurseForge launcher because CurseForge is stupid""" + self.step = "Patch CurseForge Manifest to be compatible with NeoForge" + manifest_path = self.paths.activepath.joinpath("manifest.json").resolve() + if not manifest_path.exists(): + print(f"[CurseForge+NeoForge Compat]: Failed to find a manifest at {manifest_path}") + return + + with open(manifest_path, "r") as handle: + manifest = json.loads(handle.read()) + + if "minecraft" not in manifest: + print("[CurseForge+NeoForge Compat]: Missing key { minecraft }") + return + + if "modLoaders" not in manifest["minecraft"]: + print("[CurseForge+NeoForge Compat]: Missing key { minecraft.modLoaders }") + return + + mc_version = manifest["minecraft"]["version"] + if mc_version not in ["1.20.1"]: + return + + for modloader in manifest["minecraft"]["modLoaders"]: + if "neo" not in modloader["id"]: + continue + + # Other versions might not need this patch, hard to say - 1.20.1 definitely does. + if mc_version == "1.20.1": + neo_version = modloader["id"].replace("neoforge-", "") + modloader["id"] = f"neoforge-{mc_version}-{neo_version}" + + with open(manifest_path, "w") as handle: + handle.write(json.dumps(manifest)) + + +def main(og_pack_path_raw: str): + og_pack_path = Path(og_pack_path_raw).resolve() + if not og_pack_path.exists(): + raise Exception(f"Failed to find the Pack at {og_pack_path_raw}!") + + processor = ModrinthProcessor(og_pack_path) if og_pack_path.suffix == ".mrpack" else CurseForgeProcessor(og_pack_path) + try: + processor.run() + except Exception as e: + # Clean up any paths we made but still raise our exception + processor.paths.clean() + print(f"Failure during step [{processor.step}]:") + raise e + + +if __name__ == "__main__": + if len(sys.argv) != 2: + print("Missing required parameter: (the path to the .mrpack or .zip export)") + sys.exit(1) + try: + main(sys.argv[1]) + except Exception as e: + print(e) diff --git a/windows/pwsh10k.omp.json b/pwsh10k.omp.json similarity index 96% rename from windows/pwsh10k.omp.json rename to pwsh10k.omp.json index 302e852..1077600 100644 --- a/windows/pwsh10k.omp.json +++ b/pwsh10k.omp.json @@ -1,79 +1,79 @@ -{ - "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", - "console_title_template": "{{if .Root}}root :: {{end}}{{.Shell}} :: {{.Folder}}", - "blocks": [ - { - "type": "prompt", - "alignment": "left", - "segments": [ - { - "foreground": "p:os", - "style": "plain", - "template": "{{.Icon}}", - "type": "os" - }, - { - "foreground": "cyan", - "style": "plain", - "template": "{{if .Root}} \ue701 {{ .UserName }} as Administrator{{end}}", - "type": "session" - }, - { - "properties": { - "enable_hyperlink": true, - "home_icon": "\uf015 ~", - "style": "short" - }, - "foreground": "lightBlue", - "type": "path", - "style": "plain" - }, - { - "properties": { - "display_stash_count": true, - "branch_icon": "\ue725 ", - "prefix": "\ue708" - }, - "foreground": "lightCyan", - "type": "git", - "style": "plain" - }, - { - "properties": { - "postfix": "", - "prefix": "", - "text": "\u200b" - }, - "foreground": "white", - "type": "text", - "style": "plain" - } - ] - }, - { - "alignment": "left", - "newline": true, - "segments": [ - { - "foreground": "cyan", - "foreground_templates": ["{{ if gt .Code 0 }}red{{ end }}"], - "properties": { - "always_enabled": true - }, - "style": "plain", - "template": "\u276f ", - "type": "status" - } - ], - "type": "prompt" - } - ], - "transient_prompt": { - "foreground": "cyan", - "foreground_templates": ["{{ if gt .Code 0 }}red{{ end }}"], - "template": "\u276f ", - "newline": true - }, - "version": 3, - "final_space": false -} +{ + "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", + "console_title_template": "{{if .Root}}root :: {{end}}{{.Shell}} :: {{.Folder}}", + "blocks": [ + { + "type": "prompt", + "alignment": "left", + "segments": [ + { + "foreground": "p:os", + "style": "plain", + "template": "{{.Icon}}", + "type": "os" + }, + { + "foreground": "cyan", + "style": "plain", + "template": "{{if .Root}} \ue701 {{ .UserName }} as Administrator{{end}}", + "type": "session" + }, + { + "properties": { + "enable_hyperlink": true, + "home_icon": "\uf015 ~", + "style": "short" + }, + "foreground": "lightBlue", + "type": "path", + "style": "plain" + }, + { + "properties": { + "display_stash_count": true, + "branch_icon": "\ue725 ", + "prefix": "\ue708" + }, + "foreground": "lightCyan", + "type": "git", + "style": "plain" + }, + { + "properties": { + "postfix": "", + "prefix": "", + "text": "\u200b" + }, + "foreground": "white", + "type": "text", + "style": "plain" + } + ] + }, + { + "alignment": "left", + "newline": true, + "segments": [ + { + "foreground": "cyan", + "foreground_templates": ["{{ if gt .Code 0 }}red{{ end }}"], + "properties": { + "always_enabled": true + }, + "style": "plain", + "template": "\u276f ", + "type": "status" + } + ], + "type": "prompt" + } + ], + "transient_prompt": { + "foreground": "cyan", + "foreground_templates": ["{{ if gt .Code 0 }}red{{ end }}"], + "template": "\u276f ", + "newline": true + }, + "version": 3, + "final_space": false +} diff --git a/windows/Restore Font Windows.reg b/windows/Restore Font Windows.reg deleted file mode 100644 index 2a58840..0000000 Binary files a/windows/Restore Font Windows.reg and /dev/null differ diff --git a/windows/obs/Cider b/windows/obs/Cider deleted file mode 160000 index a11e48a..0000000 --- a/windows/obs/Cider +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a11e48a1721d3b8bbb2d54376193ed6b524be115 diff --git a/windows/obs/PlexAmp b/windows/obs/PlexAmp deleted file mode 160000 index a11e48a..0000000 --- a/windows/obs/PlexAmp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a11e48a1721d3b8bbb2d54376193ed6b524be115 diff --git a/windows/obs/ResolutionUtils/Desktop.bat b/windows/obs/ResolutionUtils/Desktop.bat deleted file mode 100644 index 94c5d91..0000000 --- a/windows/obs/ResolutionUtils/Desktop.bat +++ /dev/null @@ -1,4 +0,0 @@ -cd "TODO:\Parsec Utils\" -.\MonitorSwitcher.exe -load:.\Profiles\Desktop.xml -.\SetDpi.exe 100 1 -.\SetDpi.exe 100 2 \ No newline at end of file diff --git a/windows/obs/ResolutionUtils/Profiles/Desktop.xml b/windows/obs/ResolutionUtils/Profiles/Desktop.xml deleted file mode 100644 index 91d6e0e..0000000 --- a/windows/obs/ResolutionUtils/Profiles/Desktop.xml +++ /dev/null @@ -1 +0,0 @@ -84559001InUse845590494090DisplayportExternalRotate270Identity1439811000ProgressivetrueInUse184559013InUse845590494112DisplayportExternalIdentityIdentity1649001000ProgressivetrueInUse149409845590Target346500000346500000208014398110001920108020801157OtherProgressive0845590Source19201080Pixelformat32Bpp3440449411845590Target10192800001019280000360016490010003440144036001717OtherProgressive1845590Source34401440Pixelformat32Bpp002793423474trueXAAAAFwAAAA/AAAAXAAAAEQAAABJAAAAUwAAAFAAAABMAAAAQQAAAFkAAAAjAAAARwAAAFMAAABNAAAANQAAAEIAAABCAAAAMgAAACMAAAA1AAAAJgAAADEAAAA1AAAAYgAAAGUAAAAzAAAAMwAAAGYAAAAyAAAAJgAAADAAAAAmAAAAVQAAAEkAAABEAAAANAAAADkAAAA0AAAAMAAAADkAAAAjAAAAewAAAGUAAAA2AAAAZgAAADAAAAA3AAAAYgAAADUAAABmAAAALQAAAGUAAABlAAAAOQAAADcAAAAtAAAANAAAAGEAAAA5AAAAMAAAAC0AAABiAAAAMAAAADcAAAA2AAAALQAAADMAAAAzAAAAZgAAADUAAAA3AAAAYgAAAGYAAAA0AAAAZQAAAGEAAABhAAAANwAAAH0AAAA=TAAAAEcAAAAgAAAAVQAAAEwAAABUAAAAUgAAAEEAAABHAAAARQAAAEEAAABSAAAA00false4404841490trueXAAAAFwAAAA/AAAAXAAAAEQAAABJAAAAUwAAAFAAAABMAAAAQQAAAFkAAAAjAAAARAAAAEUAAABMAAAAQQAAADIAAAAxAAAAMgAAACMAAAA1AAAAJgAAADEAAAA1AAAAYgAAAGUAAAAzAAAAMwAAAGYAAAAyAAAAJgAAADAAAAAmAAAAVQAAAEkAAABEAAAANAAAADkAAAA0AAAAMQAAADEAAAAjAAAAewAAAGUAAAA2AAAAZgAAADAAAAA3AAAAYgAAADUAAABmAAAALQAAAGUAAABlAAAAOQAAADcAAAAtAAAANAAAAGEAAAA5AAAAMAAAAC0AAABiAAAAMAAAADcAAAA2AAAALQAAADMAAAAzAAAAZgAAADUAAAA3AAAAYgAAAGYAAAA0AAAAZQAAAGEAAABhAAAANwAAAH0AAAA=QQAAAFcAAAAzAAAANAAAADIAAAAzAAAARAAAAFcAAABGAAAA00false \ No newline at end of file diff --git a/windows/obs/ResolutionUtils/Profiles/Leah.xml b/windows/obs/ResolutionUtils/Profiles/Leah.xml deleted file mode 100644 index 851efdc..0000000 --- a/windows/obs/ResolutionUtils/Profiles/Leah.xml +++ /dev/null @@ -1 +0,0 @@ -102332011InUse1023320494130DisplayportExternalIdentityAspectratiocenteredmax1201ProgressivetrueInUse1494131023320Target483400000483400000272012012560144027201481OtherProgressive11023320Source38401080Pixelformat32Bpp002688410220trueXAAAAFwAAAA/AAAAXAAAAEQAAABJAAAAUwAAAFAAAABMAAAAQQAAAFkAAAAjAAAAQQAAAEMAAABJAAAAMgAAADcAAABFAAAAQwAAACMAAAA1AAAAJgAAADEAAAA1AAAAYgAAAGUAAAAzAAAAMwAAAGYAAAAyAAAAJgAAADAAAAAmAAAAVQAAAEkAAABEAAAANAAAADkAAAA0AAAAMQAAADMAAAAjAAAAewAAAGUAAAA2AAAAZgAAADAAAAA3AAAAYgAAADUAAABmAAAALQAAAGUAAABlAAAAOQAAADcAAAAtAAAANAAAAGEAAAA5AAAAMAAAAC0AAABiAAAAMAAAADcAAAA2AAAALQAAADMAAAAzAAAAZgAAADUAAAA3AAAAYgAAAGYAAAA0AAAAZQAAAGEAAABhAAAANwAAAH0AAAA=UgAAAE8AAABHAAAAIAAAAFAAAABHAAAAMgAAADcAAAA5AAAAUQAAAA==00false \ No newline at end of file diff --git a/windows/obs/ResolutionUtils/Profiles/Macbook.xml b/windows/obs/ResolutionUtils/Profiles/Macbook.xml deleted file mode 100644 index 9ebcf37..0000000 --- a/windows/obs/ResolutionUtils/Profiles/Macbook.xml +++ /dev/null @@ -1 +0,0 @@ -105001011InUse1050010494130DisplayportExternalIdentityIdentity1651ProgressivetrueInUse1494131050010Target635540000635540000264016512560144026401459OtherProgressive11050010Source16801050Pixelformat32Bpp002688410220trueXAAAAFwAAAA/AAAAXAAAAEQAAABJAAAAUwAAAFAAAABMAAAAQQAAAFkAAAAjAAAAQQAAAEMAAABJAAAAMgAAADcAAABFAAAAQwAAACMAAAA1AAAAJgAAADEAAAA1AAAAYgAAAGUAAAAzAAAAMwAAAGYAAAAyAAAAJgAAADAAAAAmAAAAVQAAAEkAAABEAAAANAAAADkAAAA0AAAAMQAAADMAAAAjAAAAewAAAGUAAAA2AAAAZgAAADAAAAA3AAAAYgAAADUAAABmAAAALQAAAGUAAABlAAAAOQAAADcAAAAtAAAANAAAAGEAAAA5AAAAMAAAAC0AAABiAAAAMAAAADcAAAA2AAAALQAAADMAAAAzAAAAZgAAADUAAAA3AAAAYgAAAGYAAAA0AAAAZQAAAGEAAABhAAAANwAAAH0AAAA=UgAAAE8AAABHAAAAIAAAAFAAAABHAAAAMgAAADcAAAA5AAAAUQAAAA==00false \ No newline at end of file diff --git a/windows/obs/ResolutionUtils/Profiles/Mobile.xml b/windows/obs/ResolutionUtils/Profiles/Mobile.xml deleted file mode 100644 index 0918764..0000000 --- a/windows/obs/ResolutionUtils/Profiles/Mobile.xml +++ /dev/null @@ -1 +0,0 @@ -98691011InUse986910494130DisplayportExternalIdentityIdentity1439981000ProgressivetrueInUse149413986910Target586580000586580000264014399810002560144026401543OtherProgressive1986910Source25601440Pixelformat32Bpp002688410220trueXAAAAFwAAAA/AAAAXAAAAEQAAABJAAAAUwAAAFAAAABMAAAAQQAAAFkAAAAjAAAAQQAAAEMAAABJAAAAMgAAADcAAABFAAAAQwAAACMAAAA1AAAAJgAAADEAAAA1AAAAYgAAAGUAAAAzAAAAMwAAAGYAAAAyAAAAJgAAADAAAAAmAAAAVQAAAEkAAABEAAAANAAAADkAAAA0AAAAMQAAADMAAAAjAAAAewAAAGUAAAA2AAAAZgAAADAAAAA3AAAAYgAAADUAAABmAAAALQAAAGUAAABlAAAAOQAAADcAAAAtAAAANAAAAGEAAAA5AAAAMAAAAC0AAABiAAAAMAAAADcAAAA2AAAALQAAADMAAAAzAAAAZgAAADUAAAA3AAAAYgAAAGYAAAA0AAAAZQAAAGEAAABhAAAANwAAAH0AAAA=UgAAAE8AAABHAAAAIAAAAFAAAABHAAAAMgAAADcAAAA5AAAAUQAAAA==00false \ No newline at end of file diff --git a/windows/obs/ResolutionUtils/Profiles/Recording.xml b/windows/obs/ResolutionUtils/Profiles/Recording.xml deleted file mode 100644 index e97030e..0000000 --- a/windows/obs/ResolutionUtils/Profiles/Recording.xml +++ /dev/null @@ -1 +0,0 @@ -84559001InUse845590494090DisplayportExternalRotate270Identity1439811000ProgressivetrueInUse184559013InUse845590494112DisplayportExternalIdentityIdentity1649001000ProgressivetrueInUse149409845590Target346500000346500000208014398110001920108020801157OtherProgressive0845590Source19201080Pixelformat32Bpp2560449411845590Target10192800001019280000360016490010003440144036001717OtherProgressive1845590Source25601440Pixelformat32Bpp002793423474trueXAAAAFwAAAA/AAAAXAAAAEQAAABJAAAAUwAAAFAAAABMAAAAQQAAAFkAAAAjAAAARwAAAFMAAABNAAAANQAAAEIAAABCAAAAMgAAACMAAAA1AAAAJgAAADEAAAA1AAAAYgAAAGUAAAAzAAAAMwAAAGYAAAAyAAAAJgAAADAAAAAmAAAAVQAAAEkAAABEAAAANAAAADkAAAA0AAAAMAAAADkAAAAjAAAAewAAAGUAAAA2AAAAZgAAADAAAAA3AAAAYgAAADUAAABmAAAALQAAAGUAAABlAAAAOQAAADcAAAAtAAAANAAAAGEAAAA5AAAAMAAAAC0AAABiAAAAMAAAADcAAAA2AAAALQAAADMAAAAzAAAAZgAAADUAAAA3AAAAYgAAAGYAAAA0AAAAZQAAAGEAAABhAAAANwAAAH0AAAA=TAAAAEcAAAAgAAAAVQAAAEwAAABUAAAAUgAAAEEAAABHAAAARQAAAEEAAABSAAAA00false4404841490trueXAAAAFwAAAA/AAAAXAAAAEQAAABJAAAAUwAAAFAAAABMAAAAQQAAAFkAAAAjAAAARAAAAEUAAABMAAAAQQAAADIAAAAxAAAAMgAAACMAAAA1AAAAJgAAADEAAAA1AAAAYgAAAGUAAAAzAAAAMwAAAGYAAAAyAAAAJgAAADAAAAAmAAAAVQAAAEkAAABEAAAANAAAADkAAAA0AAAAMQAAADEAAAAjAAAAewAAAGUAAAA2AAAAZgAAADAAAAA3AAAAYgAAADUAAABmAAAALQAAAGUAAABlAAAAOQAAADcAAAAtAAAANAAAAGEAAAA5AAAAMAAAAC0AAABiAAAAMAAAADcAAAA2AAAALQAAADMAAAAzAAAAZgAAADUAAAA3AAAAYgAAAGYAAAA0AAAAZQAAAGEAAABhAAAANwAAAH0AAAA=QQAAAFcAAAAzAAAANAAAADIAAAAzAAAARAAAAFcAAABGAAAA00false \ No newline at end of file diff --git a/windows/obs/ResolutionUtils/Py/OBS.py b/windows/obs/ResolutionUtils/Py/OBS.py deleted file mode 100644 index 5e55416..0000000 --- a/windows/obs/ResolutionUtils/Py/OBS.py +++ /dev/null @@ -1,21 +0,0 @@ -from subprocess import Popen - - -def on_event(event): - if event == obspython.OBS_FRONTEND_EVENT_SCRIPTING_SHUTDOWN: - proc = Popen( - r".\Desktop.bat", - cwd=r"TODO:\obs\ResolutionUtils", - shell=True, - ) - _ = proc.communicate() - - -def script_load(settings): - obspython.obs_frontend_add_event_callback(on_event) - proc = Popen( - r".\Recording.bat", - cwd=r"TODO:\obs\ResolutionUtils", - shell=True, - ) - _ = proc.communicate() diff --git a/windows/obs/ResolutionUtils/Recording.bat b/windows/obs/ResolutionUtils/Recording.bat deleted file mode 100644 index ee7d953..0000000 --- a/windows/obs/ResolutionUtils/Recording.bat +++ /dev/null @@ -1,3 +0,0 @@ -cd "TODO:\\Parsec Utils" -.\MonitorSwitcher.exe -load:.\Profiles\Recording.xml -.\SetDpi.exe 100 2 \ No newline at end of file diff --git a/windows/obs/ResolutionUtils/SetDpi.exe b/windows/obs/ResolutionUtils/SetDpi.exe deleted file mode 100644 index aea3119..0000000 Binary files a/windows/obs/ResolutionUtils/SetDpi.exe and /dev/null differ