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

158 Commits

Author SHA1 Message Date
Phil Sutter
06a4650f60 if_xmms2_connected: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
41f32f8766 if_mpd_playing: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
482f2d50b4 if_mixer_mute: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
5249c9da04 if_mounted: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
9af79a4907 if_up: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
27c1207cd1 if_gw: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
bb70c21c36 nvidia: convert to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
0188eb0aaa top: convert to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
1832cf79c9 ioscheduler: convert to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
712caa8ab3 convert obsd_* to callbacks.print (completely untested) 2009-11-29 22:21:49 +01:00
Phil Sutter
a249b9bc44 convert disk_protect to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
60ad080d1d convert pb_battery to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
3f83bd34f4 convert laptop_mode to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
f3cafc6a7c convert gw_* objects to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
faa47450ad convert sony_fanspeed to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
42b71217e3 loadgraph: convert to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
ee40c63542 xmms2: outsource code and convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
6bf79b7ebe combine: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
65effae144 scroll: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
67559fdaca moc: convert to callbacks.print and callbacks.free 2009-11-29 22:21:48 +01:00
Phil Sutter
dd8ec48fcb bmpx: convert to callbacks.print
While here, also drop those calls to memset, as the whole info object is
being zeroed at the beginning of main(). (Probably this is useful upon
config reload, too.)
2009-11-29 22:21:48 +01:00
Phil Sutter
6371551153 audacious: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
974d28a667 apcupsd: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
ac80e6f55f hddtemp: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
49cacbbc91 offset, align, tailhead: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
e0a3a82932 fs objects: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
18d2319d73 tcp-portmon: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
d0a2c51f4b font: convert scan_font to match common signature 2009-11-29 22:21:48 +01:00
Phil Sutter
9247d838c3 hddtemp: convert to callbacks.free 2009-11-29 22:21:48 +01:00
Phil Sutter
eb612dfcb0 hr, stippled_hr: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
4927eb85a2 goto, tab: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
9c8805ee7b shadecolor: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
f9036f58a2 outlinecolor: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
1a6803454c color: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
08122354a9 convert some special printing functions to common signature
Also add a little hack to $scroll to omit the need to call new_fg() from
inside print_scroll(). Instead of inserting a new special after printing
the scrolled text, insert a new object after the scroll object when
parsing text objects to handle the color reset.
2009-11-29 22:21:48 +01:00
Phil Sutter
02d104cc6a free_text_objects: drop empty switch cases 2009-11-29 21:40:48 +01:00
Phil Sutter
9cf2b88242 bunch of trivial conversions to gen_free_opaque() 2009-11-29 21:40:48 +01:00
Phil Sutter
fa3118993e huge bunch of trivial conversions to obj->callbacks 2009-11-29 21:40:38 +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
4c4770eb77 Fix: $scroll,$if_running and $apcupsd_lastxfer can now have long arguments if text_buffer_size is increased 2009-11-24 13:23:58 +01:00
Phil Sutter
66df73f74a implement ASCII gauge and enable all gauge objects for use with no X 2009-11-22 02:09:46 +01:00
Phil Sutter
c2eb77c3f0 realise seamless integration of new_bar_in_shell
The decision about whether to print ASCII or X11 bar is done from within
specials.c, so all those #ifdef + if () blocks can be dropped. This also
implicitly enables the ASCII bar for some bar printing objects which where
forgotten before.
2009-11-22 02:09:46 +01:00
Phil Sutter
7291184783 simplify conky_version and co. a bit 2009-11-20 00:03:15 +01:00
Phil Sutter
b6d1ff6c42 i8k: outsource code 2009-11-19 23:04:09 +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