Skip to main content

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.

Example status_bar

Installation

blstatus has the following dependencies:

  • python3-dev
  • libcairo2-dev
  • libgirepository1.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()])

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

blstatus-0.2.tar.gz (10.2 kB view hashes)

Uploaded Source

Built Distribution

blstatus-0.2-py3-none-any.whl (12.0 kB view hashes)

Uploaded Python 3

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