Skip to main content

ThinkPad mute-mic light daemon

Project description

tpmmld

tpmmld is the ThinkPad Mute-Mic Light Daemon. If you have a certain ThinkPad where you have a mute-mic indicator led on the F4 button, this daemon will control it, based on the current PulseAudio mute state.

Has an additional feature that can mute/unmute all inputs instead of only the one you're monitoring.

Note: to enable/disable the led, the sudo and tee commands are used. I'm sure there's a better way, but I didn't want this program to run with elevated privileges itself.

Install

Ideally:

pip install tpmmld

However, If it's not available there for whatever reason, you can also get it going yourself, directly from the git repository:

git clone https://github.com/rubin55/tpmmld
cd tpmmld
python -m venv .venv
pip instal -r requirements.txt
bin/tpmmld.sh -s # shows available input source devices, with index number
bin/tpmmld-sh -i 123 # run tpmmld in foreground, monitor device 123,

Usage

$ bin/tpmmld.sh -h
usage: tpmmld [-h] [-a] [-d] [-i INDEX] [-s] [-l {WARNING,ERROR,INFO,DEBUG}] [-v]

options:
  -h, --help            show this help message and exit
  -a, --all             when muting, mute all available inputs, when unmuting, unmute all available inputs
  -d, --daemonize       run in background (daemonized mode). If not specified, the process will run in the
                        foreground output to stdin
  -i INDEX, --index INDEX
                        specify index of device to monitor
  -s, --sources         show list of sources, with index numbers
  -l {WARNING,ERROR,INFO,DEBUG}, --loglevel {WARNING,ERROR,INFO,DEBUG}
                        specify the loglevel to use, defaults to 'INFO'
  -v, --version         show program's version number and exit

Build

Since this is a python package, you don't really need to build, but if you would like to build the pip packages, you can do that as follows:

python -m build

You will then find the pip package binaries in dist/. You can install them using pip.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tpmmld-1.0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

tpmmld-1.0.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file tpmmld-1.0.1.tar.gz.

File metadata

  • Download URL: tpmmld-1.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for tpmmld-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7916645456972c6ba1eeef31d21fb7b796cce484ac7ad7f6d1dad808ce644281
MD5 40e726ed23b8f1939f945c11f83eb1ca
BLAKE2b-256 0d7ae9024827f0650ec4ac3f8e4158b72e84c52dbc45f08831f8fab3690e166f

See more details on using hashes here.

File details

Details for the file tpmmld-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: tpmmld-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for tpmmld-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eff40220953be02e49c36fb8638375c27339b8e0d6097d5113638d4c66c9f59c
MD5 313d4229689a26d027209e88c138687c
BLAKE2b-256 13d0f5d4f965b3807de92c41a5c37716796e4910cb409791fcd6679f5439c70c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page