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

<label> support for IPC module #2841

Merged
merged 4 commits into from Oct 23, 2022
Merged

<label> support for IPC module #2841

merged 4 commits into from Oct 23, 2022

Conversation

madhavpcm
Copy link
Contributor

@madhavpcm madhavpcm commented Oct 14, 2022

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

Related Issues & Documents

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

New <label> tag and <output> is deprecated

@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Merging #2841 (e031fef) into master (54b75f2) will decrease coverage by 0.30%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #2841      +/-   ##
==========================================
- Coverage   13.47%   13.17%   -0.31%     
==========================================
  Files         151      162      +11     
  Lines       11515    11509       -6     
==========================================
- Hits         1552     1516      -36     
- Misses       9963     9993      +30     
Flag Coverage Δ
unittests 13.17% <0.00%> (-0.31%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/modules/ipc.hpp 0.00% <ø> (ø)
src/modules/ipc.cpp 0.00% <0.00%> (ø)
include/errors.hpp 25.00% <0.00%> (-15.00%) ⬇️
src/utils/io.cpp 42.85% <0.00%> (-3.30%) ⬇️
src/tags/dispatch.cpp 85.22% <0.00%> (-2.78%) ⬇️
include/components/logger.hpp 52.38% <0.00%> (-2.17%) ⬇️
src/drawtypes/layouticonset.cpp 81.57% <0.00%> (-1.76%) ⬇️
src/components/config_parser.cpp 42.94% <0.00%> (-1.57%) ⬇️
src/drawtypes/label.cpp 10.49% <0.00%> (-1.37%) ⬇️
src/ipc/util.cpp 72.00% <0.00%> (-1.08%) ⬇️
... and 129 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

src/modules/ipc.cpp Outdated Show resolved Hide resolved
src/modules/ipc.cpp Outdated Show resolved Hide resolved
@madhavpcm
Copy link
Contributor Author

Output, and label are working for these two configs

type = custom/ipc
label= "%output%"
hook-0 = echo foobar
hook-1 = date +%s
hook-2 = whoami
format= <label>
format-background = #ff2
format-0 = <label>
format-1 = <label>
format-2 = <label>

; Based on colors defined by user
format-0-background= ${color.shade1}
format-2-background= ${color.shade3}
initial = 1
click-left = "#demo.hook.0"
click-right = "#demo.hook.1"
double-click-left = "#demo.hook.2"

[module/demo1]
type = custom/ipc
hook-0 = echo 00
hook-1 = echo 10
format = |<output>|
hook-2 = echo 20

format-0 = |<output>|
format-1 = |<output>|
format-2 = |<output>|
format-0-background= ${color.shade1}
format-1-background= ${color.shade1}
format-2-background= ${color.shade3}
initial = 1
click-left = "#demo1.hook.0"
click-right = "#demo1.hook.1"
double-click-left = "#demo1.hook.2"

```. Format-x seems to work for both. Lemme know if there are any other test cases which I missed before I add details to contributing.md

src/modules/ipc.cpp Outdated Show resolved Hide resolved
src/modules/ipc.cpp Outdated Show resolved Hide resolved
src/modules/ipc.cpp Outdated Show resolved Hide resolved
src/modules/ipc.cpp Outdated Show resolved Hide resolved
src/modules/ipc.cpp Outdated Show resolved Hide resolved
src/modules/ipc.cpp Outdated Show resolved Hide resolved
 * Corrections Simplified
Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now 😃

@patrick96
Copy link
Member

Can you still add a changelog entry? Then we can merge this.

@madhavpcm
Copy link
Contributor Author

madhavpcm commented Oct 22, 2022 via email

@patrick96 patrick96 merged commit 30e1cc2 into polybar:master Oct 23, 2022
@patrick96 patrick96 mentioned this pull request Nov 5, 2023
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants