A collection of confloose (small prank/config scripts for the EPITA computer
fleet: German keyboard, upside-down screen, fake gcc, fake i3lock, and so on)
installable with a single curl, with a menu to pick them and an antidote
to undo everything.
Collection reused from d-002/epita (thanks
d-002 / leo). Everything is user-level (dotfiles, ~/.local/bin, i3 config, no
root) and reversible.
# Interactive menu
curl confloose.sayto.dev | bash
# Or, without a domain, straight from GitHub Pages
curl https://sayt-0.github.io/Confloose/install.sh | bashIn the menu:
- numbers to apply, e.g.
1 4 7 athen numbers for the antidote, e.g.a 4llists installed confloose,qquits
# Apply one or more confloose
curl confloose.sayto.dev | bash -s -- de-keyboard flip-screen
# Antidote (undo)
curl confloose.sayto.dev | bash -s -- -a de-keyboard flip-screen
# List the confloose installed on this machine
curl confloose.sayto.dev | bash -s -- -lThe commands leave the flags off for brevity. Add -fsSL if you want curl to fail on
an HTTP error instead of piping the error page into bash (plus stay quiet and follow
redirects).
-
install.shis the entry point. It readsconfloose/manifest.txtto build the menu, then for each choice downloadsconfloose/<name>/confloose.sh(orantidote.sh) and runs it. -
Choices are read from
/dev/tty, because withcurl | bashthe standard input is already taken by the piped script. -
Active confloose are tracked in
~/.confloose/confloose.lock(or$AFS_DIR/.confloosewhen the AFS home is present), so you know what to remove. -
The scripts download each other through the
CONFLOOSE_BASEvariable (default: the repo's GitHub Pages URL). Handy for local testing:python3 -m http.server 8000 # at the repo root CONFLOOSE_BASE=http://127.0.0.1:8000 bash install.sh -
The confloose target the fleet environment (i3wm, X11, bash) and assume, like d-002, that
/bin/shaccepts thefunctionkeyword (sh = bash). They no longer usesource: in POSIX mode a.on a missing file aborts the shell, so each rc file is sourced in a subshell guarded by[ -f ]. -
Reversibility is per-confloose, never a whole-file snapshot shared between them. The i3 confloose either tag the lines they add/comment with
# confloose by leo [<name>]and delete exactly those, or apply a transform that is its own inverse; only the binaries keep a<file>.confloose.bak. This is what keeps one antidote from reverting another confloose -- or the user's own edits.
- Create
confloose/<name>/confloose.sh(apply) andconfloose/<name>/antidote.sh(undo). For any remote resource, use"${CONFLOOSE_BASE:-https://sayt-0.github.io/Confloose}/confloose/...". - Add a
name<TAB>descriptionline toconfloose/manifest.txt.
Contributions are welcome: new confloose, fixes, better antidotes. Keep in mind that
main is served as-is by GitHub Pages, so whatever gets merged runs on the machine
of everyone who pipes confloose.sayto.dev into bash. Every change therefore goes
through a pull request and is reviewed line by line.
-
Fork the repo and branch off
main. -
Make your change, following Adding a confloose for a new one.
-
Test it with the local server shown in How it works: apply the confloose, run its antidote, and check that your dotfiles are back to their previous state.
-
Run the checks that CI runs on every pull request (both must pass):
bash tests/lint.sh # syntax, ShellCheck, manifest, download URLs bash tests/smoke.sh # applies then undoes each confloose in a throwaway HOME
smoke.shis safe to run on your machine: it stubs out the X11/i3 tools and never touches your session. A confloose that starts a background daemon cannot be checked that way and goes in itsSKIPlist. -
Open a pull request against
main, one confloose per PR, saying what it does, how the antidote undoes it and where it was tested.
A confloose is merged only if it:
- has an antidote that undoes all of it and nothing else: never the user's own edits or another confloose (see the tagging in How it works);
- stays user-level: no
sudo, and anything it installs lives under$HOME(or$AFS_DIR); - loses no user data: a file it replaces is backed up and put back by the antidote
(like
alacritty-color); - sends nothing off the machine;
- downloads remote files only through
CONFLOOSE_BASE, never from another host; - ships sources rather than prebuilt binaries (like
fake-i3lock, built on the target), so the whole diff can be reviewed; - only includes pictures or recordings of people who agreed to it;
- is creative and knows no limits 😈 (well, apart from the ones above).
Settings > Pages > Source: branch main, folder / (root). Then check:
curl https://sayt-0.github.io/Confloose/install.sh | headThe .nojekyll file makes Pages serve the files as-is.
confloose.sayto.dev serves the Pages install.sh directly: a small proxy in front
of GitHub Pages returns the installer for the domain root, so the short form works:
curl confloose.sayto.dev | bashThe domain only fronts the installer; install.sh still downloads each confloose from
the Pages URL in CONFLOOSE_BASE (https://sayt-0.github.io/Confloose), which is why
that default stays on sayt-0.github.io.
If the repo is renamed (e.g. to lowercase
confloose), update the defaultCONFLOOSE_BASEURL at the top ofinstall.sh.
These confloose alter a session (keyboard, screen, aliases, fake binaries...). They
stay user-level, need no root, and every confloose has its antidote (plus the
confloose.lock that lists what is installed). Use them only on your own machines
or on consenting sessions.