Skip to content

Instantly share code, notes, and snippets.

View theodric's full-sized avatar
🥔
mmm potatoes

þēodrīċ theodric

🥔
mmm potatoes
View GitHub Profile
@theodric
theodric / artcraft-gitter.sh
Created November 7, 2026 19:49
Script to scrape (and filter-scrape by OS/arch/pkgtype) the latest ArtCraft releases from GitHub
#!/usr/bin/env bash
#
# download_latest_releases.sh
#
# Downloads every asset from the latest release of a list of GitHub repositories.
# Uses aria2c if available, otherwise falls back to curl.
#
# Requirements: curl, jq. Optional: aria2c
#
# Usage: ./download_latest_releases.sh [OPTIONS] [output_directory]
@theodric
theodric / bulkpak.sh
Created November 7, 2026 19:48
Script to bulk-install .flatpak bundles
# bulkpak.sh - bulk install .flatpak bundles
set -u
usage() {
cat <<EOF
Usage: $(basename "$0") [FILE|DIR ...]
Install .flatpak bundle files. Arguments may be:
- individual .flatpak files
@theodric
theodric / outline-vpn.txt
Created November 6, 2026 14:48
Outline management without Outline Manager GUI
{become root}
cat /opt/outline/access.txt
# Replace the values with the ones from access.txt
export API_URL="https://1.2.3.4:54277/3pQ4jf6qSr5WVeMO0XOo4z"
export CERT_SHA256="E3823F9BB490D354...52F5A584"
# List keys:
curl --insecure "$API_URL/access-keys/"
@theodric
theodric / opensuse-plymouth.txt
Created June 1, 2026 15:23
openSUSE Plymouth boot screen config
So you've installed some new themes from https://github.com/mainframed/Hackers-Plymouth on your openSUSE box, but they're not sticking?
Do this:
1. `zypper in plymouth-plugin-script`
2. sudo plymouth-set-default-theme --rebuild-initrd <your-theme-name>
where your-theme-name is e.g. `lordnikon` (from /usr/share/plymouth/themes/lordnikon )/usr/share/plymouth/themes/resolution/
@theodric
theodric / pad_square.sh
Created February 19, 2026 16:33
pad a directory of images to 1:1 aspect ratio (overwriting original files)
#!/bin/bash
# use `-format png` to change output format, converting files at the same time, but then perhaps consider changing the final $img in line 12 to somethingelse_$img
for img in *.jpg *.jpeg *.png; do
if [ -f "$img" ]; then
width=$(identify -format "%w" "$img" 2>/dev/null)
height=$(identify -format "%h" "$img" 2>/dev/null)
if [ -z "$width" ] || [ -z "$height" ]; then
echo "Skipping $img (not a valid image)"
continue
fi
@theodric
theodric / config.yml
Last active February 7, 2026 21:01
~/.config/fusuma/config.yml
## this should be used in conjunction wtih a patched copy of kwin_wayland which diasbles the idiotic gestures built in by default for the last 5+ years
# Global settings (approximate Touchegg's action_execute_threshold and animation_delay)
threshold:
swipe: 0.5 # Lower = easier to trigger (similar to 10% threshold)
pinch: 0.5
interval:
swipe: 0.8 # Delay between gestures
pinch: 0.8
# Default context (equivalent to Touchegg's <application name="All">)
@theodric
theodric / esphome-manual-flash.txt
Created February 6, 2026 21:27
Flash compiled ESPHome firmware from CLI
The ESP32-S2 Mini (piece of shit) will flop between ttyACM0 and ttyACM1, so you can't use the web flasher. Hold down the 0 button, press the RST button, DO NOT RELEASE THE 0 BUTTON, and hit enter on the following command.
esptool.py --chip esp32s2 --port /dev/ttyACM0 write_flash 0x0 /path/to/whatever.factory.bin
If it fails, keep 0 held, RST again, and try again (or replace ACM0 with ACM1).
@theodric
theodric / mute-speakers-on-login-kde.txt
Created February 1, 2026 23:59
Mute speakers on login (KDE)
<mute-speakers.sh.desktop>
`
[Desktop Entry]
Exec=/path/to/mute-speakers.sh
Icon=application-x-shellscript
Name=mute-speakers.sh
Type=Application
X-KDE-AutostartScript=true
`
<mute-speakers.sh>
@theodric
theodric / nosuck_kde_gesture.txt
Last active February 1, 2026 23:57
fusuma - gestures for KDE desktop control (on kwin_wayland with gestures disabled) plus c.2008 Mac browser navigation gestures
You must rebuild kwin_wayland with gestures patched out!
You must install fusuma (https://github.com/iberianpig/fusuma) *and* fusuma-plugin-sendkey (https://github.com/iberianpig/fusuma-plugin-sendkey)!
FIRST FILE
<~/.config/autostart/fusuma.desktop>
`
[Desktop Entry]
Type=Application
Exec=fusuma.ruby4.0 -d
Hidden=false
@theodric
theodric / build-patch-opensuse-packages.txt
Last active February 7, 2026 21:23
Building and patching openSUSE packages
1. enable the source repo && zypper ref
2. ensure build toolchain:
zypper in osc rpm-build rpmdevtools gcc-c++ cmake ninja git libqt6-qtbase-devel libqt6-qtdeclarative-devel extra-cmake-modules
3. install source package
zypper source-install kwin6
4. set up ~/rpmbuild
rpmdev-setuptree