aboutsummaryrefslogtreecommitdiff
path: root/src/zenmonitor.c
diff options
context:
space:
mode:
authorOndrej Čerman2020-01-23 22:47:52 +0100
committerOndrej Čerman2020-01-23 22:47:52 +0100
commita82a28c135afb11470a383ba55278dc48e37ed4e (patch)
tree9ec241fe144b3060d897d8db0933d32a5cc0d823 /src/zenmonitor.c
parentf04d8e4dc6404151882c57ad4721dad9db2768cb (diff)
Core index is now displayed by default, added command line argument "--core_id" to display core_id insteadv1.3
Fixed dates in LICENSE file Version 1.3
Diffstat (limited to 'src/zenmonitor.c')
-rw-r--r--src/zenmonitor.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/zenmonitor.c b/src/zenmonitor.c
index dbc2eec..09495c0 100644
--- a/src/zenmonitor.c
+++ b/src/zenmonitor.c
@@ -114,8 +114,26 @@ void sensor_init_free(SensorInit *s) {
}
}
+gboolean display_coreid = 0;
+
+static GOptionEntry options[] =
+{
+ { "coreid", 'c', 0, G_OPTION_ARG_NONE, &display_coreid, "Display core_id instead of core index", NULL },
+ { NULL }
+};
+
int main (int argc, char *argv[])
{
- gtk_init(&argc, &argv);
+ GError *error = NULL;
+ GOptionContext *context;
+
+ context = g_option_context_new ("- Zenmonitor display options");
+ g_option_context_add_main_entries(context, options, NULL);
+ g_option_context_add_group(context, gtk_get_option_group (TRUE));
+ if (!g_option_context_parse(context, &argc, &argv, &error)) {
+ g_print ("option parsing failed: %s\n", error->message);
+ exit (1);
+ }
+
start_gui(sensor_sources);
}