Toilet

The Linux trash bin with standards. It only accepts the filth of lesser operating systems — then flushes it into the void. 🐧

Download
⌨️

Toilet CLI

toilet.py

Command-line plumbing. drop, peek, and flush — with a typed confirmation before anything goes down the pipes.

⬇ Download View code
🖱️

Toilet GUI

toilet_gui.py

A tkinter window with a file picker, a live bowl, and one big red FLUSH TOILET button that goes WHOOOOSH (with sound).

⬇ Download View code

Requires Python 3. GUI needs tkinter — on Debian/Ubuntu: sudo apt install python3-tk  •  Run with python3 toilet.py drop file.exe

Source — toilet.py
toilet.py
#!/usr/bin/env python3
"""
🚽 TOILET 🚽
The Linux trash bin that only accepts the filth of lesser operating systems.

Drag your .exe, .msi, .dmg, and other Windows/Mac droppings in here.
Then FLUSH them into the void forever.

Penguin-approved. Tux would be proud.
"""

import os
import sys
import shutil

# ---- The list of things deemed unworthy of a real OS ----
WINDOWS_MAC_EXTENSIONS = {
    # Windows filth
    ".exe", ".msi", ".dll", ".bat", ".cmd", ".com", ".scr", ".vbs",
    ".ps1", ".lnk", ".sys", ".cab", ".reg", ".cpl", ".ini",
    # Mac droppings
    ".dmg", ".pkg", ".app", ".plist", ".ds_store",
}

WINDOWS_MAC_SPECIAL_NAMES = {
    "thumbs.db", "desktop.ini", ".ds_store", "ntuser.dat",
    "autorun.inf", "pagefile.sys", "hiberfil.sys",
}

# The toilet bowl itself
BOWL = os.path.join(os.path.expanduser("~"), ".toilet_bowl")


def is_flushable(path):
    """Only Windows/Mac garbage gets to swim in our bowl."""
    name = os.path.basename(path).lower()
    _, ext = os.path.splitext(name)
    return ext in WINDOWS_MAC_EXTENSIONS or name in WINDOWS_MAC_SPECIAL_NAMES


def ensure_bowl():
    os.makedirs(BOWL, exist_ok=True)


def drop(path):
    """Toss a file into the toilet (does not delete yet — just holds it there)."""
    if not os.path.exists(path):
        print(f"🚽 '{path}' doesn't exist. You can't flush a ghost.")
        return

    if not is_flushable(path):
        print(f"🛑 NOPE. '{os.path.basename(path)}' is not Windows/Mac garbage.")
        print("   This toilet has standards. Respectable Linux files stay dry. 🐧")
        return

    ensure_bowl()
    dest = os.path.join(BOWL, os.path.basename(path))

    # Avoid clobbering identically-named filth
    counter = 1
    base, ext = os.path.splitext(dest)
    while os.path.exists(dest):
        dest = f"{base}_{counter}{ext}"
        counter += 1

    shutil.move(path, dest)
    print(f"💩 '{os.path.basename(path)}' has been dropped in the toilet. *plop*")


def peek():
    """See what's currently floating in the bowl."""
    ensure_bowl()
    contents = os.listdir(BOWL)
    if not contents:
        print("🚽 The toilet is sparkling clean. Nothing to flush.")
        return
    print("🚽 Currently swimming in the bowl:")
    for item in contents:
        print(f"   💩 {item}")


def flush():
    """FLUSH IT ALL. Forever. There is no recovery. There is no mercy."""
    ensure_bowl()
    contents = os.listdir(BOWL)

    if not contents:
        print("🚽 *flush* ... nothing happened. The bowl was already empty.")
        return

    print(f"🚽 You are about to FLUSH {len(contents)} item(s) into oblivion.")
    print("   This is permanent. Gone. Vanished. Down the pipes forever.")
    confirm = input("   Type 'FLUSH' to send it all to the sewer: ")

    if confirm.strip() != "FLUSH":
        print("🚽 Flush aborted. The garbage lives to stink another day.")
        return

    for item in contents:
        full = os.path.join(BOWL, item)
        if os.path.isdir(full):
            shutil.rmtree(full)
        else:
            os.remove(full)

    print("🌊 *WHOOOOSH* 🌊")
    print("💨 It's all gone. Goodbye, Windows. Goodbye, Mac. Long live Linux. 🐧")


def usage():
    print(__doc__)
    print("Usage:")
    print("  toilet drop <file> [file2 ...]   Drop Windows/Mac files into the bowl")
    print("  toilet peek                      See what's in the bowl")
    print("  toilet flush                     Permanently flush everything")
    print()
    print("Acceptable filth: " + ", ".join(sorted(WINDOWS_MAC_EXTENSIONS)))


def main():
    if len(sys.argv) < 2:
        usage()
        return

    command = sys.argv[1].lower()

    if command == "drop":
        if len(sys.argv) < 3:
            print("🚽 Drop WHAT exactly? Give me a file.")
            return
        for path in sys.argv[2:]:
            drop(path)
    elif command == "peek":
        peek()
    elif command == "flush":
        flush()
    else:
        usage()


if __name__ == "__main__":
    main()
Source — toilet_gui.py
toilet_gui.py
#!/usr/bin/env python3
"""
🚽 TOILET (GUI Edition) 🚽
The Linux trash bin that only accepts the filth of lesser operating systems.

Drag-free, click-friendly. Drop your Windows/Mac droppings in the bowl,
then smash the big FLUSH TOILET button to send them to the sewer forever.

Penguin-approved. Tux would be proud. 🐧
"""

import os
import shutil
import tkinter as tk
from tkinter import filedialog, messagebox

# ---- The list of things deemed unworthy of a real OS ----
WINDOWS_MAC_EXTENSIONS = {
    ".exe", ".msi", ".dll", ".bat", ".cmd", ".com", ".scr", ".vbs",
    ".ps1", ".lnk", ".sys", ".cab", ".reg", ".cpl", ".ini",
    ".dmg", ".pkg", ".app", ".plist", ".ds_store",
}
WINDOWS_MAC_SPECIAL_NAMES = {
    "thumbs.db", "desktop.ini", ".ds_store", "ntuser.dat",
    "autorun.inf", "pagefile.sys", "hiberfil.sys",
}

BOWL = os.path.join(os.path.expanduser("~"), ".toilet_bowl")


def is_flushable(path):
    name = os.path.basename(path).lower()
    _, ext = os.path.splitext(name)
    return ext in WINDOWS_MAC_EXTENSIONS or name in WINDOWS_MAC_SPECIAL_NAMES


def ensure_bowl():
    os.makedirs(BOWL, exist_ok=True)


def play_flush_sound():
    """Best-effort flush noise. Falls back to a terminal bell if nothing's available."""
    try:
        # Linux: paplay/aplay if a sound exists; otherwise just bell
        for cmd in ("paplay /usr/share/sounds/freedesktop/stereo/complete.oga",
                    "aplay -q /usr/share/sounds/alsa/Front_Center.wav"):
            if os.system(cmd + " 2>/dev/null") == 0:
                return
    except Exception:
        pass
    print("\a", end="", flush=True)  # terminal bell as a sad little splash


class ToiletApp:
    def __init__(self, root):
        self.root = root
        root.title("🚽 Toilet")
        root.geometry("440x560")
        root.configure(bg="#2b2b3a")

        ensure_bowl()

        tk.Label(root, text="🚽 TOILET", font=("Helvetica", 28, "bold"),
                 fg="#ffffff", bg="#2b2b3a").pack(pady=(18, 0))
        tk.Label(root, text="Only Windows & Mac filth allowed. 🐧",
                 font=("Helvetica", 11), fg="#9aa0c0", bg="#2b2b3a").pack(pady=(0, 12))

        tk.Button(root, text="➕  Drop files in the bowl",
                  font=("Helvetica", 12), bg="#4a6fa5", fg="white",
                  activebackground="#5a7fb5", relief="flat", padx=10, pady=8,
                  command=self.drop_files).pack(pady=6)

        # The bowl contents
        frame = tk.Frame(root, bg="#1e1e2a")
        frame.pack(fill="both", expand=True, padx=18, pady=10)
        tk.Label(frame, text="💧 Currently swimming in the bowl:",
                 font=("Helvetica", 10, "bold"), fg="#cccccc",
                 bg="#1e1e2a").pack(anchor="w", padx=8, pady=(8, 4))

        self.listbox = tk.Listbox(frame, bg="#15151f", fg="#e0e0e0",
                                  font=("Courier", 10), selectbackground="#4a6fa5",
                                  relief="flat", highlightthickness=0)
        self.listbox.pack(fill="both", expand=True, padx=8, pady=(0, 8))

        # The glorious flush button
        tk.Button(root, text="🌊  FLUSH TOILET  🌊",
                  font=("Helvetica", 16, "bold"), bg="#c0392b", fg="white",
                  activebackground="#e74c3c", relief="flat", padx=10, pady=14,
                  command=self.flush).pack(pady=12, fill="x", padx=18)

        self.status = tk.Label(root, text="The toilet awaits.",
                               font=("Helvetica", 9), fg="#9aa0c0", bg="#2b2b3a")
        self.status.pack(pady=(0, 10))

        self.refresh()

    def refresh(self):
        self.listbox.delete(0, tk.END)
        items = os.listdir(BOWL)
        if not items:
            self.listbox.insert(tk.END, "  (sparkling clean — nothing to flush)")
        else:
            for item in items:
                self.listbox.insert(tk.END, f"  💩 {item}")

    def drop_files(self):
        paths = filedialog.askopenfilenames(title="Pick some Windows/Mac garbage")
        if not paths:
            return
        dropped, rejected = 0, []
        for path in paths:
            if not is_flushable(path):
                rejected.append(os.path.basename(path))
                continue
            dest = os.path.join(BOWL, os.path.basename(path))
            base, ext = os.path.splitext(dest)
            counter = 1
            while os.path.exists(dest):
                dest = f"{base}_{counter}{ext}"
                counter += 1
            shutil.move(path, dest)
            dropped += 1

        if rejected:
            messagebox.showwarning(
                "This toilet has standards 🐧",
                "These aren't Windows/Mac garbage, so they stay dry:\n\n"
                + "\n".join(rejected))

        self.status.config(text=f"*plop* — dropped {dropped} item(s).")
        self.refresh()

    def flush(self):
        items = os.listdir(BOWL)
        if not items:
            messagebox.showinfo("🚽", "*flush* ... nothing happened. The bowl was empty.")
            return

        if not messagebox.askyesno(
                "Flush forever?",
                f"You are about to FLUSH {len(items)} item(s) into oblivion.\n\n"
                "This is permanent. Gone. Down the pipes forever.\n\nProceed?"):
            self.status.config(text="Flush aborted. The garbage lives on.")
            return

        for item in items:
            full = os.path.join(BOWL, item)
            shutil.rmtree(full) if os.path.isdir(full) else os.remove(full)

        play_flush_sound()
        self.refresh()
        self.status.config(text="🌊 WHOOOOSH — it's all gone. Long live Linux. 🐧")
        messagebox.showinfo("🌊 *WHOOOOSH* 🌊",
                            "Goodbye, Windows. Goodbye, Mac.\nLong live Linux. 🐧")


if __name__ == "__main__":
    root = tk.Tk()
    ToiletApp(root)
    root.mainloop()