This guide walks you through adding a new sticker pack to the glitches.chat Matrix homeserver. ![[Adding Emoji to Matrix Stickerpicker 2026-03-02 20.54.04.svg]] ## Prerequisites Before you start, make sure you have: - `git` installed - Python 3 with one of: - `python3-virtualenv` package, or - [`uv`](https://docs.astral.sh/uv/getting-started/installation/) (recommended, faster) - A folder of sticker images (PNG for static, GIF for animated) - Your Matrix access token (see step 3 below) > [!Note] > Stickers work best at 512x512 pixels. The name before the file extension becomes the sticker's name in the picker. --- ## Step 1: Clone the Repository ```shell # Clone with SSH git clone ssh://[email protected]/kglitchy/glitches.chat.git # Or clone with HTTPS git clone https://codeberg.org/kglitchy/glitches.chat.git cd glitches.chat ``` --- ## Step 2: Set Up the Virtual Environment Navigate to the stickerpicker directory and create a virtual environment: ```shell cd roles/server_config/files/stickerpicker/ # Create virtualenv (choose one) python3 -m virtualenv .venv # with python3-virtualenv uv venv # or with uv (faster) # Activate the virtualenv source .venv/bin/activate # Install the sticker-pack tool (choose one) pip install . # with pip uv pip install . # or with uv ``` You should now have `sticker-pack` available in your PATH. --- ## Step 3: Get Your Matrix Access Token The `sticker-pack` tool needs your access token to upload stickers to the homeserver. 1. **Click your profile photo** → **"All settings"** ![[CleanShot 2026-03-02 at [email protected]|Profile menu showing "All settings" option]] 2. **Click "Help & About"** ![[CleanShot 2026-03-02 at [email protected]|Settings sidebar showing "Help & About"]] 3. **Scroll down** → click **"Access Token"** → click the **"Copy"** icon ![[CleanShot 2026-03-02 at [email protected]|Access token section with copy button]] Keep this token handy, you'll paste it in the next step. --- ## Step 4: Create Your Sticker Pack 1. Create a folder with your sticker images in the `stickerpicker` directory (this will be the name of the sticker pack): ```shell mkdir my-stickers # Copy your images into my-stickers/ ``` 2. Generate the pack and add it to the index: ```shell $ sticker-pack my-stickers --add-to-index web/packs Matrix config file not found. Please enter your homeserver and access token. Homeserver URL: https://glitches.chat Access token: PASTE_YOUR_ACCESS_TOKEN_HERE ``` Replace `my-stickers` with your folder name. --- ## Step 5: Submit Your Changes Once the command completes, your sticker pack is ready. Now commit and open a pull request: ```shell git add . git commit -m "Add new sticker pack: my-stickers" git push ``` Then open a pull request on Codeberg and tag `@kglitchy` for review. You can also ping me on matrix: [@kglitchy:glitches.chat](matrix://@kglitchy:glitches.chat) --- ## Deployment (for @kglitchy) After merging the PR, deploy the updated stickerpicker: ```shell cd ansible ansible-playbook -i inventory.ini site.yml -J --tags stickerpicker ``` --- ## Troubleshooting | Issue | Solution | |-------|----------| | `sticker-pack: command not found` | Make sure you activated the virtualenv with `source .venv/bin/activate` | | "Invalid access token" | Tokens expire — generate a fresh one from Element settings | | Images not showing | Use `.png` for static stickers, `.gif` for animated ones | ## Tips - **File naming:** Use kebab-case (e.g., `party-parrot.gif`) for clean sticker names - **Size:** 512×512px is the sweet spot for sticker quality - **Transparency:** PNGs with alpha transparency look best in dark themes