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

3337 Commits

Author SHA1 Message Date
su8
0edc80bf9b
Arguments to character-handling functions must be representable as an unsigned char 2018-08-14 12:07:16 +00:00
lasers
bbaa0e9ac8 exec.cc: Free malloced pointer after use in scan_exec_arg() (#607) 2018-08-13 14:55:31 -04:00
lasers
fcbc5c8ba2
linux.cc,net_stat.cc: use ${iface X} inside upspeed/f downspeed/f (#608)
* linux.cc,net_stat.cc: use ${iface X} inside upspeed/f downspeed/f

* net_stat.cc: Avoid dereferecing null pointer in parse_net_stat_arg()
2018-08-13 13:40:30 -05:00
lasers
e4e6a4ff60 extras/convert.lua: run dos2unix too if it is available (#604) 2018-08-13 08:20:52 -04:00
lasers
eb31df1bef core.cc,linux.cc: add ${iface} (#603)
* core.cc,linux.cc: add ${iface}

* doc/variables.xml: add ${iface}

* Remove code smells

* linux.cc: Add for loop to iterate interfaces

* Index all NICs

* linux.cc: Allow+Remove NIC exclusion

* linux.cc: Remove code smells

* fix code smell

* switch skip by strcmpreturn
2018-08-13 08:09:24 -04:00
Nikolas Garofil
6c590590a3
Delete broken weathervars before rewrite (#595)
* Kill non-functioning XOAP

* Change weathercode to TODO
2018-08-12 03:51:21 +02:00
lasers
9f7493c81f linux.cc: Fix cpu usage bug (#600) 2018-08-11 18:18:51 -04:00
Brenden Matthews
87187ff626
Bump version for next release. (#599) 2018-08-10 11:10:42 -04:00
lasers
6a23cab853
diskio.cc: Allow 'partuuid' label usage (#598)
* diskio.cc: Allow 'partuuid' label usage

* diskio.cc: Merge the if block to strncmp()
2018-08-10 09:47:19 -05:00
su8
3d5e152a8b exec.cc: Calculate the command length once and compare it, check only the first char once 2018-08-09 11:17:23 -04:00
su8
e242fea685 exec.cc: Move the escaping code into standalone function 2018-08-09 11:17:23 -04:00
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