1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 21:49:07 +00:00
Commit Graph

2497 Commits

Author SHA1 Message Date
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
lasers
7cec37e009 conky.cc: fix short_units = False 2018-12-16 11:16:51 -06:00
lasers
dfdd573043 Revert "conky.cc: Fix for https://github.com/brndnmtthws/conky/issues/352 (#540)"
This reverts commit fa5e56720f.
2018-12-16 11:16:51 -06:00
npyl
e71a2ff448
Update conky.cc (#701)
In favor of #699
2018-12-15 17:29:40 +02:00
Brenden Matthews
a0d4393826
Fix nvidia crash (resolves #520). (#698)
* Fix XShape handling.
 * Fix crash when XDamage is disabled.
 * Make sure the nvidia COOLER target is available before trying to pull
 attribute values.
 * Check the nvidia extension is actually available.
 * Check that the display is valid.
2018-12-09 20:14:08 -05:00
lasers
8599c4b264 nvidia.cc: add nvidia patch (#697) 2018-12-09 16:16:46 +02:00
Brenden Matthews
4d098b0536
Fix for #691, nullptr deref & race condition. (#692)
* Fix race condition in gw_info handling.
 * Fix a couple potential nullptr derefs.
 * Fix font handling without x.
 * Fix regression in output to ncurses with X disabled.
 * Apply some formatting/code smell fixes.
2018-12-08 17:45:17 -05:00
Brenden Matthews
3d9c022245
Update Travis OS images. (#694) 2018-12-08 16:50:00 -05:00
Brenden Matthews
bc0ec94c10
Fix execi scanning segfault due to bad free. (#693)
This should resolve #690.
2018-12-05 16:21:04 -05:00
Guido Falsi
71a60672a8 When compiling with gcc the file /usr/include/machine/md_var.h is included. This header defines a function "void cpu_setup(u_int)" which clashes with the "static short cpu_setup" variable in src/freebsd.cc. (#686)
The patch renames this variable.

Reported by: Piotr Kubaj <pkubaj at anongoth.pl>
Ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233616
2018-12-02 11:29:56 -05:00
Dan McCombs
c1ef8c5cd4 Add config option to disable blending (#682)
* Add config option to disable blending

This is intended to work around issues with some images blending incorrectly with ARGB visuals.

* Fix order of config documentation.

* Update configuration variable name to simply "draw_blended".

* Fix for SonarCloud malloc warning.

* Update free to delete as part of malloc change.
2018-12-02 11:29:33 -05:00
livanh
8d149471b5 Fix goto in ncurses mode when compiled without BUILD_X11 (#680)
* Fix goto in ncurses mode when compiled without BUILD_X11

* Fix some issues raised by SonarCloud

* Define delete_block_and_zero() function and use it to replace some malloc calls
2018-12-02 11:28:28 -05:00
lasers
f8ff46c2dc add memwithbuffersgraph variable (#671) 2018-10-21 15:52:15 +03:00
Amish Naidu
9b4fc81553 fontN - Predefine font configuration analgous to colorN (#667)
* Add fontN config and text variables

fontN, N in {0..9} allows setting a fontN variable to some font settings
which can later be recalled in text, like colorN.

* Add documentation for fontN

* Add syntax-highlighting config for fontN
2018-10-12 20:43:48 +03:00
lasers
1e2a29654f Wifi (#660)
* Work for #17 : Now we have ssid

* Since we are using Objective-C++ NSStrings, we need to link to Foundation.framework, too!

* If interface is UP use the interface SSID; otherwise "off/any" following the Linux implementation.
Add more

* More

* cleanup
2018-10-11 08:45:43 -04:00
lasers
a845a403be doc/variables.xml: add undocumented lock keys 2018-09-04 11:08:26 -05:00
lasers
c0d5b6854e conky.cc: quit on SIGHUP 2018-09-04 10:56:03 -05:00
su8
07681e184b Add new variable sysctlbyname for FreeBSD 2018-09-04 10:44:30 -05:00
su8
a644600bc5
exec.cc: Cache the result to another variable and return it when we have a empty/invalid value. (#646) 2018-09-01 16:15:33 +02:00