diff --git a/linux/screenrec.sh b/linux/screenrec.sh new file mode 100755 index 0000000..567e532 --- /dev/null +++ b/linux/screenrec.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# We need to decide if we're already screen recording or not +pid=$(pgrep wf-recorder) + +if [[ "$pid" ]]; then + # Just killing the wf-recorder task frees up the rest of the script to do the rest + kill -9 "$pid" +else + filename="/home/jose/Pictures/Screenshots/$(date '+%Y-%m-%d_%I:%M:%S%p')" + notify-send -t 2000 -a Screen Recording 'Starting Screen Recording..' + # Start the screen recording in the region defined by Slurp + wf-recorder -g "$(slurp -b '#00000090')" -f "$filename.mkv" + # Convert to MP4 - mp4 breaks if you kill-9 it, but mkv doesn't. Keep benefits of both + ffmpeg -i "$filename.mkv" -codec copy "$filename.mp4" && rm "$filename.mkv" + # Copy the output file to the clipboard + wl-copy file://"$filename.mp4" -t text/uri-list + # Now we can say the recording is done + notify-send -t 2000 -a Screen Recording 'Screen Recording Saved!' +fi + + diff --git a/Shell Scripts/python/.gitignore b/linux/shell/python/.gitignore similarity index 100% rename from Shell Scripts/python/.gitignore rename to linux/shell/python/.gitignore diff --git a/Shell Scripts/python/convert_heic.py b/linux/shell/python/convert_heic.py similarity index 100% rename from Shell Scripts/python/convert_heic.py rename to linux/shell/python/convert_heic.py diff --git a/Shell Scripts/python/make_random.py b/linux/shell/python/make_random.py similarity index 100% rename from Shell Scripts/python/make_random.py rename to linux/shell/python/make_random.py diff --git a/Shell Scripts/python/new-uuid.py b/linux/shell/python/new-uuid.py similarity index 100% rename from Shell Scripts/python/new-uuid.py rename to linux/shell/python/new-uuid.py diff --git a/Shell Scripts/python/requirements.txt b/linux/shell/python/requirements.txt similarity index 100% rename from Shell Scripts/python/requirements.txt rename to linux/shell/python/requirements.txt diff --git a/Shell Scripts/python/scan_jars.py b/linux/shell/python/scan_jars.py similarity index 100% rename from Shell Scripts/python/scan_jars.py rename to linux/shell/python/scan_jars.py diff --git a/Shell Scripts/python/utils.py b/linux/shell/python/utils.py similarity index 100% rename from Shell Scripts/python/utils.py rename to linux/shell/python/utils.py diff --git a/Shell Scripts/python/wifi_qr.py b/linux/shell/python/wifi_qr.py similarity index 100% rename from Shell Scripts/python/wifi_qr.py rename to linux/shell/python/wifi_qr.py diff --git a/Shell Scripts/setup/setup_jarscan.sh b/linux/shell/setup/setup_jarscan.sh similarity index 100% rename from Shell Scripts/setup/setup_jarscan.sh rename to linux/shell/setup/setup_jarscan.sh diff --git a/Shell Scripts/setup/setup_makerand.sh b/linux/shell/setup/setup_makerand.sh similarity index 100% rename from Shell Scripts/setup/setup_makerand.sh rename to linux/shell/setup/setup_makerand.sh diff --git a/Shell Scripts/setup/setup_uuid.sh b/linux/shell/setup/setup_uuid.sh similarity index 100% rename from Shell Scripts/setup/setup_uuid.sh rename to linux/shell/setup/setup_uuid.sh diff --git a/Shell Scripts/setup/setup_wifiqr.sh b/linux/shell/setup/setup_wifiqr.sh similarity index 100% rename from Shell Scripts/setup/setup_wifiqr.sh rename to linux/shell/setup/setup_wifiqr.sh diff --git a/linux/update-readmes.py b/linux/update-readmes.py new file mode 100644 index 0000000..d917700 --- /dev/null +++ b/linux/update-readmes.py @@ -0,0 +1,41 @@ +from subprocess import run, Popen, PIPE + +import json +import os +import shutil + +NEW_REPO_BASE_NAME="https://git.oitsjustjose.com/me" + +# Grab each github repo's URL and Name +proc = Popen(["gh", "repo", "list", "--no-archived", "-L", "500", "--json", "url,name"], stdout=PIPE, stderr=PIPE) +# Parse into JSON +stdout, stderr = proc.communicate() +repo_data = json.loads(stdout) + +# Iterate over all repos, cloning, updating the README, committing, pushing, then deleting the clone +for repo in repo_data: + url = repo["url"] + dirname = repo["name"] + + # clone the repo + run(f"git clone {url}", shell=True, check=True) + + readme_filenm = "README.md" + for file in os.listdir(dirname): + if file.lower() == "readme.md": + readme_filenm = file + break + + print(f"Found readme file at ./{dirname}/{readme_filenm}") + + new_loc = f"{NEW_REPO_BASE_NAME}/{dirname}" + with open(f"./{dirname}/{readme_filenm}", "w", encoding="utf-8") as fh: + fh.write(f"# This Repo has Moved!\n\nThis repository has been moved to a [new location!]({new_loc})") + + run(f"git -C {dirname} add {readme_filenm}", shell=True) + run(f"git -C {dirname} commit -m '[AUTOMATED] Updated README to redirect to {new_loc}'", shell=True) + run(f"git -C {dirname} push", shell=True) + + shutil.rmtree(dirname) + print(f"Successfully pushed the new redirected repo for {dirname}") + diff --git a/OBS/PlexAmp/main.css b/obs/PlexAmp/main.css similarity index 100% rename from OBS/PlexAmp/main.css rename to obs/PlexAmp/main.css diff --git a/OBS/PlexAmp/main.html b/obs/PlexAmp/main.html similarity index 100% rename from OBS/PlexAmp/main.html rename to obs/PlexAmp/main.html diff --git a/OBS/PlexAmp/main.js b/obs/PlexAmp/main.js similarity index 100% rename from OBS/PlexAmp/main.js rename to obs/PlexAmp/main.js diff --git a/OBS/ResolutionUtils/MonitorSwitcher.exe b/obs/ResolutionUtils/MonitorSwitcher.exe similarity index 100% rename from OBS/ResolutionUtils/MonitorSwitcher.exe rename to obs/ResolutionUtils/MonitorSwitcher.exe diff --git a/OBS/ResolutionUtils/Normal.xml b/obs/ResolutionUtils/Normal.xml similarity index 100% rename from OBS/ResolutionUtils/Normal.xml rename to obs/ResolutionUtils/Normal.xml diff --git a/OBS/ResolutionUtils/Py/OBS.py b/obs/ResolutionUtils/Py/OBS.py similarity index 100% rename from OBS/ResolutionUtils/Py/OBS.py rename to obs/ResolutionUtils/Py/OBS.py diff --git a/OBS/ResolutionUtils/Py/__pycache__/OBS.cpython-310.pyc b/obs/ResolutionUtils/Py/__pycache__/OBS.cpython-310.pyc similarity index 100% rename from OBS/ResolutionUtils/Py/__pycache__/OBS.cpython-310.pyc rename to obs/ResolutionUtils/Py/__pycache__/OBS.cpython-310.pyc diff --git a/OBS/ResolutionUtils/Recording.xml b/obs/ResolutionUtils/Recording.xml similarity index 100% rename from OBS/ResolutionUtils/Recording.xml rename to obs/ResolutionUtils/Recording.xml diff --git a/Batch Scripts/Audio Engine Restart.bat b/windows/batch/Audio Engine Restart.bat similarity index 100% rename from Batch Scripts/Audio Engine Restart.bat rename to windows/batch/Audio Engine Restart.bat diff --git a/Batch Scripts/ConvertHEIC.bat b/windows/batch/ConvertHEIC.bat similarity index 100% rename from Batch Scripts/ConvertHEIC.bat rename to windows/batch/ConvertHEIC.bat diff --git a/Batch Scripts/FixTime.bat b/windows/batch/FixTime.bat similarity index 100% rename from Batch Scripts/FixTime.bat rename to windows/batch/FixTime.bat diff --git a/pwsh10k.omp.json b/windows/pwsh10k.omp.json similarity index 100% rename from pwsh10k.omp.json rename to windows/pwsh10k.omp.json 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