Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom/ipc: Only first appearance of %pid% is replaced. #2500

Closed
4 tasks done
patrick96 opened this issue Sep 13, 2021 · 0 comments · Fixed by #2506
Closed
4 tasks done

custom/ipc: Only first appearance of %pid% is replaced. #2500

patrick96 opened this issue Sep 13, 2021 · 0 comments · Fixed by #2506
Assignees
Labels
Milestone

Comments

@patrick96
Copy link
Member

Checklist

  • I have read the appropriate section in the contributing
    guidelines
  • I believe this issue is a problem with polybar itself and not a misconfiguration on my part.
  • I have searched for other open and closed issues that
    may have already reported this problem.
  • I have checked the known issues page for this problem.

Describe the bug

Expected behavior:
Using the %pid% token multiple times in the same hook command or click action should replace all tokens.

Actual behavior:

Only the first instance of %pid% in any hook command or click actions is replaced.

Was it working before?

Seems to have always been like this.

To Reproduce

[bar/example]
modules-left = ipctest
enable-ipc = true
[module/ipctest]
type = custom/ipc
hook-0 = echo "%pid% %pid%"
initial = 1

Screenshots

scrot

Environment:

  • WM: Herbstluftwm
  • Distro: Archlinux
  • Output of polybar -vvv:
polybar 3.5.6-118-gc65f6857

Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor

Build type: Release
Compiler: /usr/bin/c++
Compiler flags: -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wextra -Wpedantic -Wsuggest-override -O3 -DNDEBUG
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now 

Additional context

The ipc module just searches for the first instance.

@patrick96 patrick96 added the bug label Sep 13, 2021
@patrick96 patrick96 added this to the 3.5.7 milestone Sep 13, 2021
@patrick96 patrick96 self-assigned this Sep 13, 2021
patrick96 added a commit to patrick96/polybar that referenced this issue Sep 13, 2021
patrick96 added a commit that referenced this issue Sep 13, 2021
@patrick96 patrick96 mentioned this issue Sep 21, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant