tobi-wan-kenobi / bumblebee-status

bumblebee-status is a modular, theme-able status line generator for the i3 window manager.
https://bumblebee-status.readthedocs.io/en/main/
MIT License
1.2k stars 229 forks source link

Parameter names get converted to lowercase when using toml config file #992

Closed TheEdgeOfRage closed 9 months ago

TheEdgeOfRage commented 9 months ago

Bug Report

Description

Affected module: config Version used: latest git

I use a toml config file to define all of my parameters. The problematic ones in this case, are the pulsectl pretty name params. The parameter key gets converted to lower case (presumably during toml parsing), while the pulsectl lib returns the properly capitalized name. The pulsectl module then fails to look up the params, cause the names don't match. Adding a .lower() call on the output from pulsectl fixes this issue, but breaks parameters passed in through the command line.

Related issue

How to reproduce

Create a toml config for bumblebee, similar to this:

[core]
modules=pulseout

[module-parameters]
pulseout.showdevicename=true
pulseout.in=alsa_output.usb-Topping_DX3_Pro_-00.playback.0.0=Headphones

Just adjust the device name to one on your own machine that has capital letters. Starting bumblebee with this config, will still show the original name.

tobi-wan-kenobi commented 9 months ago

looks like ConfigParser, the module that is used by bumblebee-status, is case insensitive by default. There are ways around that, I hope I can investigate during the weekend.

TheEdgeOfRage commented 9 months ago

I'm using a fork of bumblebee with a couple of my own fixes (including for this) anyway, so no biggie if there's no way around it :)