mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-23 11:53:02 +00:00
pass volume as an integer to scripts
This commit is contained in:
parent
673259897d
commit
bc4de68167
1 changed files with 1 additions and 1 deletions
|
@ -737,7 +737,7 @@ void bar_manager_handle_volume_change(struct bar_manager* bar_manager, float vol
|
||||||
struct env_vars env_vars;
|
struct env_vars env_vars;
|
||||||
env_vars_init(&env_vars);
|
env_vars_init(&env_vars);
|
||||||
char volume_str[16];
|
char volume_str[16];
|
||||||
snprintf(volume_str, 16, "%.2f", volume);
|
snprintf(volume_str, 16, "%d", (int)(volume*100. + 0.5));
|
||||||
env_vars_set(&env_vars, string_copy("INFO"), string_copy(volume_str));
|
env_vars_set(&env_vars, string_copy("INFO"), string_copy(volume_str));
|
||||||
bar_manager_custom_events_trigger(bar_manager,
|
bar_manager_custom_events_trigger(bar_manager,
|
||||||
COMMAND_SUBSCRIBE_VOLUME_CHANGE,
|
COMMAND_SUBSCRIBE_VOLUME_CHANGE,
|
||||||
|
|
Loading…
Reference in a new issue