Push-to-talk microphone control with a daemon-backed command queue
Project description
pttman
Push-to-talk microphone control for PipeWire and WirePlumber.
pttman runs a small user service that serializes mute, unmute, and toggle
requests over a Unix datagram socket so rapid key presses do not race each
other.
Installation
Recommended: uv
uv tool install pttman
This installs pttman to ~/.local/bin/.
Then install and start the systemd service:
git clone https://github.com/mwolson/pttman.git
cd pttman
mkdir -p ~/.config/systemd/user
cp systemd/pttman.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now pttman.service
Alternative: install.sh
git clone https://github.com/mwolson/pttman.git
cd pttman
./install.sh
systemctl --user start pttman.service
This copies pttman to ~/.local/bin/ and installs and enables the user
service.
After installing, point your push-to-talk key at the client binary.
xremap
On Arch Linux, install the xremap variant that matches your desktop environment (only one should be installed):
paru -S xremap-gnome-bin # GNOME
paru -S xremap-hyprland-bin # Hyprland
paru -S xremap-kde-bin # KDE Plasma
paru -S xremap-niri-bin # Niri
paru -S xremap-wlroots-bin # wlroots-based compositors (sway, etc.)
Then configure a push-to-talk key binding:
modmap:
- name: Push-to-talk
remap:
F5:
skip_key_event: true
press: { launch: ["/home/your-user/.local/bin/pttman", "--unmute"] }
release: { launch: ["/home/your-user/.local/bin/pttman", "--mute"] }
Pressing F5 tells the daemon to unmute. Releasing F5 tells it to mute again.
You can check the current microphone state with:
pttman --status
Corsair mice on Arch Linux
If you use a Corsair mouse and want one of its extra buttons to behave like F5,
ckb-next is a straightforward way to do it.
On Arch Linux, install ckb-next with:
sudo pacman -S ckb-next
Then launch ckb-next, select your mouse, pick the button you want to use for
push-to-talk, and remap that button to F5.
After that, xremap can keep using the F5 rule above, and your Corsair mouse
button will trigger push-to-talk through pttman.
If you specifically want the upstream development build instead of the packaged
release, the ckb-next project wiki also lists ckb-next-git for Arch-based
systems.
Commands
pttman --daemon
pttman --mute
pttman --unmute
pttman --toggle
pttman --status
Aliases:
--releasefor--mute--pressand--talkfor--unmute
Service
systemctl --user start pttman.service
systemctl --user status pttman.service
journalctl --user -u pttman.service -f
The daemon listens on $XDG_RUNTIME_DIR/pttman.sock. If the daemon is not
running, client commands fall back to direct wpctl execution.
Development
Testing
python3 -m unittest discover -s tests -v
Hooks
lefthook install
lefthook run pre-commit --all-files
The pre-commit hook runs uvx ruff check, uvx ty check, and the unit test
suite.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pttman-0.1.1.tar.gz.
File metadata
- Download URL: pttman-0.1.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea0f6a30b1cbf90565f13b297193e35de0602562e509ad54dc32bb72ac53c5d0
|
|
| MD5 |
c64a2cf883bb02d8beef449bad8e2cf9
|
|
| BLAKE2b-256 |
fa9696e2c2c9985f65038002f67643505fd0e16741bc9c77d33661812f79a0a4
|
Provenance
The following attestation bundles were made for pttman-0.1.1.tar.gz:
Publisher:
publish.yml on mwolson/pttman
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pttman-0.1.1.tar.gz -
Subject digest:
ea0f6a30b1cbf90565f13b297193e35de0602562e509ad54dc32bb72ac53c5d0 - Sigstore transparency entry: 1208777915
- Sigstore integration time:
-
Permalink:
mwolson/pttman@3df508eab8c093d666f66e2e6ea9f014e0ff8d64 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/mwolson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3df508eab8c093d666f66e2e6ea9f014e0ff8d64 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pttman-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pttman-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d5f605cdd8842dc6916114277351230c783db13f13ee56e3c87e02f2508c127
|
|
| MD5 |
6380f9b02d31af4dc7603f094af110f8
|
|
| BLAKE2b-256 |
841875447cd7348043b72219c1b326c3410c778a80ca64aa948b45f542cd81f1
|
Provenance
The following attestation bundles were made for pttman-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on mwolson/pttman
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pttman-0.1.1-py3-none-any.whl -
Subject digest:
7d5f605cdd8842dc6916114277351230c783db13f13ee56e3c87e02f2508c127 - Sigstore transparency entry: 1208777935
- Sigstore integration time:
-
Permalink:
mwolson/pttman@3df508eab8c093d666f66e2e6ea9f014e0ff8d64 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/mwolson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3df508eab8c093d666f66e2e6ea9f014e0ff8d64 -
Trigger Event:
push
-
Statement type: