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

Apparent Typo in config.json - actions > update-command [Bug] #444

Closed
Svra44 opened this issue Jun 26, 2024 · 1 comment
Closed

Apparent Typo in config.json - actions > update-command [Bug] #444

Svra44 opened this issue Jun 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Svra44
Copy link

Svra44 commented Jun 26, 2024

Describe the bug

Using "config.json" as sourced from "/etc/xdg/swaync/config.json" I observed that "type": "toggle" such as the example "nmcli radio wifi" toggle wasnt working as expected.
Saw that "update_command" is in the "config.json", however ReadMe & Man indicate it should instead be "update-command". Switching to "update-command" looks to have fixed the toggle behaviour.
https://github.com/ErikReider/SwayNotificationCenter/blob/main/src/config.json.in has the same underscore for "update_command".

-- Example from "config.json" at current
{
"label": "直",
"type": "toggle",
"active": true,
"command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && nmcli radio wifi on || nmcli radio wifi off'",
"update_command": "sh -c '[[ $(nmcli radio wifi) == "enabled" ]] && echo true || echo false'"
}

To Reproduce

Steps to reproduce the behavior:

  1. Use the "config.json" as provided in repo or package
  2. Toggles will not work correctly and becomes desync'd with the actual status reported by nmcli, as "update_command" is not executed.

Expected behavior

"config.json" needs to be corrected to use "update-command" instead of "update_command" for toggle status to be accurate. Doing so causes "update-command" to get executed correctly.

Desktop (please complete the following information):

  • OS: Arch Linux - Rolling
  • Version: swaync 0.10.1-2
@Svra44 Svra44 added the bug Something isn't working label Jun 26, 2024
ErikReider added a commit that referenced this issue Jul 28, 2024
@ErikReider
Copy link
Owner

Nice catch, thanks! :)

rtgiskard pushed a commit to rtgiskard/SwayNotificationCenter that referenced this issue Aug 18, 2024
mochaaP pushed a commit to traidento/SwayNotificationCenter that referenced this issue Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants