brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.26k stars 620 forks source link

pa_card_active_profile does not update on changes #926

Open nioncode opened 4 years ago

nioncode commented 4 years ago

Issue

It seems like the value of pa_card_active_profile is not updated when the PulseAudio configuration changes, as can be seen from the following snippet:

$ conky -c conky-pulse
[
{"full_text": "Analog Stereo Output + Analog Mono Input ####......"},
],
[
{"full_text": "Analog Stereo Output + Analog Mono Input ####......"},
],
[
{"full_text": "Analog Stereo Output + Analog Mono Input ######...."},
],
^C[
{"full_text": "Analog Stereo Output + Analog Mono Input ######...."},
],
conky: received SIGHUP, SIGINT, or SIGTERM to terminate. bye!

$ conky -c conky-pulse
[
{"full_text": "Analog Stereo Duplex ######...."},
],
[
{"full_text": "Analog Stereo Duplex ######...."},
],

After the first few outputs, I disconnected my headphones which can be seen, because the volume bar changes. However, the active profile does not change. After restarting conky, the value correctly shows the new profile.

Information conky version: 1.11.2 sample config:

conky.config = {
    out_to_x = false,
    own_window = false,
    out_to_console = true,
    double_buffer = false,
    background = false,
    update_interval = 1.0,
    update_interval_on_battery = 3.0,
    total_run_times = 0,
    short_units = true,
    if_up_strictness = 'address',
    use_spacer = 'none',
    override_utf8_locale = false,
    cpu_avg_samples = 2,
    pad_percents = 2,
    times_in_seconds = true,
};

conky.text = [[
[
{"full_text": "${pa_card_active_profile} ${pa_sink_volumebar}"},
],
]];
lasers commented 4 years ago

If I understand this right, you might be better off using https://github.com/ultrabug/py3status instead.

nioncode commented 4 years ago

@lasers I don't understand, why should I use py3status instead? The problem has nothing to do with py3status or i3 / i3status.

lasers commented 4 years ago

Technically, no. If you're using conky to pipe this out to i3bar, then it'd be better/trivial to add new placeholders in volume_status (one of py3status modules).

Also, Conky can have some issues with not escaping slashes or such for i3bar when things are being outputted by the variables.

Anyhow, it does not have to do nothing with py3status or i3 / i3status, but if you're using this for i3bar, then py3status or others might be a better/viable alternative.

Thank you for the report. I'll label this as bug. Cheers.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.

nioncode commented 1 year ago

This is still happening. Further info: if you change the active profile manually e.g. in pavucontrol, then the conky output changes. However, if you unplug (or re-plug if it has been disconnected) the current default device (e.g. your headphones), then the conky output does not change.