1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-30 22:19:09 +00:00
Commit Graph

64 Commits

Author SHA1 Message Date
Brenden Matthews
a301b24a8e Fix compile error. 2009-03-29 23:35:42 -06:00
Brenden Matthews
f05829ad9a Update copyright stuff, fix conky.conf weirdness. 2009-03-29 22:55:51 -06:00
Nikos Ntarmos
99a496b3ea Adding if_up support for FreeBSD.
Moved interface_up(...) from linux.{c.h} to common.{c,h} and taught it
to check for ENXIO as well to make it work on FreeBSD.

Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>
2009-03-29 01:25:57 +01:00
Phil Sutter
4161f90c6f rewrite linux diskio code
Instead of using a hardcoded maximum number of slots for
stats of different disks, use a linked list. Also since the algorithm to
update each device's counters is the same for updating the totals, share
equal code, which in my eyes not only saves a bunch of LoC, but also
drastically increases readability.
2009-02-22 02:57:11 +01:00
Phil Sutter
dd31cc77eb use a global struct moc_s
Since there is no choice of which moc player to get information from,
all moc objects' data source can be identical. Also hide some internal
data (the thread e.g.). Since from now on there can only be one moc
thread (not highlander ;), we don't need to treat the thread object
specially.

While here, fix indenting.
2008-12-22 19:36:24 +01:00
Phil Sutter
757983ab56 internal rewrite of mpd support
Handle mpd internal information inside mpd.c. Use a refcounter to check
if the mpd-information can be freed (maybe useless). Remove the now
useless "full" flag of free_text_objects.
2008-12-18 13:40:21 +01:00
Phil Sutter
9a85812e06 here comes the big header include rewrite
Some statics are now defined by configure.ac.in, conky.h got a lot
smaller, which I see as a positive sign.

This patch should not change any functionality, just change what's
defined where. Some features I did/could not test are probably broken,
also compiling for any other OS surely won't complete now. Though I
think fixing these problems is as easy as including some missing
headers.

I've done compile checks with the following configure options:
./configure --enable-eve --enable-rss --enable-smapi
	--enable-wlan --enable-debug --enable-testing

So what needs to be tested is:
- audacious
- BMPx
- xmms2
- nvidia
2008-12-15 23:12:33 +01:00
Phil Sutter
19a6e7c925 rewrite tcp-portmon hooks
Global variables belonging to tcp-portmon are now separated from
conky.c, cleaning up struct information and struct text_object a bit.
2008-12-11 15:28:21 +01:00
Phil Sutter
4b89c3b17d make semantics of custom strndup() comply with glibc
From strdup(3):
| If s is longer than n, only n characters are copied, and a
| terminating null byte ('\0') is added.

So allocate at most n+1 bytes and make sure the last one is zero, as
strncpy() doesn't add it itself.

So in fact to allow a maximum space for string dup of 23, strndup() has
to be called like this:
| dup = strndup(src, 23 - 1);

FIXME: Find the critical points in code this change touches and make
sure the invocation there is correct.
2008-12-11 15:28:21 +01:00
Brenden Matthews
dc3ed8df13 Removing old svn keywords. 2008-12-09 16:35:49 -07:00
Brenden Matthews
7de6c1d061 * Introduced (buggy) support for IMAP IDLE
* Added support for MOC (the console audio player) (thanks henux)
* Added scroll step patch (thanks asto)


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1252 7f574dfc-610e-0410-a909-a81674777703
2008-09-24 06:59:45 +00:00
Nikolas Garofil
312d3d6de8 Merge with conky1-extra, Changelog contains the changes
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1193 7f574dfc-610e-0410-a909-a81674777703
2008-06-21 20:37:58 +00:00
Kevin Lyles
bb80900ca6 Refactored format_seconds and format_seconds_short
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1165 7f574dfc-610e-0410-a909-a81674777703
2008-06-19 07:04:11 +00:00
Roman Bogorodskiy
00b26c0834 More or less working on FreeBSD now.
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1155 7f574dfc-610e-0410-a909-a81674777703
2008-06-15 07:08:52 +00:00
Kevin Lyles
610b0b628d Split conky.h into several smaller header files
In order to do this correctly:
	Removed duplicate includes
	Fixed mpd functions to accept mpd_s instead of information
	Freed mpd.h of any need to include conky.h (mpd.c still includes it for the constants)



git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1154 7f574dfc-610e-0410-a909-a81674777703
2008-06-14 18:41:12 +00:00
Brenden Matthews
4d7ecc7951 * Getting rid of goto usage throughout code.
* Fix bug due to usage of gethostbyname() in threads (which is not
	reentrant) by using gethostbyname_r() when available.
	* Added patch for battery_time problem on 2.6.24 (thanks wedge).
	* Added patch to fix broken xmms2 stuff (thanks sleipner).
	* Added patch to fix SIGHUP/SIGUSR1 segfault (thanks norsetto).
	* Added patch to improve $if_up (thanks Aseem).


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1103 7f574dfc-610e-0410-a909-a81674777703
2008-04-10 22:45:45 +00:00
Brenden Matthews
77f8e9bba7 define our own strndup() when its not available (thanks to Pippijn for the idea)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1101 7f574dfc-610e-0410-a909-a81674777703
2008-04-02 19:46:09 +00:00
Brenden Matthews
a6a4a4c548 * Replacing strdup() with strndup() throughout
(this is probably going to break a few things)

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1100 7f574dfc-610e-0410-a909-a81674777703
2008-04-02 18:44:49 +00:00
Brenden Matthews
be2cd44e6d doc cleanup
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1090 7f574dfc-610e-0410-a909-a81674777703
2008-03-31 04:56:39 +00:00
Phil
963bb6211c fix thread definitions
* we code against interfaces (void *f(void *))
* casting function pointers to object pointers
  is a no-no says gcc


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1065 7f574dfc-610e-0410-a909-a81674777703
2008-03-29 05:14:35 +00:00
Phil
fea715f038 declaring info in common.c is redundant
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1064 7f574dfc-610e-0410-a909-a81674777703
2008-03-29 04:55:41 +00:00
Phil
e306a2c2e8 some linting on function definitions
* instead of empty args "void" should always be specified.
  Using this, the compiler can detect incorrect function calls,
  like with update_stuff().
* No args seems to be interpreted as "unspecified args" by the
  compiler, as with update_mail_count(). So no checking for
  correctness of arguments when calling was done at all.
* This is not complete yet, as I still don't have any BSD for
  testing.


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1055 7f574dfc-610e-0410-a909-a81674777703
2008-03-29 02:01:03 +00:00
Phil
6a528f4e17 support displaying current nameservers
* gathers information from /etc/resolv.conf
* included (still commented) code to prevent reading too often,
  as I'm not sure whether reading from a real FS (not /proc or /sys)
  could generate higher load in some cases -> comments please!


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1035 7f574dfc-610e-0410-a909-a81674777703
2008-03-22 22:58:26 +00:00
Phil
8fd27c0026 make default gateway information accessible
* gw_iface prints the interface having a default gateway
* gw_ip prints the gatway's ip
* if_gw jumps if no default gateway exists
* when there are multiple gateways, gw_iface and gw_ip
  only print "multiple" when they are different (allows
  basic debugging of ones networking setup)


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1031 7f574dfc-610e-0410-a909-a81674777703
2008-03-22 19:06:09 +00:00
Brenden Matthews
a1452f5db4 * Applied 12 patches:
1) sysfs battery support (for Linux >=2.6.24) (thanks Kapil)
        2) Improved audacious support patch (thanks Miroslav)
        3) tp_smapi support patch for IBM laptops (thanks Phil)
        4) user info patch (thanks Roland)
        5) added conky build info patch (thanks Roland)
        6) added if_up patch (thanks Phil)
        7) added reload on SIGHUP patch (thanks Jonas)
        8) added pad percentages patch (thanks Jonas)
        9) added fs_type patch (thanks Ryan)
        10) added xmms2 fixes patch (thanks Lassi)
        11) fix sysfs crash patch (thanks Phil)
        12) multiple ip patch ($addrs)
    * Added more alignment support (top_middle, bottom_middle, middle_left,
    and middle_right).


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1010 7f574dfc-610e-0410-a909-a81674777703
2008-03-18 00:23:16 +00:00
Kevin Lyles
3d26a4880e Reformatted all code
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1007 7f574dfc-610e-0410-a909-a81674777703
2008-02-20 20:30:45 +00:00
Kevin Lyles
e7b786d79a Fixed round_to_int to handle negative numbers properly
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1000 7f574dfc-610e-0410-a909-a81674777703
2008-02-19 03:33:12 +00:00
Brenden Matthews
35b4ed3aff 2008-01-05
* Applied some more submitted patches:
        1) Add long forms of (most of) the command-line options.
        2) Added an option (top_cpu_separate) that emulates top's "separate
        cpus" option.  Processor usage is shown as a percentage of a
        single processor on your system, instead of a percentage
        of all processors combined.
        3) Adds a parameter (time) to top and top_mem that will show the
        cumulative CPU time of a process.
        4) Simplified integer rounding.
        5) Fixed the window width when a goto is used.
        6) Fixed the window width when an offset is used.
        (thanks Kevin Lyles).


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@994 7f574dfc-610e-0410-a909-a81674777703
2008-01-06 01:35:14 +00:00
Brenden Matthews
58c1eb36c3 Multiple mailbox patch (thanks Ben Kibbey)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@969 7f574dfc-610e-0410-a909-a81674777703
2007-10-02 23:57:41 +00:00
Philip Kovacs
62f8ff9be7 mpd_interval -> music_player_interval
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@957 7f574dfc-610e-0410-a909-a81674777703
2007-09-02 04:26:08 +00:00
Brenden Matthews
16ea4f6587 * Improved performance slightly
* Added mpd_interval config option to specify an update interval for the
    mpd thread

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@954 7f574dfc-610e-0410-a909-a81674777703
2007-09-02 03:02:33 +00:00
Philip Kovacs
38d2cdfc84 revert common.c
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@953 7f574dfc-610e-0410-a909-a81674777703
2007-09-02 02:25:01 +00:00
Philip Kovacs
cdbfb7dd53 timed thread code
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@952 7f574dfc-610e-0410-a909-a81674777703
2007-09-02 02:22:46 +00:00
Brenden Matthews
0ae51e37ee fix clearing issue with mpd
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@944 7f574dfc-610e-0410-a909-a81674777703
2007-08-31 23:45:41 +00:00
Philip Kovacs
6c052dae9b Fix timed thread race condition, seen esp. on new kernel scheduler (cfs).
Fix $audacious_title not being displayed when no length argument indicated.



