1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-10-02 06:59:09 +00:00
Commit Graph

2515 Commits

Author SHA1 Message Date
Travis Yaeger
024ce09c04 Remove side effects from if statements
The specific behavior was retained as far as the exact timings of 
the ++/--. Maybe it can get cleaned up more, but at least the 
if statement logic is more clear now.
2019-05-21 09:16:09 -04:00
Jan Senolt
2bfef11061 Fix incorrect Solaris CPU reporting (#838) 2019-05-17 20:17:34 -05:00
Lukáš Cezner
ba8b190459 Typing error removed 2019-04-26 16:35:17 -04:00
Lukáš Cezner
a2983ad794 Fix support for nested exec expressions 2019-04-26 16:35:17 -04:00
Jan Senolt
5c7f3b6666 synchronize access to kstat 2019-04-16 09:03:31 -04:00
Brenden Matthews
84ceeff23f Increase default number of net interfaces.
This should resolve the issue noted in #564.
2019-04-03 08:47:23 -04:00
Daniel Pielmeier
40ead046df Do not install libraries into subdirectories 2019-03-09 11:51:54 -05:00
Daniel Pielmeier
dbdc78fe5a Install libtcp-portmon. 2019-03-09 07:30:37 -05:00
Daniel Pielmeier
58d310808d Install libraries to the proper directories. 2019-03-09 07:30:37 -05:00
senjan
d295fe4393 idtype enum breaks Solaris conky 2019-03-08 08:17:55 -05:00
Kushagra Sinha
c352069b31 Add support for nested |exec| expressions
Nested exec expressions like ${execp echo '${execp echo hi}'} are not
evaluated correctly because parsing expressions like these generates and
registers new callbacks but we never wait for these callbacks to
complete before returning the result of the evaluation.

Fix this by re-evaluating expressions after running all pending
callbacks.
2019-03-03 13:24:23 -05:00
Kushagra Sinha
4cb79fb3e1 Revert "exec.cc: Cache the result to another variable and return it when we have a empty/invalid value. (#646)"
This reverts commit a644600bc5.
2019-03-03 13:24:23 -05:00
Monsterovich
fc250d8047 fix spaces 2019-02-25 17:11:14 -05:00
Monsterovich
3893146995 Added option to disable redraw on desktop change 2019-02-25 17:11:14 -05:00
Brenden Matthews
40a438be3e FreeBSD fixes, GitLab CI build improvements.
- use sccache for build caching
 - add coverage reports as build artifacts
 - add lcov-summary for coverage summary
 - clean up/refactor CI yaml

This resolves the FreeBSD part of #754.
2019-02-25 11:22:19 -05:00
Brenden Matthews
dc35a1b0a8 Add more build envs to GitLab CI.
Adding:

 - clang-8
 - gcc-5 through gcc-8
 - fedora & centos builds

Fixing:
 - mysqlclient default search path
 - build on centos6
2019-02-24 09:46:45 -05:00
Brenden Matthews
46abd3b75a Apply fixes from clang-tidy/format. 2019-02-23 17:13:19 -05:00
Brenden Matthews
90673cf161 Make GitLab build work with clang checks. 2019-02-23 17:13:19 -05:00
Qu Wenruo
14e3b80c45 conky: Allow hwmon command to accept hwmon device name
[PROBLEM]
Some hwmon device number may change due to module load sequence.
E.g:
One boot would cause the following layout:
hwmon0->acpitz
hwmon1->pch_skylake
hwmon2->thinkpad
hwmon3->coretemp
hwmon4->iwlwifi

While another boot could lead to:
hwmon0->acpitz
hwmon1->pch_skylake
hwmon2->coretemp
hwmon3->thinkpad
hwmon4->iwlwifi

[ENHANCEMENT]
This patch will enhance the hwmon command to accept hwmon device name as
first parameter instead of number.

Now "hwmon 3 temp 1" can be converted to "hwmon coretemp temp 1", which
is more readable and user won't ever need to bother the hwmon sequence
number change.

Signed-off-by: Qu Wenruo <wqu@suse.com>
2019-02-17 09:24:15 -05:00
Brenden Matthews
1fc2b17eb5 FreeBSD build fix. 2019-01-13 12:45:20 -05:00
Brenden Matthews
298eb76434 Include missing FreeBSD header. 2019-01-12 11:50:50 -05:00
Brenden Matthews
aa2de72541 Fix build with BUILD_BUILTIN_CONFIG=OFF. 2019-01-09 09:42:54 -05:00
Brenden Matthews
e834782ddb Build fix for x86 arch.
size_t is unsigned long on x86-64, but not x86.

This fixes #759.
2019-01-09 08:18:07 -05:00
Brenden Matthews
8feae589dc Install libconky_core, too, if wanted.
If someone decides to install the testing build, it doesn't include
libconky_core.

This fixes #756.
2019-01-08 20:02:53 -05:00
Brenden Matthews
6a7dc0cd65 Fix update_total_processes() missing return val. 2019-01-07 20:26:24 -05:00
Guido Falsi
21b4a0a403 These changes are required to make it build on FreeBSD i386 (x86/32)
Otherwise I get this error while building:

/wrkdirs/usr/ports/sysutils/conky/work/conky-1.11.1/src/core.cc:1503:50: error: assigning to 'void (*)(struct text_object *, char *, unsigned int)' from incompatible type 'void (*)(struct text_object *, char *, int)': type mismatch at 3rd parameter ('unsigned int' vs 'int')
  END OBJ(apm_adapter, 0) obj->callbacks.print = &print_apm_adapter;
                                                 ^~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/sysutils/conky/work/conky-1.11.1/src/core.cc:1504:55: error: assigning to 'void (*)(struct text_object *, char *, unsigned int)' from incompatible type 'void (*)(struct text_object *, char *, int)': type mismatch at 3rd parameter ('unsigned int' vs 'int')
  END OBJ(apm_battery_life, 0) obj->callbacks.print = &print_apm_battery_life;
                                                      ^~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/sysutils/conky/work/conky-1.11.1/src/core.cc:1505:55: error: assigning to 'void (*)(struct text_object *, char *, unsigned int)' from incompatible type 'void (*)(struct text_object *, char *, int)': type mismatch at 3rd parameter ('unsigned int' vs 'int')
  END OBJ(apm_battery_time, 0) obj->callbacks.print = &print_apm_battery_time;
                                                      ^~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
*** [src/CMakeFiles/conky.dir/core.cc.o] Error code 1
2019-01-07 19:38:04 -05:00
Guido Falsi
a3b03f2257 Add missing return statement.
It was removed in commit e91b91d.
2019-01-07 19:17:14 -05:00
lasers
7eec746b82 update copyright year to 2019 2019-01-05 11:15:36 -06:00
lasers
9dd559b1e9 remove deprecated BMPx support 2019-01-04 19:58:52 -06:00
Brenden Matthews
282160156f Remove deprecated EVE online support.
The EVE API that was in use is now deprecated and no longer works.

This resolves #732.
2019-01-03 10:42:49 -05:00
Brenden Matthews
edb7f84ecd Fix an FD leak in APCUPSD.
In some cases the socket FD may have not been closed in the APCUPSD
update function.

This fixes #725.
2018-12-31 09:27:33 -05:00
Brenden Matthews
6c09affaf7 Add some basic unit tests.
Introduced the Catch2 unit testing framework.
2018-12-24 02:02:01 -05:00
Brenden Matthews
d422aa47d2 Fix more sonar issues. 2018-12-23 15:39:05 -05:00
Brenden Matthews
3df87776d5 Fix more sonar issues. 2018-12-23 14:27:11 -05:00
Brenden Matthews
db471102bb Fix wtf file encoding. 2018-12-23 14:27:11 -05:00
Brenden Matthews
3c5fd4399a Fix some more sonar issues.
Run clang-7 build first so that sonar data gets reported earlier, enable nvidia
in travis builds.
2018-12-23 14:27:11 -05:00
Brenden Matthews
4ef597da92
Parallelize sonar execution. 2018-12-22 19:25:00 -05:00
Brenden Matthews
8e1d3cfdd3
Apply fixes from sonar. 2018-12-22 19:10:10 -05:00
Brenden Matthews
bc60fb2c2f
More build fixes. 2018-12-22 18:34:29 -05:00
Brenden Matthews
94a854cfa2
More build fixes. 2018-12-22 15:53:34 -05:00
Brenden Matthews
198cc9230a
More build fixes. 2018-12-22 15:43:40 -05:00
Brenden Matthews
d191a5fa5c
More build fixes. 2018-12-22 15:42:46 -05:00
Brenden Matthews
5e7b1764b2
Merge branch 'master' into fix-build-with-warnings-enabled 2018-12-22 13:32:51 -05:00
Brenden Matthews
41c32bb72f
More warning fixes. 2018-12-22 13:25:32 -05:00
Brenden Matthews
8ff1d9845d
Fix sonar issues. 2018-12-22 12:45:25 -05:00
Brenden Matthews
45b4c80ec2
Fix compiler warnings. 2018-12-20 21:20:43 -05:00
Brenden Matthews
bb8723dd36
Add toluapp subtree (#712)
* First commit!

* Import to git

* Droping down CMake requirement

* Corrected installation of libraries

* Adding travis build

* Updated cmake macros

* Fixed find package

* Updated travis hook

* Updated travis hook

* Patch to support Lua 5.3.

* Fix Lua header include directives in tolua++.h

Use angle bracket rather than double quotes when including Lua headers in the tolua++ header. This fixes a problem on systems that default to a Lua version newer than 5.1 and install the tolua++ header to the same directory as newer Lua headers.

As there are (usually) no Lua headers in the same directory when building tolua++ itself, the preprocessor will look to the include directories passed to the compiler, one of which would be the Lua 5.1 include directory, and tolua++ will build with those (correct) headers. Then the tolua++ header is usually installed in the default include directory, alongside the newer Lua headers, which you wouldn't expect to cause any trouble.

But it does cause trouble when trying to build other programs that include the tolua++ header, because now the preprocessor does find Lua headers in the same directory as the tolua++ header, which are the newer (incorrect) headers. Now the program will either fail to compile, because it doesn't support the newer headers, or fail to link with the tolua++ shared object because they were compiled against different Lua headers.

Using angle brackets instead of double quotes in the include directives will fix the problem, because then the preprocessor will look to the include directories passed to the compiler first.

See http://www.cegui.org.uk/forum/viewtopic.php?f=10&t=7195

* Remove email notifications.

* Update travis build.

* Build shared and static libs.

* Patch toluapp to support Lua 5.3.

With this change, support for Lua 5.1 is dropped.

This resolve #116.

* Add some comments to clarify the toluapp handling.

* Add minor sonar fix.
2018-12-20 15:18:51 -05:00
Brenden Matthews
3a3092902e
Get rid of silly if (not ... exp. (#713)
* Get rid of silly `if (not ...` exp.

* Apply code fixes from sonar.

* Build fix.

* Apply more fixes from sonar.

* Apply more fixes from sonar.

* Apply more fixes from sonar.
2018-12-20 10:22:08 -05:00
Brenden Matthews
2c816b1392
Build fix for older GCC versions. (#710)
Add some older OS versions to the build matrix to make sure we don't
inadvertantly break the build.

This resolves issue #708.
2018-12-19 11:11:24 -05:00
Brenden Matthews
616d3af655
Fix loading of Lua shared libs. (#707)
A previous change in 5b541b4 (to replace unsafe string functions with
safer equivalents) made a change which broke loading of shared libs.

The cause is a miscalculation of string length before executing a
strncpy(). The calculating did not account for the null character.

This resolves #705.
2018-12-17 11:21:12 -05:00