You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Use the "config.json" as provided in repo or package
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
The text was updated successfully, but these errors were encountered:
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:
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):
The text was updated successfully, but these errors were encountered: