Skip to content

Commit

Permalink
Add env variable for toggle button
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisPetschenka committed Oct 10, 2023
1 parent 7b8ae81 commit fdc951e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/controlCenter/widgets/shared/toggleButton.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit fdc951e

Please sign in to comment.