1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
3 * Conky, a system monitor, based on torsmo
5 * Any original torsmo code is licensed under the BSD license
7 * All code written since the fork of torsmo is licensed under the GPL
9 * Please see COPYING for details
11 * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
12 * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
14 * All rights reserved.
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 * vim: ts=4 sw=4 noet ai cindent syntax=c
32 #ifndef _CONKY_STRUCTS_H_
33 #define _CONKY_STRUCTS_H_
35 #include "config.h" /* defines */
37 #include <sys/utsname.h> /* struct uname_s */
38 #include <stdio.h> /* FILE */
48 #define MAX_TEMPLATES 10
51 unsigned int entropy_avail;
52 unsigned int poolsize;
83 struct monitor_info monitor;
84 struct desktop_info desktop;
96 struct conftree* horz_next;
97 struct conftree* vert_next;
98 struct conftree* back;
104 struct utsname uname_s;
110 /* memory information in kilobytes */
111 unsigned long long mem, memeasyfree, memfree, memmax, swap, swapfree, swapmax;
112 unsigned long long bufmem, buffers, cached;
114 unsigned short procs;
115 unsigned short run_procs;
118 /* struct cpu_stat cpu_summed; what the hell is this? */
119 unsigned int cpu_count;
124 int diskio_avg_samples;
131 struct xmms2_s xmms2;
134 AUDACIOUS_S audacious;
139 struct usr_info users;
140 struct gateway_info gw_info;
141 struct dns_data nameserver_info;
142 struct process *cpu[10];
143 struct process *memu[10];
144 struct process *time[10];
146 struct process *io[10];
148 struct process *first_process;
149 unsigned long looped;
150 struct entropy_s entropy;
151 double music_player_interval;
161 short kflags; /* kernel settings, see enum KFLAG */
164 enum x_initialiser_state {
171 /* for fonts, used in fonts.c, core.c, etc */
174 char name[DEFAULT_TEXT_BUFFER_SIZE];
185 typedef struct _conky_context_s {
186 /* variables holding various config settings */
188 int format_human_readable;
195 int top_cpu, top_mem, top_time;
199 unsigned int top_name_width;
202 enum x_initialiser_state x_initialised;
203 /* Update interval */
204 double update_interval;
205 double update_interval_old;
206 double update_interval_bat;
208 double current_update_time, next_update_time, last_update_time;
210 /* struct that has all info to be shared between
211 * instances of the same text object */
212 struct information info;
214 /* path to config file */
215 char *current_config;
217 /* set to 1 if you want all text to be in uppercase */
218 unsigned int stuff_in_uppercase;
220 /* Run how many times? */
221 unsigned long total_run_times;
224 int fork_to_background;
226 int cpu_avg_samples, net_avg_samples, diskio_avg_samples;
228 /* filenames for output */
229 char *overwrite_file; FILE *overwrite_fpointer;
230 char *append_file; FILE *append_fpointer;
233 /* display to connect to */
236 int show_graph_scale;
237 int show_graph_range;
239 /* Position on the screen */
245 int draw_graph_borders;
246 int stippled_borders;
248 int draw_shades, draw_outline;
250 long default_fg_color, default_bg_color, default_out_color;
252 /* create own window or draw stuff to root? */
257 int background_colour;
259 /* fixed size/pos is set if wm/user changes them */
260 int fixed_size, fixed_pos;
263 int minimum_width, minimum_height;
267 int last_font_height;
270 int text_start_x, text_start_y; /* text start position in window */
271 int text_width, text_height;
281 long color0, color1, color2, color3, color4, color5, color6, color7, color8,
284 char *template[MAX_TEMPLATES];
286 /* maximum size of config TEXT buffer, i.e. below TEXT line. */
287 unsigned int max_user_text;
289 /* maximum size of individual text buffers, ie $exec buffer size */
290 unsigned int text_buffer_size;
295 /* no buffers in used memory? */
298 /* pad percentages to decimals? */
303 long global_text_lines;
310 /* formatted text to render on screen, generated in generate_text(), drawn
317 /* used in colours.c */
319 long redmask, greenmask, bluemask;
322 struct font_list *fonts;
325 /* used in common.c */
326 double last_meminfo_update;
327 double last_fs_update;
329 unsigned long long need_mask;
331 /* two strings for internal use */
332 char *tmpstring1, *tmpstring2;
335 #endif /* _CONKY_STRUCTS_H_ */