A status monitor for DWM or other window managers that use WM_NAME
Project description
blstatus
A status monitor for DWM (or any window manager that uses WM_NAME to fill a status bar). Compared to slstatus, blstatus is capable of displaying more information, and it also updates network, audio volume, and battery information asynchronously, rather than using polling.
Installation
blstatus has the following dependencies:
- python3-dev
- libcairo2-dev
- libgirepository2.0-dev
And the following dependencies available on PyPI:
- apscheduler
- asyncio-glib
- pulsectl-asyncio
- pydbus
- xlib
The package can be installed using pipx, e.g.:
sudo apt install pipx python3-dev libcairo2-dev libgirepository1.0-dev
pipx install blstatus
Configuration
blstatus can be configured with a file located at ~/.config/blstatus/config.ini, e.g.
[general]
# Text to use between components
# Needs to be quoted if spaces (or a quote character) are used
spacer = ' | '
# Enable if using statuscmd (https://dwm.suckless.org/patches/statuscmd/)
enable_signal_text = false
[date_time]
# Format string for the date command
# Must be quoted and % must be doubled
format = '+"%%Y-%%m-%%d %%A %%-I:%%M %%P"'
[memory]
# Interval in seconds between updating memory status
interval = 2.0
# Enable using nvidia-smi to get GPU memory usage
enable_gpu = false
[volume]
# Dictionary to map a PulseAudio sink/source name to an abbreviation
# If the end of a PulseAudio device name matches a key the value will be used
# If a PulseAudio device name doesn't match anything in the dictionary, source_sink_unknown_abbreviation is used
# Must be a single line
source_sink_abbreviations = { 'analog-stereo': 'A', 'hdmi-stereo': 'H', 'a2dp_sink': 'B', 'handsfree_head_unit': 'B' }
# Abbreviation to use if a sink/source name isn't known
source_sink_unknown_abbreviation = 'U'
To determine the key part of source_sink_abbreviations, PulseAudio sink/source names can be printed with:
import pulsectl
pulse = pulsectl.Pulse()
print([sink.name for sink in pulse.sink_list()])
print([source.name for source in pulse.source_list()])
Starting with systemd
A systemd service file is included in this repository which can be enabled and started like so:
# Copy the service file
cp blstatus.service ~/.local/share/systemd/user/
# Enable the service
systemctl --user enable blstatus
# Start the service
systemctl --user start blstatus
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
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 blstatus-0.4.tar.gz.
File metadata
- Download URL: blstatus-0.4.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c3b86715f23ed34eefaf6dca08d051138140a45ff05565693e4c29f35621dc6
|
|
| MD5 |
133088b22782bb0fcfae46cab00bf6e4
|
|
| BLAKE2b-256 |
8b47de13bdbb73e47a1d35900b1cd5959e8ad70a5b10a69848f42eec3dd85101
|
File details
Details for the file blstatus-0.4-py3-none-any.whl.
File metadata
- Download URL: blstatus-0.4-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73e3f4d9d198c053f92db6451f81e607e55b3264a27ece81ba9066a67d5ab53b
|
|
| MD5 |
285b6631d961df16400611fb225acfbf
|
|
| BLAKE2b-256 |
6d1bef632c1de0960814cc64b4a362c42b59a7f82ef1fd2a8bc15d99f87b5f55
|