thelounge-plugin-mobile-format
v1.0.6
Published
Touch-friendly IRC formatting toolbar for The Lounge mobile web client.
Maintainers
Readme
The Lounge Mobile Format
A touch-friendly IRC formatting toolbar for The Lounge mobile web client.
It adds a compact T button inside the message input so mobile users can apply IRC formatting without memorising control codes or using a hardware keyboard.
Features
- Input-corner text formatting button designed for mobile/touch use
- Toolbar for:
- Bold
- Italic
- Underline
- Strikethrough
- Monospace
- IRC foreground colours
- Reset formatting
- Compact 16-colour IRC palette
- Works with selected text or inserts formatting codes at the cursor
- Tracks active formatting state near the cursor
- Keeps The Lounge's native scroll-to-bottom button usable on mobile
- No runtime dependencies
Installation
The Lounge plugins are installed into the The Lounge data/config directory. Where that lives depends on how you self-host The Lounge.
1. Standard npm install
If The Lounge is installed normally on the host:
thelounge install thelounge-plugin-mobile-format
thelounge restartIf your service is managed by systemd, restart it instead:
sudo systemctl restart thelounge2. Docker / Docker Compose with a mounted data directory
Most Docker installs mount the The Lounge data directory, commonly something like:
volumes:
- /path/on/host/thelounge:/var/opt/theloungeInstall the plugin from inside the running container:
docker exec -it thelounge thelounge install thelounge-plugin-mobile-format
docker restart theloungeIf your container has a different name, replace thelounge with your container name:
docker psWith Docker Compose:
docker compose exec thelounge thelounge install thelounge-plugin-mobile-format
docker compose restart thelounge3. Docker install from a local checkout
Useful when testing changes before publishing to npm.
If your local checkout is mounted into the container:
docker compose exec thelounge thelounge install /path/inside/container/thelounge-plugin-mobile-format
docker compose restart theloungeOr install into the host-mounted packages directory manually:
cd /path/on/host/thelounge/packages
npm install /path/on/host/thelounge-plugin-mobile-format
docker restart thelounge4. Install directly from GitHub
Once the repository is public, you can install from GitHub instead of npm:
thelounge install github:binkiewka/thelounge-plugin-mobile-formator with npm syntax from the The Lounge packages directory:
cd /path/to/thelounge/packages
npm install github:binkiewka/thelounge-plugin-mobile-formatDocker example:
docker exec -it thelounge thelounge install github:binkiewka/thelounge-plugin-mobile-format
docker restart theloungeIf your GitHub username/org differs, replace binkiewka with the actual owner.
5. Manual install into The Lounge packages directory
If thelounge install is not available in your setup:
cd /path/to/thelounge/packages
npm install thelounge-plugin-mobile-formatThen restart The Lounge.
Common package locations:
- Bare-metal Linux:
~/.thelounge/packages - Docker official image with mounted data:
/var/opt/thelounge/packagesinside the container - Host bind mount: whatever host path you mounted to
/var/opt/thelounge
Usage
- Open The Lounge on a phone or touch device.
- Tap the T button in the message input.
- Tap a formatting option.
- Type normally, or select text first and then apply formatting.
- Tap the colour button to open the colour palette.
- Pick a colour to apply it; the palette closes automatically.
- Tap the colour button again if you opened the palette and changed your mind.
How it works
The plugin registers a small client-side script and stylesheet with The Lounge:
index.jsregisters public assets and injects the client script into The Lounge's HTML template.plugin.jscreates the formatting toggle, toolbar, colour palette, and IRC control-code insertion logic.plugin.csshandles mobile-friendly positioning and styling.
The inserted formatting codes are standard IRC control characters, so messages remain compatible with other IRC clients.
IRC formatting controls
| Format | IRC control |
| --- | --- |
| Bold | \x02 |
| Colour | \x03NN |
| Italic | \x1D |
| Strikethrough | \x1E |
| Underline | \x1F |
| Monospace | \x11 |
| Reset | \x0F |
Compatibility
- The Lounge:
>= 4.0.0 - Designed primarily for mobile/touch layouts
- Also works on desktop browsers
Development
Clone the repo, edit the files, then install the local package into your The Lounge instance:
git clone https://github.com/binkiewka/thelounge-plugin-mobile-format.git
cd thelounge-plugin-mobile-format
npm test
npm pack --dry-runLocal install:
thelounge install /path/to/thelounge-plugin-mobile-formatDocker local install example:
docker exec -it thelounge thelounge install /path/inside/container/thelounge-plugin-mobile-format
docker restart theloungePublishing to npm
npm test
npm pack --dry-run
npm publishBefore publishing a new release, update:
versioninpackage.jsonCHANGELOG.md
License
MIT © Tomasz Binkiewicz
