aboutsummaryrefslogtreecommitdiff
path: root/reload.c
diff options
context:
space:
mode:
authorDavid <dbphillipsnz@gmail.com>2014-06-05 17:49:36 +1200
committerDavid <dbphillipsnz@gmail.com>2014-06-06 20:31:40 +1200
commit2244ff66ff8dfe5352c5ab850a99d06648a14a6b (patch)
tree002ef198ce274045172344c1e58b86900967abb8 /reload.c
parentef004666027cd8fc3854ced9f126ae3ab0ce28f9 (diff)
downloadparamano-2244ff66ff8dfe5352c5ab850a99d06648a14a6b.tar.xz
Clean-ups
Diffstat (limited to 'reload.c')
-rw-r--r--reload.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/reload.c b/reload.c
index 1288fe4..6d31586 100644
--- a/reload.c
+++ b/reload.c
@@ -24,17 +24,22 @@
#include "common.h"
#include <stdio.h>
+
+/***********************************************************************
+ * Catches the USR1 sig. Reloads the configuration files and applies any
+ * new changes/config etc
+ ************************************************************************/
void reload_config()
{
debug("Reloading config\n");
+
+ // Reload config
config_init();
- if (_DEFAULT_SHOW_BATTERY)
- {
- //bat_tray_hide();
- bat_tray_show();
- } else {
- bat_tray_hide();
- }
+
+ // Hide battery icon if told to
+ _DEFAULT_SHOW_BATTERY? bat_tray_show() : bat_tray_hide();
+
+ // Update governor and frequency defaults
debug("Re-init freq tray\n");
tray_set_defaults();
}