git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@943 7f574dfc-610e-0410-a909-a81674777703
2007-08-31 21:35:30 +00:00
Brenden Matthews
12baf6c0b4 some small fixes for mpd stuff
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@935 7f574dfc-610e-0410-a909-a81674777703
2007-08-31 02:05:02 +00:00
Brenden Matthews
2fcd64d59e * Use timed_thread for mpd
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@934 7f574dfc-610e-0410-a909-a81674777703
2007-08-30 17:21:30 +00:00
Toni Spets
8370c19025 Remove deprecated linkstatus completely from conky source
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@909 7f574dfc-610e-0410-a909-a81674777703
2007-08-10 20:51:36 +00:00
Brenden Matthews
27b4c8550c clarifying licensing
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@904 7f574dfc-610e-0410-a909-a81674777703
2007-08-10 19:53:44 +00:00
Roman Bogorodskiy
cf49198176 Remove freebsd wifi stuff since the API seems to be
changed and I have no wifi devices to test it.


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@893 7f574dfc-610e-0410-a909-a81674777703
2007-08-06 16:42:48 +00:00
Philip Kovacs
4f7f4bf11e conky 1.4.6-svn trunk
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@836 7f574dfc-610e-0410-a909-a81674777703
2007-02-25 23:35:53 +00:00
Philip Kovacs
1c35f432e5 Conky 1.5.0 -- client/server prototype
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@818 7f574dfc-610e-0410-a909-a81674777703
2006-12-23 06:01:16 +00:00
Philip Kovacs
9a016c9377 added , , for crypto freaks
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@797 7f574dfc-610e-0410-a909-a81674777703
2006-11-30 20:46:34 +00:00
Philip Kovacs
15fd6d6586 removed all mldonkey and seti code -- totally broken
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@727 7f574dfc-610e-0410-a909-a81674777703
2006-11-05 00:23:18 +00:00
Philip Kovacs
03ebbf2cf4 remove infopipe support
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@718 7f574dfc-610e-0410-a909-a81674777703
2006-11-04 00:25:22 +00:00
Philip Kovacs
87953b122b removal of xmms/bmp / addition of audacious/infopipe
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@713 7f574dfc-610e-0410-a909-a81674777703
2006-11-03 20:54:52 +00:00
Brenden Matthews
e8c9f49594 xmms2 patch
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@612 7f574dfc-610e-0410-a909-a81674777703
2006-03-25 21:21:07 +00:00
Jasper
5b6d659400 sort includes and be more consitent with /* */
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@595 7f574dfc-610e-0410-a909-a81674777703
2006-03-16 16:20:30 +00:00
Philip Kovacs
896a5ce701 xmms work continued
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@488 7f574dfc-610e-0410-a909-a81674777703
2006-01-08 14:51:47 +00:00
Philip Kovacs
6d24365953 xmms/bmp/audacious/infopipe reorgamization
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@487 7f574dfc-610e-0410-a909-a81674777703
2006-01-08 08:02:37 +00:00