TTYverse Extensions
This directory contains bundled extensions for TTYverse, the command-line fediverse client.
Extension Loading
TTYverse uses a simple XDG-compliant extension system. Extensions are only loaded from:
~/.local/share/ttyverse/extensions/ (XDG_DATA_HOME/ttyverse/extensions)
Extensions are loaded with the -exts flag:
perl ttyverse.pl -exts=soundpack
perl ttyverse.pl -exts=extension1,extension2
Managing Extensions
Use the included management script to enable/disable bundled extensions:
# Show available and enabled extensions
./extensions/manage-extensions.sh list
# Enable an extension (creates symlink in XDG directory)
./extensions/manage-extensions.sh enable soundpack
# Disable an extension (removes from XDG directory)
./extensions/manage-extensions.sh disable soundpack
# Check extension status
./extensions/manage-extensions.sh status soundpack
Available Extensions
soundpack.pl
Plays notification sounds for different types of posts (timeline, replies, DMs, mentions, search results).
Configuration options (add to ~/.config/ttyverse/ttyverse.rc):
extpref_sound_command=paplay # Sound player (paplay, play, ogg123, etc.)
extpref_soundpack=default # Sound pack name
Sound files location: ~/.local/share/ttyverse/sounds/default/
default.ogg- Regular timeline postsmention.ogg- Mentions of your usernamedm.ogg- Direct messagesme.ogg- Your own postsfollow.ogg- New followersboost.ogg- Your posts boostedfavourite.ogg- Your posts favouritedpoll.ogg- Poll notificationsannouncement.ogg- Server announcements
Installing Custom Extensions
- Copy your extension
.plfile to~/.local/share/ttyverse/extensions/ - Load it with
-exts=yourextension
Extension Development
Extensions are Perl modules that hook into TTYverse's event system. Key variables:
$data- XDG data directory (~/.local/share/ttyverse)$config- XDG config directory (~/.config/ttyverse)$store- Extension workspace (persistent storage)$silent- Silent mode flag$stdout- Output filehandle
Extensions can define these functions:
$notifier- Called for new posts$heartbeat- Called periodically$handle- Called for user commands$prepost- Called before posting$postpost- Called after posting
Set $store->{'loaded'} = 1; at the end of your extension.