milis/talimatname/genel/t/tint2/add-power-now-support.patch

20 lines
704 B
Diff
Raw Normal View History

2018-06-09 00:06:58 +02:00
diff -rup ../tint2-0.11.orig/src/battery/battery.c ./src/battery/battery.c
--- ../tint2-0.11.orig/src/battery/battery.c 2010-12-02 23:56:11.313403140 +0100
+++ ./src/battery/battery.c 2010-12-02 23:57:22.266956142 +0100
@@ -184,8 +184,14 @@ void init_battery()
}
g_free(path2);
}
- if (path_energy_now && path_energy_full) {
+
+ path_current_now = g_build_filename(battery_dir, "power_now", NULL);
+ if (!g_file_test (path_current_now, G_FILE_TEST_EXISTS)) {
+ g_free(path_current_now);
path_current_now = g_build_filename(battery_dir, "current_now", NULL);
+ }
+
+ if (path_energy_now && path_energy_full) {
path_status = g_build_filename(battery_dir, "status", NULL);
// check file