1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 17:47:09 +00:00
Commit Graph

3276 Commits

Author SHA1 Message Date
su8
08f7cd6732 exec.cc: Make sure to test the first char only 2018-08-09 11:17:23 -04:00
su8
260554883a exec.cc: Add some overflow checks 2018-08-09 11:17:23 -04:00
su8
e229f1a398 exec.cc: permit wrapping commands in quotes 2018-08-09 11:17:23 -04:00
lasers
faf9b6b9ed
apcupsd.cc: remove trailing whitespace (#594) 2018-08-09 08:09:34 -05:00
Brenden Matthews
3720e96ca5 Get rid of extra ;. 2018-08-08 15:54:47 -04:00
Brenden Matthews
7220ef4c80 More code smell fixes. 2018-08-08 15:54:47 -04:00
Brenden Matthews
8a4b707a7c Switch from macros to functions. 2018-08-08 15:54:47 -04:00
Brenden Matthews
693ad0bafc Unwrap audacious C macros. 2018-08-08 15:54:47 -04:00
Nikolas Garofil
37a85ad8b0 Workaround for 2 sonarcloud complaints 2018-08-08 15:54:47 -04:00
Nikolas Garofil
38959715e5 Fix all gcc -Wall warnings 2018-08-08 15:54:47 -04:00
Nikolas Garofil
31a4954679 Fix sonarcloud complaints about minus unsigned 2018-08-08 15:54:47 -04:00
Nikolas Garofil
d1d99bc1da Fix name of github link, remove extra sourceforge link 2018-08-08 15:54:47 -04:00
Nikolas Garofil
95684a4fe4 Complete 'Use unsigned int for p_max_size in obj_cb.print' even more 2018-08-08 15:54:47 -04:00
Nikolas Garofil
34848ef0b1 Complete 'Use unsigned int for p_max_size in obj_cb.print' 2018-08-08 15:54:47 -04:00
Nikolas Garofil
18c18277ed Fix github redirect to direct link 2018-08-08 15:54:47 -04:00
Nikolas Garofil
fb5ce3e626 Fix Sonarcloud complaints 2018-08-08 15:54:47 -04:00
Nikolas Garofil
5dd23796a6 Use unsigned int for p_max_size in obj_cb.print 2018-08-08 15:54:47 -04:00
Nikolas Garofil
29c9d9960b Remove dead link, rewrite other link to avoid unicode warning 2018-08-08 15:54:47 -04:00
lasers
2eaba52e69
x11.cc: enable the error handlers by default (#588) 2018-08-08 04:28:35 -05:00
Nikolas Garofil
bd0f287794
Fix codeduplication to keep codefactor happy (#583)
* Use uniform print_pid_Xid to fix code duplication

* fix codesmell: no default in switch

* fix missing break after default

* fix missing in print_pid_Xid and replace if's by switch
2018-08-07 22:11:28 +02:00
lasers
f54ea8fac0
README.md: fix broken/non-secure links, update content (#586) 2018-08-07 14:58:41 -05:00
su8
0b71e49723 Fix for https://github.com/brndnmtthws/conky/issues/20#issuecomment-411164643 (#584) 2018-08-07 15:33:11 -04:00
Brenden Matthews
58e465692f
Fix for https://github.com/brndnmtthws/conky/issues/20#issuecomment-411164643 (#585) 2018-08-07 15:32:17 -04:00
lasers
ee98af50c6
doc/config_settings.xml: fix console's default bar value (#582)
* doc/config_settings.xml: strip trailing whitespace

* doc/config_settings.xml: fix console's default bar value
2018-08-07 11:43:22 -05:00
Brenden Matthews
c9d03fbaa1
Su8 master (#581)
* common.cc,diskio.cc: Display units in "SI" as per https://github.com/brndnmtthws/conky/issues/86 request

* Make the mem* and swap* variables to accept additional argument to print the usage in SI units

* common.cc: Fix indentation

* core.cc: Make the strndup() function call as manifest constant

* Add two more formal parameters to "human_readable()"

* diskio.cc: Restore the multiply of 1024LL

* Move the base multiplying into standalone function

* Use the "apply_base_multiplier()" function where necessary
2018-08-07 12:09:34 -04:00
Brenden Matthews
8aa9c819f3
Conky for mac os master (#579)
* Try to amend #31

* BUILD_WLAN should be available for all OS.

Keep BUILD_WLAN OFF by default for compatibility reasons.

* WLAN-related variables should be available for every OS.

There are some problems (probably null-dereference)

* Fix $wireless_essid crashing conky if no argument provided.

Conky wasn't parsing the argument of the variable as it should, thus wasn't allocating the `dev` member variable.

Also fix some documentation stuff.

* Improve `get_freq` #20

Using the Intel® Power Gadget API (https://software.intel.com/en-us/blogs/2012/12/13/using-the-intel-power-gadget-api-on-mac-os-x) we can now get actual Core frequency and not the constant factory one.

Though, for some weird reason the API gives the same freq for all Cores, thus the |cpu| arg becomes useless.

* Oops, this accidently slipped in

* Introduce BUILD_IPGFREQ build option

This build option has been introduced for one particular reason:

On macOS getting current core-frequency is not supported by the APIs.  A solution is to install Intel's ® Power Gadget which comes with an .app, a Framework and a kernel-extension.  Though, this may trouble some alot, thus introduce BUILD_IPGFREQ.

* Forgot static here.

* Some improvements for get_freq again.

Fix frequency not printing correctly (I wasn't using the divisor)
Add more guards.

* Setup cmake files and project code for Objective-C code #17

We want to use CoreWLAN framework.

* update_cpu_usage() now supports multiple cores

Also, some cleanup.

* Updated default conky config to monitor Mac Networking

* Made Mac Friendly BuildOptions and generic default conky configs

* Undid Xdamage config and cleaned up previous IF statements

* Re-Added XDamage fix

* Finish up the algorithm. I think its now correct. Closes: #33

* Cleanup macro and introduce a no-op free_cpu() function for ALL cpu-related variables

free_cpu() must be implemented for every OS and on all except macOS its a no-op function.

* Reformat, add empty comment.
2018-08-07 11:54:01 -04:00
Brenden Matthews
b17f2c2ca9
Update README.md 2018-08-07 11:04:06 -04:00
Brenden Matthews
a86d3bd448
Update README.md 2018-08-07 11:02:33 -04:00
Brenden Matthews
954016c332
Update README.md 2018-08-07 11:00:35 -04:00
Nikolas Garofil
4d5db325d9 Fix problems found when fixing docker (#575)
* Require at least glib-2.36 (from 03/2013) to remove deprecated g_type_init()

* Fix empty continuation line in Dockerfile

* Require at least libmicrohttpd 0.9.25 (from 09/2012) to replace deprecated MHD_create_response_from_data()

* fix versioncheck libmicrohttpd

* Missing char for null-terminator in print_v6addrs()

* safe_asprintf to fix /proc/subdir bufferoverflows

There is no max length of /proc/subdir, increasing the value of /proc/sys/kernel/pid_max is one way this can happen

* Fix conversion constant c++ string to variable char array

* Fix strncpy using unrelated MPD_BUFFER_MAX_LENGTH

* Use strncpy instead of strcpy in eve.cc

* Use strncpy instead of strcpy in libmpdclient.cc

* move safe_asprintf back and use ostreams in proc.cc to make sonarcloud happy
2018-08-07 09:38:36 -04:00
Brenden Matthews
a78a750dad
Build fix for macOS. (#574) 2018-08-06 18:09:20 -04:00
Brenden Matthews
0a9a46dd70
upspeed/f downspeed/f: Be able to use ${gw_iface} as argument (#573) 2018-08-06 17:48:29 -04:00
su8
bd98860640 upspeed/f downspeed/f: Be able to use ${gw_iface} as argument (#571) 2018-08-06 17:48:07 -04:00
Brenden Matthews
fd4ab7fc07
journal.cc: Add more overflow checks (#570) 2018-08-06 11:32:04 -04:00
lasers
58d70d2c25 doc/variables.xml: make weather changes (#567)
* doc/variables.xml: strip trailing whitespace

* doc/variables.xml: change weather URI
2018-08-06 10:00:39 -04:00
Brenden Matthews
2b3fb682aa
Merge branch 'master' into master 2018-08-06 09:03:05 -04:00
su8
25eac4c0e5 top.cc: Dont crash on null, and fix for https://github.com/brndnmtthws/conky/issues/220 2018-08-06 10:42:08 +02:00
su8
e29ebfa29f Remove code smells 2018-08-06 09:41:02 +02:00
Vallimar
86acbc56e6 Fixes compile issue with builtin config. (#563)
* Fixes compile issue with builtin config.

* Fix copy-paste mistake.
2018-08-05 08:59:57 -04:00
Brenden Matthews
c771698d5a Vallimar master (#566)
* Fixes compile issue with builtin config.

* Fix copy-paste mistake.
2018-08-05 07:40:22 -05:00
su8
2a24fe36db Remove code smells 2018-08-04 23:11:21 +02:00
su8
4a1cf45795 re-apply intra-aus batteries patch 2018-08-04 22:35:04 +02:00
su8
4155ac253b Add new text objects to retrieve the currently used keyboard layout and mouse speed in percentage and generate random password of chosen length and get the cpu clock speed from assembly 2018-08-04 22:26:40 +02:00
Brenden Matthews
1d5c5238b2
conky.cc: apply intra-au's batteries patch (#558)
* conky.cc: apply intra-au's batteries patch

* Build fix: explicitly include <vector>.
2018-08-04 15:11:22 -04:00
Brenden Matthews
a3b7905df6
Add new text objects to retrieve the currently used keyboard layout and mouse speed in percentage and generate random password of chosen length and get the cpu clock speed from assembly (#550)
* Add new text object to capitalize the first character of each word

* Fix for issue https://github.com/brndnmtthws/conky/issues/46

* Fix for issue https://github.com/brndnmtthws/conky/issues/35

* Fix for issue https://github.com/brndnmtthws/conky/issues/35

* Fix for https://github.com/brndnmtthws/conky/issues/206

* Fix for https://github.com/brndnmtthws/conky/issues/474

* Add new "temp2" variable to print the temperature in floating number

* Make the "temp2" variable static and add some explanation above it

* openbsd.cc: Add one more formal parameter to "temp_print()"

* extras/convert.lua: change url to wiki page (#554)
2018-08-04 15:01:28 -04:00
lasers
cb5833e2fc
extras/convert.lua: change url to wiki page (#554) 2018-08-03 17:28:42 -05:00
Brenden Matthews
fb70a9022d
Fix segfault with no update, debug logging. (#551)
* Fix segfault caused by initiliazed deref.

This fixes #117.

* Revert debug logging changes from a9e968956d.

* Replace not with !.
2018-08-03 12:22:11 -04:00
su8
7bca0ca881 Fix issues #439, #303 (#545)
* Fix issues https://github.com/brndnmtthws/conky/issues/439 , https://github.com/brndnmtthws/conky/issues/303

* core.cc: Add missing header file

* core.cc: Check if we build for x11 and add the locks functions

* read_tcpip.cc: Fix for https://github.com/brndnmtthws/conky/issues/306

* read_tcpip.cc: Missing string format specifier for "snprintf()"

* read_tcpip.cc: Wrong signed int format specifier for "snprintf()"

* Missing many string format specifiers to "snprintf()"
2018-08-02 11:15:16 -04:00
Brenden Matthews
71cfbff645
Fix sleep calculation for >1s sleeps. (#543)
The second portion of the time was being discarded, with only the nanos being
respected. This should fix #539.
2018-08-02 11:05:47 -04:00
su8
fa5e56720f conky.cc: Fix for https://github.com/brndnmtthws/conky/issues/352 (#540) 2018-07-30 08:57:42 -04:00