mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-19 11:35:12 +00:00
Format code using 'make clang-format'
This commit is contained in:
parent
183b45c7ea
commit
f11eb219ad
11
src/core.cc
11
src/core.cc
@ -660,12 +660,8 @@ struct text_object *construct_text_object(char *s, const char *arg, long line,
|
||||
EQUAL) {
|
||||
obj->data.i = PB_BATT_STATUS;
|
||||
}
|
||||
else if (strcmp(arg, "percent") == EQUAL) {
|
||||
obj->data.i = PB_BATT_PERCENT;
|
||||
}
|
||||
else if (strcmp(arg, "time") == EQUAL) {
|
||||
obj->data.i = PB_BATT_TIME;
|
||||
}
|
||||
else if (strcmp(arg, "percent") == EQUAL) { obj->data.i = PB_BATT_PERCENT; }
|
||||
else if (strcmp(arg, "time") == EQUAL) { obj->data.i = PB_BATT_TIME; }
|
||||
else {
|
||||
NORM_ERR("pb_battery: illegal argument '%s', defaulting to status", arg);
|
||||
obj->data.i = PB_BATT_STATUS;
|
||||
@ -2013,7 +2009,8 @@ struct text_object *construct_text_object(char *s, const char *arg, long line,
|
||||
END OBJ(pa_card_name, 0) obj->callbacks.print = &print_puau_card_name;
|
||||
obj->callbacks.free = &free_pulseaudio;
|
||||
init_pulseaudio(obj);
|
||||
END OBJ_IF(if_pa_source_running, 0) obj->callbacks.iftest = &puau_source_running;
|
||||
END OBJ_IF(if_pa_source_running, 0) obj->callbacks.iftest =
|
||||
&puau_source_running;
|
||||
obj->callbacks.free = &free_pulseaudio;
|
||||
init_pulseaudio(obj);
|
||||
END OBJ_IF(if_pa_source_muted, 0) obj->callbacks.iftest = &puau_source_muted;
|
||||
|
@ -40,20 +40,21 @@
|
||||
|
||||
struct pulseaudio_default_results get_result_copy();
|
||||
|
||||
const struct pulseaudio_default_results pulseaudio_result0 = {std::string(),
|
||||
std::string(),
|
||||
std::string(),
|
||||
std::string(),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
std::string(),
|
||||
PA_SOURCE_SUSPENDED,
|
||||
0,
|
||||
std::string(),
|
||||
std::string(),
|
||||
0};
|
||||
const struct pulseaudio_default_results pulseaudio_result0 = {
|
||||
std::string(),
|
||||
std::string(),
|
||||
std::string(),
|
||||
std::string(),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
std::string(),
|
||||
PA_SOURCE_SUSPENDED,
|
||||
0,
|
||||
std::string(),
|
||||
std::string(),
|
||||
0};
|
||||
pulseaudio_c *pulseaudio = nullptr;
|
||||
|
||||
void pa_sink_info_callback(pa_context *c, const pa_sink_info *i, int eol,
|
||||
@ -80,9 +81,8 @@ void pa_sink_info_callback(pa_context *c, const pa_sink_info *i, int eol,
|
||||
++eol;
|
||||
}
|
||||
|
||||
|
||||
void pa_source_info_callback(pa_context *c, const pa_source_info *i, int eol,
|
||||
void *data) {
|
||||
void *data) {
|
||||
if (i != nullptr && data) {
|
||||
struct pulseaudio_default_results *pdr =
|
||||
(struct pulseaudio_default_results *)data;
|
||||
@ -186,9 +186,10 @@ void subscribe_cb(pa_context *c, pa_subscription_event_type_t t, uint32_t index,
|
||||
case PA_SUBSCRIPTION_EVENT_SOURCE: {
|
||||
if (res->source_name.empty()) return;
|
||||
pa_operation *op;
|
||||
PULSEAUDIO_OP(pa_context_get_source_info_by_name(
|
||||
c, res->source_name.c_str(), pa_source_info_callback, res),
|
||||
"pa_context_get_source_info_by_name failed");
|
||||
PULSEAUDIO_OP(
|
||||
pa_context_get_source_info_by_name(c, res->source_name.c_str(),
|
||||
pa_source_info_callback, res),
|
||||
"pa_context_get_source_info_by_name failed");
|
||||
} break;
|
||||
|
||||
case PA_SUBSCRIPTION_EVENT_CARD:
|
||||
|
@ -99,9 +99,7 @@ static void unhash_all_processes() {
|
||||
}
|
||||
}
|
||||
|
||||
struct process *get_first_process() {
|
||||
return first_process;
|
||||
}
|
||||
struct process *get_first_process() { return first_process; }
|
||||
|
||||
void free_all_processes() {
|
||||
struct process *next = nullptr, *pr = first_process;
|
||||
|
Loading…
Reference in New Issue
Block a user