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

137 Commits

Author SHA1 Message Date
Pavel Labath
54630eb39e Header housekeeping: remove unneeded extern "C", add modelines, add inclusion guards
hopefully, this doesn't break anything
2010-02-25 21:50:50 +01:00
Nikolas Garofil
aea8d3ed52 Combine print_texeci and print_execi as much as possible 2010-02-10 21:23:21 +01:00
Nikolas Garofil
456142241c Combine print_execi and print_execpi as much as possible 2010-02-10 15:02:00 +01:00
Brenden Matthews
cf9e498b24 Update copyright notices. 2010-01-01 15:46:17 -08:00
Phil Sutter
8045e7f714 drop enum text_object_type and all references to it's members
After some minor rewrite of the top parser (which was in fact the only
real user of the obj->type field left since introduction of text object
callbacks), there is no need for the obj->type field anymore.
2009-12-12 15:56:00 +01:00
Brenden Matthews
b6331b4eb6 Switch some more bits to C++, more CMake changes. 2009-12-09 20:05:32 -08:00
Phil Sutter
e5d32f4ad0 convert meter type object values from uint8_t to double 2009-12-04 22:17:40 +01:00
Phil Sutter
92ae6fab8a replace substitute_newlines() object typecheck with object field
This is the more generic way, although I doubt this is really error
preventing. To me, it's not totally clear as to when
substitute_newlines() is forbidden and when not. Maybe someone (the
author?) can shed light on the internal algorithm of this feature.
2009-12-01 00:32:33 +01:00
Phil Sutter
c9f1c318aa convert OBJ_text to callbacks
This is tricky: there is no such thing as $text. In fact, everything
below TEXT in the conkyrc which is NOT a text object will become one of
type OBJ_text.

To make life easy, introduce a function obj_be_plain_text() converting a
given object to the given plain text.
2009-12-01 00:32:33 +01:00
Phil Sutter
37cbdcf89b convert $endif to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
718ed9d280 convert $else to callbacks.iftest 2009-12-01 00:32:32 +01:00
Phil Sutter
697e64272e text_object: provide generic object free routine
This is a valid replacement to a custom routine for objects using data.s
or data.opaque to point to dynamically allocated data.
2009-11-29 21:40:48 +01:00
Phil Sutter
7b05bdd665 text_object: introduce text_object_callbacks
The callback functions are:
print - to be called from generate_text_internal()
iftest - same as print for ifblock objects (triggers jumping)
barval - same as above for bar objects (returns current bar value)
gaugeval - same as above for gauge objects
graphval - same as above for graph objects
percentage - for percentage objects, returns actual percentage
free  - called in free_text_objects()

Until conversion is complete, if the function pointer is NULL the old
lookup by type is being done.

Note that it's possible to assign both 'print' and 'iftest' callbacks.
In this case, the code simply ignores the 'iftest' callback, though this
could easily be changed (always calling DO_JUMP at last, of course) in
order to allow ifblock objects to print something in addition to jumping
somewhere (or not).
2009-11-29 21:33:30 +01:00
Nikolas Garofil
6ee76e5c55 Fix compiling with --disable-x11 2009-11-22 14:05:11 +01:00
Nikolas Garofil
fe1d7da3d5 Add support for $pid_read and $pid_write 2009-11-19 12:32:14 +01:00
Nikolas Garofil
0215298c27 Added support for $format_time 2009-11-18 15:35:35 +01:00
Phil Sutter
70e5afe5ac ifblock: fix clash with specials when freeing objects
Murphy hit me again: in my naive attempt to fix the clash between
ifblocks and objects parsing text objects due to the double use of the
'sub' field, I overlooked this problem with reusing the 'special_data'
field. So here comes the real thing (TM), donating ifblocks their own
field for pointing to the jump target.
2009-11-16 19:52:12 +01:00
Nikolas Garofil
7b05f78de8 Added support for $pid_time_usermode, $pid_time_kernelmode and $pid_time 2009-11-16 15:30:57 +01:00
Nikolas Garofil
015d275098 Add support for $pid_nice and $pid_priority 2009-11-16 15:01:43 +01:00
Nikolas Garofil
f93aa2a68d Added support for $pid_threads and $pid_thread_list 2009-11-16 09:54:17 +01:00
Nikolas Garofil
2ed76a345f Added support for $pid_vmpeak, $pid_vmsize, $pid_vmlck, $pid_vmhwm, $pid_vmrss, $pid_vmdata, $pid_vmstk, $pid_vmexe, $pid_vmlib, $pid_vmpte 2009-11-15 19:44:37 +01:00
Pavel Labath
72412c463b Rename $running_processes to $running_threads, implement real $running_processes 2009-11-15 17:55:03 +01:00
Nikolas Garofil
2c2e87061b Added support for $gid_name 2009-11-15 17:46:41 +01:00
Nikolas Garofil
3fa868f35b Added support for $uid_name 2009-11-15 17:21:55 +01:00
Nikolas Garofil
d38049fb96 Added support for $pid_uid, $pid_euid, $pid_suid, $pid_fsuid, $pid_gid, $pid_egid, $pid_sgid and $pid_fsgid 2009-11-15 14:49:55 +01:00
Nikolas Garofil
b8e6b1a58d Add support for $pid_parent 2009-11-15 13:26:40 +01:00
Nikolas Garofil
fa459f0539 Make it possible to use other vars as arguments for the $pid-vars, add support for $pid_state_short, add support for $cmdline_to_pid 2009-11-14 22:07:54 +01:00
Cesare Tirabassi
0ee5e9935a Refactoring of commit 363cf1ab73
The problem with the original commit was that some session-managers set
stdin to /dev/null for the processes they launch, therefore the variable
wasn't very effective.
This commit change the variable conky_user_time to user_time.
This variable has a mandatory argument, a console identifier
(eg. tty7, pts/0, etc.).
Once called, this will list how long the user for the given console has been
logged in for.
This commit also allows multiple user_time to be specified for different
consoles, as well as correctly handle a conky restart.
2009-11-14 15:57:45 +01:00
Nikolas Garofil
44de7fe6be Support for $pid_state 2009-11-14 13:58:07 +01:00
Nikolas Garofil
ab0b80e495 Added support for $pid_chroot 2009-11-13 16:54:40 +01:00
Cesare Tirabassi
363cf1ab73 Add $conky_user_time (sf.net #2830919)
The bug reporter asks if it is possible to add a variable giving the "current
user time" only, since the variable user_times reports the times for ALL
logged users.
AFAIK, the only info one can gather inside conky, is the login time for the
tty connected to conky's standard input.
This commit adds support for it (it should work on any posix compliant *nix).
Note that in coherence with the definition, the variable is called
conky_user_time (for a single user stand-alone machine used as a desktop
this would be the "current" user time).
2009-11-13 16:30:04 +01:00
Phil Sutter
bde5845077 drop adt746x objects
This was really creepy stuff. Last updated in April, 2006 to work with
kernels > 2.6.12. I consider this "fobar" (fscking obsolete beyond all
recognition) and doubt anyone still uses this. If you do, blame me. :)
2009-11-13 00:47:23 +01:00
Nikolas Garofil
52629bef61 Added support for $pid_openfiles 2009-11-13 00:36:46 +01:00
Nikolas Garofil
6c4f069f00 Added support for $pid_exe and $pid_stdin, $pid_stdout and $pid_stderr 2009-11-12 20:34:43 +01:00
Nikolas Garofil
6b20156a1b Added support for $pid_environ_list 2009-11-12 15:42:18 +01:00
Nikolas Garofil
d595a65077 Add support for $pid_environ 2009-11-11 22:56:12 +01:00
Nikolas Garofil
cb96b3bcca Add cwd to $pid and split into $pid_cmdline and $pid_cwd 2009-11-11 16:27:19 +01:00
Nikolas Garofil
46dd6ca513 Add support for ${pid cmdline} 2009-11-11 10:55:25 +01:00
Nikolas Garofil
aad43bea8d Added support for $threads and fixed $processes on Linux 2009-11-07 18:14:04 +01:00
Nikolas Garofil
1ed564fd0b Revert "Added support for and fixed on Linux"
This reverts commit 43c7c0373b.
2009-11-07 18:13:21 +01:00
Nikolas Garofil
43c7c0373b Added support for and fixed on Linux 2009-11-07 18:06:07 +01:00
Phil Sutter
f61d8d108f text_object: completely remove the need for data.ifblock 2009-11-03 23:23:23 +01:00
Phil Sutter
9a770295d1 drop useless ifblock.str 2009-11-03 23:23:23 +01:00
Phil Sutter
7304378d73 drop a few unused fields from struct text_object 2009-11-03 23:23:23 +01:00
Phil Sutter
d9ec45b25d drop struct text_object field pair, since it got unused due to latest commits 2009-11-03 23:23:23 +01:00
Phil Sutter
76b433c809 drop struct text_object field f 2009-11-03 23:23:23 +01:00
Phil Sutter
22251dca51 specials: introduce dedicated per-object data and merge graph objects 2009-11-03 23:23:23 +01:00
Phil Sutter
0bed05997b review load* code 2009-11-03 23:23:23 +01:00
Phil Sutter
63079a2075 local_mails: convert to generic object payload
This also includes a little header include cleanup.
2009-11-03 23:23:22 +01:00
Phil Sutter
90ed7d8a2c mail: convert to generic object payload 2009-11-03 23:23:22 +01:00