diff --git a/src/controlCenter/widgets/shared/toggleButton.vala b/src/controlCenter/widgets/shared/toggleButton.vala index dd2cd228..a7811aee 100644 --- a/src/controlCenter/widgets/shared/toggleButton.vala +++ b/src/controlCenter/widgets/shared/toggleButton.vala @@ -14,8 +14,10 @@ namespace SwayNotificationCenter.Widgets { this.toggled.connect (on_toggle); } - private void on_toggle (Gtk.ToggleButton tb) { - BaseWidget.execute_command (command); + private async void on_toggle () { + string msg = ""; + string[] env_additions = { "SWAYNC_TOGGLE_STATE="+this.active.to_string () }; + yield Functions.execute_command (this.command, env_additions, out msg); } } }