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

243 Commits

Author SHA1 Message Date
Pavel Labath
72412c463b Rename $running_processes to $running_threads, implement real $running_processes 2009-11-15 17:55:03 +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
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
8922603b91 entropy: outsource code
This patch ought to be small and simple ...

The reason why it's not is me wanting the entropy data out of struct
information. This means update_entropy() can not be used anymore, as it
uses this globally available object.

The solution I am presenting here is quite messy regarding header
includes. Hopefully this will go away soon as I plan on creating some
sort of "OS library" containing all OS specific routines and defining
macros for easier capability checking in the non-specific code. This on
the other hand means we'll need "wrappers" around OS specific objects,
but that's not as bad as it seems - having non-specific text objects
only will definitely clean up the code, and capabilities can be checked
where they should be.
2009-11-13 00:02:16 +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
35ecbb3330 mail: use a private common struct mail_s instead of info.mail 2009-11-03 23:23:22 +01:00
Phil Sutter
ac99833646 text_object: use field i instead of cpu_index 2009-11-03 23:23:22 +01:00
Phil Sutter
8d1640f30b fs_*: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
8165a91f0a nvidia: convert to generic text object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
8b76d8fb60 net_stats: outsource network-related objects 2009-11-03 01:50:28 +01:00
Phil Sutter
37658b540b scroll: outsource code 2009-11-03 01:50:28 +01:00
Phil Sutter
7a168c377b exec: put all exec-related stuff into it's own file
While here, also merge the execi and texeci fields of struct
text_object, so more common code can be shared in between.
2009-11-03 01:50:28 +01:00
Phil Sutter
7fc1c801aa gw_info: move code to where it belongs 2009-11-03 01:50:28 +01:00
Phil Sutter
d1ed9c8399 fix compiling in a messy way
A cleaner but more ugly solution would be to include text_object.h in
every header containing struct text_object definitions. But this
apparently triggers a big mess, since text_object.h itself includes
custom headers. Forward defining struct text_object is obviously the
mostly simple solution until there is a bigger header include review
cleaning it all up.
2009-10-12 23:00:06 +02:00
Pavel Labath
09c0bccf55 Move vi modelines closer to the beginning, so they're more likely to be actually used. 2009-09-12 12:50:51 +02:00
Phil Sutter
e83fb84c55 update machinery: clean up
* Remove leftover INFO_* values from object definitions which didn't
  trigger anything.
* Drop the whole INFO_* enum as it's values are not used anymore.
2009-09-07 01:12:11 +02:00
Phil Sutter
e044093735 update machinery: complete transition
* Drop all need_mask alterations (no idea why there were here at all,
  but surely not sane since they are missing in the non-linux
  functions).
* Drop the update delay for update_meminfo(), as parsing /proc should
  not lead to abnormal overhead.
* Check for x_initialised from inside update_x11info(), so we can call
  it unconditionally.
2009-09-07 01:05:33 +02:00
Phil Sutter
5a3b7c074b Rewrite hddtemp support for better scaling
Instead of connecting once for each object, have a central update
routine (limiting support to only a single hddtemp daemon to connect
to).
2009-09-06 21:53:53 +02:00
Phil Sutter
12ab00cd2e move the ncurses.h include from conky.h to core.c
Fixes some namespace error with libmpdclient.c.
2009-09-04 00:08:57 +02:00
Cesare Tirabassi
75ce3b259b Fix if_running not working on linux when a top flavour is not running 2009-09-03 23:13:14 +02:00
Nikolas Garofil
bfb065502d Add global ncurses headerfile and make sure timeout in mailcode doesn't clash with timeout from ncurses 2009-08-08 03:20:47 +02:00
Nikolas Garofil
834804c265 Fix: Add header needed for read_tcp 2009-08-08 02:49:28 +02:00
Brenden Matthews
043cf686c6 Revert "Uhh..ansohus"
This reverts commit 9827726ae5.

Or this.
2009-08-07 01:24:24 -06:00
Brenden Matthews
d7838b87bf Revert "Merge branch 'master' of git.omp.am:/home/omp/git/conky"
This reverts commit d710ea8b9d, reversing
changes made to 9827726ae5.

Also didn't meant to push this.
2009-08-07 01:23:27 -06:00
Brenden Matthews
098e28598f Revert "auesnthaeou"
This reverts commit 70adc04fc2.

Oops, didn't mean to push this.  I'll start a new branch now (so I don't
do this again...).
2009-08-07 01:21:56 -06:00
Brenden Matthews
70adc04fc2 auesnthaeou 2009-08-06 21:56:40 -06:00
Brenden Matthews
d710ea8b9d Merge branch 'master' of git.omp.am:/home/omp/git/conky
Conflicts:
	src/conky.h
2009-08-06 14:21:50 -06:00
Nikolas Garofil
157537fc30 Fix buildproblems introduced by 3f4127080e . inet.h is used by read_tcp and timeout is renamed to prevent clashes with timeout in ncurses 2009-08-06 15:28:07 +02:00
Brenden Matthews
9827726ae5 Uhh..ansohus 2009-08-06 00:54:40 -06:00
Brenden Matthews
3f4127080e Started on breaking up conky.c.
These changes will likely result in breakage, particularly with
different features enabled/disabled.
2009-08-05 16:46:51 -06:00
Brenden Matthews
aec2ac5448 Let's try __attribute__ this time for unused vars. 2009-08-03 13:48:18 -06:00
Brenden Matthews
3b13ae971e Do the UNUSED() thing another way. 2009-08-03 13:34:47 -06:00
Brenden Matthews
581f59528b Spell 'of' correctly. 2009-08-03 12:57:22 -06:00
Brenden Matthews
efa5a211b7 Better fix for unused var problem. 2009-08-03 12:56:41 -06:00
Nikolas Garofil
44b82311b9 Added support for out_to_ncurses
All ERR()'s are renamed to NORM_ERR() and box to mbox so that they don't
clash with things in ncurses.h .
Ncurses is enabled by default when building conky but can be disabled with
--disable-ncurses .
At the moment configure doesn't check if ncurses is actually available.
I'm adding support for ncurses so that we can make as much things as possible
that are only available in X11 also available in console in the future.
2009-08-01 20:45:43 +02:00
Brenden Matthews
be145bd55d Removed alias config option due to brokenness.
The alias option was broken by fb8ccd7a05,
and it seems like trying to make it work again will only result in
breakage for env var substitution anyway.
2009-07-31 00:33:06 -06:00
Cesare Tirabassi
81c691d15a add emacs indentation variables to source files in line with current vim settings 2009-07-28 23:44:22 +02:00
Brenden Matthews
da4b542ae6 Added some Lua API stuff.
Added conky_set_update_interval() API call, which allows you to change
Conky's update interval from a Lua script.  Added the 'conky_info' table
to global Lua context, which still needs populating with stuff (right
now it only contains the current update interval and the system uptime).
2009-07-28 12:38:43 -06:00
Brenden Matthews
d97cd93a1c Add vim modelines. 2009-07-27 14:47:31 -06:00
Nikolas Garofil
ca0f8f8712 Fix: If there is no battery then we don't care about the status 2009-07-27 13:34:20 +02:00
Brenden Matthews
9cda78c023 Clarify weather opts, refactor some weather code. 2009-07-20 13:17:44 -06:00
Brenden Matthews
c05c157ead Overhauled RSS and weather, added $curl.
I've taken the curl stuff out of weather and RSS and moved it into it's
own entity.  It should be easier to create curl-based objects if needed
now.
2009-07-19 23:43:36 -06:00
Cesare Tirabassi
7bbde2be73 refactored desktop info code so that its only called on X property events; TO DO doesn't work with own_window 2009-07-14 16:57:51 +02:00
Cesare Tirabassi
88ae603cf5 Add support for $desktop, $desktop_number and $desktop_name
Should work with any window manager that supports the
freedesktop.org Window Manager Specification
(see http://www.freedesktop.org/wiki/Specifications/wm-spec).

I have tested succesfully with openbox but some more testing with other
wm would be needed!

Support is built-in; if it is not acceptable to loose cpu cycles for this
at every conky refresh step than it should be conditionally compiled.
2009-07-11 10:50:02 +02:00
Brenden Matthews
2fa5f97edb A whole bunch of changes, mostly Lua related.
Improved Lua API (lua_read_parse has been removed in favour of the
conky_parse() Lua API call).  The docs have been improved to reflect the
recent Lua API stuff as well.  Introduced new Lua Cairo and Imlib2
bindings, which require the tolua++ tool.  Fixed some other
miscellaneous doc related things.
2009-07-09 22:47:41 -06:00
Nikolas Garofil
9065d1f422 Added support for swapfree 2009-07-09 20:12:52 +02:00
Cesare Tirabassi
1171ab38a5 Added support for $weather (experimental).
Download, parse and display METAR data from the NWS.

icao must be a valid icao for the required location
(see for instance https://pilotweb.nas.faa.gov/qryhtml/icao/).

data_type must be one of the following:

last_update   : display the date (yyyy/mm/dd) and time (UTC)
	        of the last update.
temperature_C : display air temperature in degree Celsius.
temperature_F : display air temperature in degree Fahrenheit.
cloud_cover   : display the highest cloud cover status.
pressure      : display air pressure in millibar.
wind_speed    : display wind speed in km/hour.
wind_dir      : display wind direction.
wind_dir_DEG  : display compass wind direction.
humidity      : display relative humidity in %.
weather       : display any relevant weather event (rain, snow, etc.).

delay_in_minutes (optional, default 30) cannot be lower than 30 min.
Up to 3 stations can be simultaneously queried.

Use --enable-weather to compile this in.
2009-07-07 00:20:12 +02:00
Pavel Labath
c0d1c313e9 Support for per-task I/O statistics - $top_io
Basically, I just added three new process properties (io_read, io_write, io_perc - representing
the amount of I/O done by the process during the update interval) and $top_io, that sorts
processes based on io_perc.

Atm, it's completely #ifdef'd, since it requires kernel support. But that creates some wierd
looking syntax at some places, so it may be better to remove some ifdefs.  It even may be
possible to completely remove the ifdefs (ie. convert them to #ifdef linux) since the code will
compile just fine even if the kernel doesn't support I/O accounting. I'll leave that for someone
else to decide.
2009-06-12 19:39:45 +02:00