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

Open
Svra44 opened this issue Jun 26, 2024 · 0 comments
Open

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

Svra44 opened this issue Jun 26, 2024 · 0 comments
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
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

1 participant