anbei zeige ich euch mal meinen aktuellen screenshot.
in einem anderen forum habe ich gesehen, dass -zumindest bei englischen sendern- es möglich ist, die termine für manche tv-sender auszulesen. geht das auch in deutsch?!
|
Anmeldungsdatum: Beiträge: 90 |
anbei zeige ich euch mal meinen aktuellen screenshot. in einem anderen forum habe ich gesehen, dass -zumindest bei englischen sendern- es möglich ist, die termine für manche tv-sender auszulesen. geht das auch in deutsch?! |
||
|
Anmeldungsdatum: Beiträge: 101 Wohnort: Berlin |
Kannst ja mal hier http://wiki.xmltv.org/index.php/Main_Page/ und hier http://www.mythtv.org/wiki/XMLTV schaun. Generell sollte es aber schwierig werden ne API/nen Feed zu finden, die die Sendetermine aller deutschen TV-Sender liefert. Du müsstest halt schaun, ob deine Lieblingssender ne API/nen Feed haben und dann nen Skript schreiben, welches die Daten all dieser Sender in ein ordentliches Format bringt, dann kannste das auch ohne weiteres in Conky einbinden. Aber wie gesagt siehst mit APIs/Feeds für deutsches Fernsehprogramm relativ düster aus Viele Grüße |
||
|
Anmeldungsdatum: Beiträge: 90 |
hier könnt ihr viele verschiedene sachen für eure conky-config finden: http://thepeachyblog.blogspot.com/p/index-or-home-page.html |
||
|
Anmeldungsdatum: Beiträge: 133 Wohnort: Hamburg |
|||
|
Anmeldungsdatum: Beiträge: 1752 Wohnort: trash:/// |
Hi Francis, ich habe mein conky inzwischen ein wenig überarbeitet, aber zum Glück ein zufälliges Backup: Und hier das Überarbeitete: |
||
|
Anmeldungsdatum: Beiträge: 587 Wohnort: Süßen |
Conky with lua-cairo (conky-1.7.2-opensolaris.diff) diff -ur conky-1.7.2/configure conky-1.7.2.solaris/configure
--- conky-1.7.2/configure 2009-08-25 03:01:58.000000000 +0400
+++ conky-1.7.2.solaris/configure 2009-12-04 16:15:09.000000000 +0300
@@ -11713,9 +11713,9 @@
;;
# Solaris doesn't work at all right now
-# SunOS*)
-# WANT_KSTAT=yes
-# ;;
+ SunOS*)
+ WANT_KSTAT=yes
+ ;;
*)
echo "Your operating system $uname isn't supported"
@@ -15978,7 +15978,9 @@
$as_echo "$as_me: error: tolua++ or tolua++5.1 is required for Lua extras." >&2;}
{ (exit 1); exit 1; }; }
else
- { $as_echo "$as_me:$LINENO: checking for library containing tolua_error" >&5
+ {
+conky_LIBS="$conky_LIBS -ltolua++"
+$as_echo "$as_me:$LINENO: checking for library containing tolua_error" >&5
$as_echo_n "checking for library containing tolua_error... " >&6; }
if test "${ac_cv_search_tolua_error+set}" = set; then
$as_echo_n "(cached) " >&6
@@ -16071,7 +16073,7 @@
else
{ { $as_echo "$as_me:$LINENO: error: tolua_error not found" >&5
$as_echo "$as_me: error: tolua_error not found" >&2;}
- { (exit 1); exit 1; }; }
+ }
fi
fi
@@ -20444,7 +20446,7 @@
fi
fi
-
+conky_LIBS="$conky_LIBS -lkstat -lnsl -lsocket"
{ $as_echo "$as_me:$LINENO: checking if $LD accepts -O1" >&5
diff -ur conky-1.7.2/src/common.c conky-1.7.2.solaris/src/common.c
--- conky-1.7.2/src/common.c 2009-08-09 00:05:55.000000000 +0400
+++ conky-1.7.2.solaris/src/common.c 2009-12-07 10:51:57.509706950 +0300
@@ -43,7 +43,9 @@
#include <fcntl.h>
/* check for OS and include appropriate headers */
-#if defined(__linux__)
+#if defined(SOLARISX86)
+#include <sys/sockio.h>
+#elif defined(__linux__)
#include "linux.h"
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include "freebsd.h"
@@ -434,11 +436,11 @@
if (NEED(INFO_NET)) {
update_net_stats();
}
-
+#if !defined(SOLARISX86)
if (NEED(INFO_DISKIO)) {
update_diskio();
}
-
+#endif /* Solaris */
#if defined(__linux__)
if (NEED(INFO_I8K)) {
update_i8k();
@@ -494,11 +496,11 @@
update_x11info();
}
#endif
-
+#if !defined(SOLARISX86)
if (NEED(INFO_TOP)) {
update_top();
}
-
+#endif /* Solaris */
/* update_fs_stat() won't do anything if there aren't fs -things */
if (NEED(INFO_FS) && current_update_time - last_fs_update > 12.9) {
update_fs_stats();
@@ -509,9 +511,11 @@
tcp_portmon_update();
}
#endif
+#if !defined(SOLARISX86)
if (NEED(INFO_ENTROPY)) {
update_entropy();
}
+#endif /* Solaris */
#if defined(__linux__)
if (NEED(INFO_USERS)) {
update_users();
diff -ur conky-1.7.2/src/config.h.in conky-1.7.2.solaris/src/config.h.in
--- conky-1.7.2/src/config.h.in 2009-08-25 03:02:05.000000000 +0400
+++ conky-1.7.2.solaris/src/config.h.in 2009-12-04 15:17:14.000000000 +0300
@@ -1,5 +1,7 @@
/* src/config.h.in. Generated from configure.ac by autoheader. */
+
+#define SOLARISX86
/* Define if you want apcupsd support */
#undef APCUPSD
diff -ur conky-1.7.2/src/conky.c conky-1.7.2.solaris/src/conky.c
--- conky-1.7.2/src/conky.c 2009-08-11 03:44:18.000000000 +0400
+++ conky-1.7.2.solaris/src/conky.c 2009-12-07 10:54:02.586098418 +0300
@@ -95,6 +95,8 @@
#include <bsd/bsd.h>
#endif
+#define MIN(a,b) (a>b ? b : a)
+
/* FIXME: apm_getinfo is unused here. maybe it's meant for common.c */
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
|| defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
@@ -377,6 +379,26 @@
/* maximum size of individual text buffers, ie $exec buffer size */
unsigned int text_buffer_size = DEFAULT_TEXT_BUFFER_SIZE;
+char*
+strcasestr (char *haystack, char *needle)
+{
+ char *p, *startn = 0, *np = 0;
+ for (p = haystack; *p; p++) {
+ if (np) {
+ if (toupper(*p) == toupper(*np)) {
+ if (!*++np)
+ return startn;
+ } else
+ np = 0;
+ } else if (toupper(*p) == toupper(*needle)) {
+ np = needle + 1;
+ startn = p;
+ }
+ }
+
+ return 0;
+}
+
#ifdef HAVE_ICONV
#define CODEPAGE_LENGTH 20
long iconv_selected;
@@ -1116,6 +1138,7 @@
}
#ifdef X11
+#if !defined(SOLARISX86)
void scan_mixer_bar(const char *arg, int *a, int *w, int *h)
{
char buf1[64];
@@ -1129,6 +1152,7 @@
scan_bar(arg, w, h);
}
}
+#endif /* Solaris */
#endif /* X11 */
/* strip a leading /dev/ if any, following symlinks first
@@ -1274,10 +1298,13 @@
} else
#endif /* X11 */
#ifdef __OpenBSD__
+
OBJ(freq, INFO_FREQ)
#else
OBJ(acpitemp, 0)
+#if !defined(SOLARISX86)
obj->data.i = open_acpi_temperature(arg);
+#endif /* Solaris */
END OBJ(acpiacadapter, 0)
END OBJ(freq, INFO_FREQ)
#endif /* !__OpenBSD__ */
@@ -1341,7 +1368,6 @@
obj->data.cpu_index = atoi(&arg[0]);
}
obj->a = 1;
-
#ifdef HAVE_IWLIB
END OBJ(wireless_essid, INFO_NET)
if (arg) {
@@ -1620,6 +1646,7 @@
free(buf);
}
#endif /* X11 */
+#if !defined(SOLARISX86)
END OBJ(diskio, INFO_DISKIO)
obj->data.diskio = prepare_diskio_stat(dev_name(arg));
END OBJ(diskio_read, INFO_DISKIO)
@@ -1651,6 +1678,7 @@
obj->data.diskio = prepare_diskio_stat(dev_name(buf));
if (buf) free(buf);
+#endif /* Solaris */
#endif /* X11 */
END OBJ(color, 0)
#ifdef X11
@@ -2397,6 +2425,7 @@
if (buf) free(buf);
#endif /* X11*/
+#if !defined(SOLARISX86)
END OBJ(mixer, INFO_MIXER)
obj->data.l = mixer_init(arg);
END OBJ(mixerl, INFO_MIXER)
@@ -2419,6 +2448,7 @@
#endif
END OBJ_IF(if_mixer_mute, INFO_MIXER)
obj->data.ifblock.i = mixer_init(arg);
+#endif /* Solaris */
#ifdef X11
END OBJ(monitor, INFO_X11)
END OBJ(monitor_number, INFO_X11)
@@ -3795,10 +3825,13 @@
}
}
#ifndef __OpenBSD__
+#if !defined(SOLARISX86)
OBJ(acpitemp) {
temp_print(p, p_max_size, get_acpi_temperature(obj->data.i), TEMP_CELSIUS);
}
+#endif /* Solaris */
#endif /* !__OpenBSD__ */
+#if !defined(SOLARISX86)
OBJ(freq) {
if (obj->a) {
obj->a = get_freq(p, p_max_size, "%.0f", 1,
@@ -3807,6 +3840,8 @@
}
OBJ(freq_g) {
if (obj->a) {
+#endif /* Solaris */
+#if !defined(SOLARISX86)
#ifndef __OpenBSD__
obj->a = get_freq(p, p_max_size, "%'.2f", 1000,
obj->data.cpu_index);
@@ -3815,6 +3850,7 @@
obj->a = get_freq(p, p_max_size, "%.2f", 1000,
obj->data.cpu_index);
#endif /* __OpenBSD */
+
}
}
#if defined(__linux__)
@@ -3830,7 +3866,7 @@
obj->data.cpu_index);
}
}
-
+#endif /* Solaris */
#ifdef HAVE_IWLIB
OBJ(wireless_essid) {
snprintf(p, p_max_size, "%s", obj->data.net->essid);
@@ -3879,6 +3915,7 @@
#endif /* __linux__ */
+#if !defined(SOLARISX86)
#ifndef __OpenBSD__
OBJ(adt746xcpu) {
get_adt746x_cpu(p, p_max_size);
@@ -3917,7 +3954,7 @@
get_battery_short_status(p, p_max_size, obj->data.s);
}
#endif /* __OpenBSD__ */
-
+#endif /* Solaris */
OBJ(buffers) {
human_readable(cur->buffers * 1024, p, 255);
}
@@ -4901,6 +4938,7 @@
100, 1, obj->char_a, obj->char_b);
}
#endif /* X11 */
+#if !defined(SOLARISX86)
/* mixer stuff */
OBJ(mixer) {
percent_print(p, p_max_size, mixer_get_avg(obj->data.l));
@@ -4930,6 +4968,7 @@
DO_JUMP;
}
}
+#endif /* Solaris */
#ifdef X11
#define NOT_IN_X "Not running in X"
OBJ(monitor) {
@@ -7633,7 +7672,9 @@
}
clear_net_stats();
+#if !defined(SOLARISX86)
clear_diskio_stats();
+#endif /* Solaris */
if(global_cpu != NULL) {
free(global_cpu);
global_cpu = NULL;
diff -ur conky-1.7.2/src/fs.c conky-1.7.2.solaris/src/fs.c
--- conky-1.7.2/src/fs.c 2009-08-09 00:05:55.000000000 +0400
+++ conky-1.7.2.solaris/src/fs.c 2009-12-07 10:50:41.541313443 +0300
@@ -34,6 +34,8 @@
#include <errno.h>
#include <sys/types.h>
#include <fcntl.h>
+/* Solaris */
+#include <sys/statvfs.h>
/* linux */
#ifdef HAVE_SYS_STATFS_H
@@ -48,7 +50,7 @@
#include <sys/mount.h>
#endif
-#if !defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) && !defined (__OpenBSD__) && !defined(__FreeBSD__)
+#if !defined(SOLARISX86) && (HAVE_STRUCT_STATFS_F_FSTYPENAME) && !defined (__OpenBSD__) && !defined(__FreeBSD__)
#include <mntent.h>
#endif
@@ -108,33 +110,33 @@
static void update_fs_stat(struct fs_stat *fs)
{
- struct statfs s;
+ struct statvfs s;
- if (statfs(fs->path, &s) == 0) {
- fs->size = (long long)s.f_blocks * s.f_bsize;
+ if (statvfs(fs->path, &s) == 0) {
+ fs->size = (long long)s.f_blocks * s.f_frsize;
/* bfree (root) or bavail (non-roots) ? */
- fs->avail = (long long)s.f_bavail * s.f_bsize;
- fs->free = (long long)s.f_bfree * s.f_bsize;
+ fs->avail = (long long)s.f_bavail * s.f_frsize;
+ fs->free = (long long)s.f_bfree * s.f_frsize;
get_fs_type(fs->path, fs->type);
} else {
fs->size = 0;
fs->avail = 0;
fs->free = 0;
strncpy(fs->type, "unknown", DEFAULT_TEXT_BUFFER_SIZE);
- ERR("statfs '%s': %s", fs->path, strerror(errno));
+ ERR("statvfs '%s': %s", fs->path, strerror(errno));
}
}
void get_fs_type(const char *path, char *result)
{
-#if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) || defined(__FreeBSD__) || defined (__OpenBSD__)
+#if defined(SOLARISX86) || (HAVE_STRUCT_STATFS_F_FSTYPENAME) || defined(__FreeBSD__) || defined (__OpenBSD__)
- struct statfs s;
- if (statfs(path, &s) == 0) {
- strncpy(result, s.f_fstypename, DEFAULT_TEXT_BUFFER_SIZE);
+ struct statvfs s;
+ if (statvfs(path, &s) == 0) {
+ strncpy(result, s.f_basetype, DEFAULT_TEXT_BUFFER_SIZE);
} else {
- ERR("statfs '%s': %s", path, strerror(errno));
+ ERR("statvfs '%s': %s", path, strerror(errno));
}
return;
diff -ur conky-1.7.2/src/mail.c conky-1.7.2.solaris/src/mail.c
--- conky-1.7.2/src/mail.c 2009-08-09 00:05:55.000000000 +0400
+++ conky-1.7.2.solaris/src/mail.c 2009-12-04 15:43:42.000000000 +0300
@@ -56,6 +56,8 @@
* #define MAX(a, b) ((a > b) ? a : b)
*/
+#define MAX(a, b) ((a > b) ? a : b)
+
char *current_mail_spool;
void update_mail_count(struct local_mail_s *mail)
@@ -464,7 +466,7 @@
}
#else /* HAVE_GETHOSTBYNAME_R */
if ((he_res = gethostbyname(mail->host)) == NULL) { // get the host info
- herror("gethostbyname");
+ fprintf(stderr,"gethostbyname");
exit(EXIT_FAILURE);
}
#endif /* HAVE_GETHOSTBYNAME_R */
@@ -773,7 +775,7 @@
}
#else /* HAVE_GETHOSTBYNAME_R */
if ((he_res = gethostbyname(mail->host)) == NULL) { // get the host info
- herror("gethostbyname");
+ fprintf(stderr,"gethostbyname");
exit(EXIT_FAILURE);
}
#endif /* HAVE_GETHOSTBYNAME_R */
diff -ur conky-1.7.2/src/Makefile.am conky-1.7.2.solaris/src/Makefile.am
--- conky-1.7.2/src/Makefile.am 2009-08-09 00:05:55.000000000 +0400
+++ conky-1.7.2.solaris/src/Makefile.am 2009-12-04 16:08:22.000000000 +0300
@@ -156,7 +156,7 @@
logging.h \
$(nvidia) \
mail.c \
- mixer.c \
+ solaris.c \
$(mpd) \
$(moc) \
$(netbsd) \
@@ -220,7 +220,6 @@
weather.h \
llua.h \
mail.h \
- mixer.h \
moc.h \
moc.c \
mpd.c \
diff -ur conky-1.7.2/src/Makefile.in conky-1.7.2.solaris/src/Makefile.in
--- conky-1.7.2/src/Makefile.in 2009-08-25 03:01:57.000000000 +0400
+++ conky-1.7.2.solaris/src/Makefile.in 2009-12-04 16:09:07.000000000 +0300
@@ -78,7 +78,7 @@
audacious.c audacious.h bmpx.c colours.c colours.h common.c \
conky.c conky.h freebsd.c diskio.c fs.c hddtemp.c apcupsd.c \
apcupsd.h linux.c top.c users.c sony.c logging.h nvidia.c \
- nvidia.h mail.c mixer.c mpd.c libmpdclient.c moc.c openbsd.c \
+ nvidia.h mail.c solaris.c mpd.c libmpdclient.c moc.c openbsd.c \
libtcp-portmon.h libtcp-portmon.c tcp-portmon.h tcp-portmon.c \
eve.c eve.h rss.c prss.c prss.h weather.c weather.h llua.c \
llua.h timed_thread.c timed_thread.h mboxscan.c mboxscan.h \
@@ -122,7 +122,7 @@
conky-common.$(OBJEXT) conky-conky.$(OBJEXT) $(am__objects_5) \
conky-fs.$(OBJEXT) $(am__objects_6) $(am__objects_7) \
$(am__objects_8) $(am__objects_9) conky-mail.$(OBJEXT) \
- conky-mixer.$(OBJEXT) $(am__objects_10) $(am__objects_11) \
+ conky-solaris.$(OBJEXT) $(am__objects_10) $(am__objects_11) \
$(am__objects_12) $(am__objects_13) $(am__objects_14) \
$(am__objects_15) $(am__objects_16) $(am__objects_17) \
conky-timed_thread.$(OBJEXT) conky-mboxscan.$(OBJEXT) \
@@ -370,7 +370,7 @@
logging.h \
$(nvidia) \
mail.c \
- mixer.c \
+ solaris.c \
$(mpd) \
$(moc) \
$(netbsd) \
@@ -434,7 +434,6 @@
weather.h \
llua.h \
mail.h \
- mixer.h \
moc.h \
moc.c \
mpd.c \
@@ -579,7 +578,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conky-llua.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conky-mail.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conky-mboxscan.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conky-mixer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conky-solaris.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conky-moc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conky-mpd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conky-nvidia.Po@am__quote@
@@ -859,19 +858,19 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conky_CFLAGS) $(CFLAGS) -c -o conky-mail.obj `if test -f 'mail.c'; then $(CYGPATH_W) 'mail.c'; else $(CYGPATH_W) '$(srcdir)/mail.c'; fi`
-conky-mixer.o: mixer.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conky_CFLAGS) $(CFLAGS) -MT conky-mixer.o -MD -MP -MF $(DEPDIR)/conky-mixer.Tpo -c -o conky-mixer.o `test -f 'mixer.c' || echo '$(srcdir)/'`mixer.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/conky-mixer.Tpo $(DEPDIR)/conky-mixer.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mixer.c' object='conky-mixer.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conky_CFLAGS) $(CFLAGS) -c -o conky-mixer.o `test -f 'mixer.c' || echo '$(srcdir)/'`mixer.c
-
-conky-mixer.obj: mixer.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conky_CFLAGS) $(CFLAGS) -MT conky-mixer.obj -MD -MP -MF $(DEPDIR)/conky-mixer.Tpo -c -o conky-mixer.obj `if test -f 'mixer.c'; then $(CYGPATH_W) 'mixer.c'; else $(CYGPATH_W) '$(srcdir)/mixer.c'; fi`
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/conky-mixer.Tpo $(DEPDIR)/conky-mixer.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mixer.c' object='conky-mixer.obj' libtool=no @AMDEPBACKSLASH@
+conky-solaris.o: solaris.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conky_CFLAGS) $(CFLAGS) -MT conky-solaris.o -MD -MP -MF $(DEPDIR)/conky-solaris.Tpo -c -o conky-solaris.o `test -f 'solaris.c' || echo '$(srcdir)/'`solaris.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/conky-solaris.Tpo $(DEPDIR)/conky-solaris.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='solaris.c' object='conky-solaris.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conky_CFLAGS) $(CFLAGS) -c -o conky-solaris.o `test -f 'solaris.c' || echo '$(srcdir)/'`solaris.c
+
+conky-solaris.obj: solaris.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conky_CFLAGS) $(CFLAGS) -MT conky-solaris.obj -MD -MP -MF $(DEPDIR)/conky-solaris.Tpo -c -o conky-solaris.obj `if test -f 'solaris.c'; then $(CYGPATH_W) 'solaris.c'; else $(CYGPATH_W) '$(srcdir)/solaris.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/conky-solaris.Tpo $(DEPDIR)/conky-solaris.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='solaris.c' object='conky-solaris.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conky_CFLAGS) $(CFLAGS) -c -o conky-mixer.obj `if test -f 'mixer.c'; then $(CYGPATH_W) 'mixer.c'; else $(CYGPATH_W) '$(srcdir)/mixer.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conky_CFLAGS) $(CFLAGS) -c -o conky-solaris.obj `if test -f 'solaris.c'; then $(CYGPATH_W) 'solaris.c'; else $(CYGPATH_W) '$(srcdir)/solaris.c'; fi`
conky-mpd.o: mpd.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conky_CFLAGS) $(CFLAGS) -MT conky-mpd.o -MD -MP -MF $(DEPDIR)/conky-mpd.Tpo -c -o conky-mpd.o `test -f 'mpd.c' || echo '$(srcdir)/'`mpd.c
diff -ur conky-1.7.2/src/solaris.c conky-1.7.2.solaris/src/solaris.c
--- conky-1.7.2/src/solaris.c 2009-08-09 00:05:55.000000000 +0400
+++ conky-1.7.2.solaris/src/solaris.c 2009-12-04 16:58:58.456362489 +0300
@@ -1,85 +1,331 @@
-/* Conky, a system monitor, based on torsmo
- *
- * Any original torsmo code is licensed under the BSD license
- *
- * All code written since the fork of torsmo is licensed under the GPL
- *
- * Please see COPYING for details
- *
- * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
- * (see AUTHORS)
- * All rights reserved.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * vim: ts=4 sw=4 noet ai cindent syntax=c
- *
- */
+/* Added initial Solaris support - Alexander Eremin http://www.milax.org 16 May 2008/
+* Updated update_net_stats - Alexander Eremin http://www.milax.org 05 August 2009
+* Updated for 1.7.2 version - Alexander Eremin http://www.milax.org 04 December 2009
+*/
-/* doesn't work, feel free to finish this */
#include "conky.h"
-#include "common.h"
#include <kstat.h>
-
-static kstat_ctl_t *kstat;
+#include <errno.h>
+#include <utmp.h>
+#include <net/if.h>
+#include <sys/sockio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/swap.h>
+#include <stdio.h>
+#include <sys/sysinfo.h>
+#include <string.h>
+#include <sys/loadavg.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <sys/dlpi.h>
+#include <net/if.h>
+#include <sys/sockio.h>
+#include <strings.h>
+#include <netinet/in.h>
+
+
+#define ONE_KB (1024)
+
+
+static kstat_ctl_t *kc;
+static kstat_named_t *data_lookup;
+static kstat_t *ksp;
static int kstat_updated;
+unsigned int mem, memmax, swap, swapmax, swapfree, bufmem, buffers, cached;
+static unsigned int cpu_user, cpu_idle, cpu_system, cpu_nice;
+static double last_cpu_sum;
+static double last_cpu_calc_time;
+
+static void update_kstat(void) {
+ if (kc == NULL) {
+ kc = kstat_open();
+ if (kc == NULL) {
+ printf("can't open kstat");
+ }
+ }
+
+ if (kstat_chain_update(kc) == -1) {
+ perror("kstat_chain_update");
+ return;
+ }
+}
-static void update_kstat()
-{
- if (kstat == NULL) {
- kstat = kstat_open();
- if (kstat == NULL) {
- ERR("can't open kstat: %s", strerror(errno));
- }
- }
+void prepare_update(void) {
+ kstat_updated = 0;
+}
- if (kstat_chain_update(kstat) == -1) {
- perror("kstat_chain_update");
- return;
- }
+void update_uptime(void) {
+
+ double t = 0;
+
+ update_kstat();
+
+ ksp = kstat_lookup(kc, "unix", -1, "system_misc");
+ if (kstat_read(kc, ksp, NULL) >= 0) {
+ data_lookup = (kstat_named_t *) kstat_data_lookup(ksp, "boot_time");
+ if (data_lookup != NULL)
+ t = get_time() - (double) data_lookup->value.ui32;
+ }
+ info.uptime = t;
}
-void prepare_update()
-{
- kstat_updated = 0;
+
+void update_meminfo(void) {
+
+ static int meminfo_updated;
+ if (meminfo_updated) return;
+ meminfo_updated = 1;
+
+ struct anoninfo ai;
+
+ long swapalloc, swapresv, swapavail, swaptotal;
+ long page_size;
+ long num_pages;
+ long free_pages;
+ longlong_t fmem;
+ longlong_t free_mem;
+ page_size = sysconf (_SC_PAGESIZE);
+ num_pages = sysconf (_SC_PHYS_PAGES);
+ free_pages = sysconf (_SC_AVPHYS_PAGES);
+ fmem = (longlong_t) ((longlong_t) num_pages * (longlong_t) page_size);
+ free_mem = (longlong_t) free_pages * (longlong_t) page_size;
+
+ fmem /= ONE_KB;
+ free_mem /= ONE_KB;
+ memmax = fmem;
+ info.memmax = fmem;
+ info.mem = memmax - free_mem;
+ info.memeasyfree = info.memfree = info.memmax - info.mem;
+
+ swapctl( SC_AINFO, &ai);
+ swapalloc = ai.ani_max - ai.ani_free;
+ swapalloc *= page_size;
+ swapresv = ai.ani_resv + ai.ani_free - ai.ani_max;
+ swapresv *= page_size;
+ swapavail = ai.ani_max - ai.ani_resv;
+ swapavail *= page_size;
+ swaptotal = ai.ani_max;
+ swaptotal *= page_size;
+
+ info.swap = swapalloc + swapresv;
+ info.swapmax = swaptotal;
+ info.swapfree = swapavail;
+
+ info.swapfree /= ONE_KB;
+ info.swap /= ONE_KB;
+ info.swapmax /= ONE_KB;
+
}
-double get_uptime()
+void get_cpu_count(void)
+{
+ info.cpu_count = 1;
+ info.cpu_usage = malloc(info.cpu_count * sizeof(float));
+ if (info.cpu_usage == NULL) {
+ fprintf(stderr, "malloc");
+ }
+}
+
+
+void update_cpu_usage(void) {
+
+ double t, delta;
+
+ t = get_time();
+
+ delta = t - last_cpu_calc_time;
+
+ if(delta <= 0.05) return;
+
+ last_cpu_calc_time = t;
+
+ cpu_stat_t *cpu_stat;
+
+ update_kstat();
+
+ ksp = kstat_lookup(kc, "cpu_stat", 0, "cpu_stat0");
+
+ if (kstat_read(kc, ksp, NULL) != -1) {
+ cpu_stat = (cpu_stat_t *)ksp->ks_data;
+ cpu_idle =cpu_stat->cpu_sysinfo.cpu[CPU_IDLE];
+
+ cpu_user=cpu_stat->cpu_sysinfo.cpu[CPU_USER];
+ cpu_nice=cpu_stat->cpu_sysinfo.cpu[CPU_WAIT];
+ cpu_system = cpu_stat->cpu_sysinfo.cpu[CPU_KERNEL] ;
+ }
+
+ info.cpu_count = 1;
+ info.cpu_usage = malloc(info.cpu_count * sizeof(float));
+ info.cpu_usage[0] = (cpu_user + cpu_nice + cpu_system - last_cpu_sum) / delta / 100.0;
+ last_cpu_sum = cpu_user + cpu_nice + cpu_system;
+}
+
+
+
+
+void update_total_processes(void) {
+
+ int nproc=0;
+
+ update_kstat();
+
+ ksp = kstat_lookup(kc, "unix", 0, "system_misc");
+ if (kstat_read(kc, ksp, 0) != -1) {
+ data_lookup = kstat_data_lookup(ksp, "nproc");
+ if (data_lookup)
+ nproc = data_lookup->value.ui32;
+ }
+
+ info.procs = nproc;
+}
+
+void update_running_processes(void) {
+ static struct utmp *utmpp;
+ int uproc = 0;
+ setutent();
+ while ((utmpp = getutent()) != NULL) {
+ if (utmpp->ut_type == USER_PROCESS && utmpp->ut_name[0] != '\0')
+ uproc++;
+ }
+ info.run_procs = uproc;
+}
+
+
+
+void update_net_stats(void)
{
- kstat_t *ksp;
+ struct net_stat *ns;
- update_kstat();
+ double delta;
+ long long r, t, last_recv, last_trans;
- ksp = kstat_lookup(kstat, "unix", -1, "system_misc");
- if (ksp != NULL) {
- if (kstat_read(kstat, ksp, NULL) >= 0) {
- kstat_named_t *knp;
-
- knp = (kstat_named_t *) kstat_data_lookup(ksp, "boot_time");
- if (knp != NULL) {
- return get_time() - (double) knp->value.ui32;
- }
- }
+ /* get delta */
+ delta = current_update_time - last_update_time;
+ if (delta <= 0.0001) {
+ return;
}
+
+
+ char buf[1024];
+ struct ifconf ifc;
+ struct ifreq *ifr;
+ int sock;
+ int nInterfaces;
+ int i;
+
+
+ sock = socket(AF_INET, SOCK_DGRAM, 0);
+ if(sock < 0)
+ {
+ fprintf(stderr,"socket");
+ return;
+ }
+
+ /* Query available interfaces. */
+ ifc.ifc_len = sizeof(buf);
+ ifc.ifc_buf = buf;
+ if(ioctl(sock, SIOCGIFCONF, &ifc) < 0)
+ {
+ fprintf(stderr,"ioctl(SIOCGIFCONF)");
+ close(sock);
+ return;
+ }
+
+ /* Iterate through the list of interfaces. */
+ ifr = ifc.ifc_req;
+ nInterfaces = ifc.ifc_len / sizeof(struct ifreq);
+ for(i = 0; i < nInterfaces; i++) {
+
+ struct ifreq *item = &ifr[i];
+ if (strcmp(item->ifr_name,"lo0") == 0)
+ continue;
+
+ ns = get_net_stat((const char *) item->ifr_name, NULL, NULL);
+
+
+ ns->up = 1;
+ last_recv = ns->recv;
+ last_trans = ns->trans;
+
+ if (item->ifr_flags & IFF_LOOPBACK)
+ continue;
+
+ memcpy(&(ns->addr), &item->ifr_addr, sizeof(item->ifr_addr));
+
+
+ ksp = kstat_lookup(kc, NULL, -1, item->ifr_name);
+ if (kstat_read(kc, ksp, 0) == -1)
+ fprintf(stderr,"kstat read");
+ data_lookup = kstat_data_lookup(ksp, "rbytes");
+ if (data_lookup)
+ r = (long long) data_lookup->value.ui32;
+ data_lookup = kstat_data_lookup(ksp, "obytes");
+ if (data_lookup)
+ t =(long long) data_lookup->value.ui32;
+
+
+ if (r < ns->last_read_recv) {
+ ns->recv += ((long long) 4294967295U - ns->last_read_recv) + r;
+ } else {
+ ns->recv += (r - ns->last_read_recv);
+ }
+
+ ns->last_read_recv = r;
+ if (t < ns->last_read_trans) {
+ ns->trans += ((long long) 4294967295U - ns->last_read_trans) + t;
+ } else {
+ ns->trans += (t - ns->last_read_trans);
+ }
+
+ ns->last_read_trans = t;
+
+ ns->recv_speed = (ns->recv - last_recv) / delta;
+ ns->trans_speed = (ns->trans - last_trans) / delta;
+
+ }
+
+ close(sock);
+
}
-void update_meminfo()
+double get_load_average1()
{
- /* TODO */
+ double avenrun[LOADAVG_NSTATS], fload = 0;
+ if (getloadavg(avenrun, LOADAVG_NSTATS) > 0)
+ fload = avenrun[LOADAVG_1MIN];
+ return fload;
}
-
-int check_mount(char *s)
+double get_load_average5()
+{
+ double avenrun[LOADAVG_NSTATS], fload = 0;
+ if (getloadavg(avenrun, LOADAVG_NSTATS) > 0)
+ fload = avenrun[LOADAVG_5MIN];
+ return fload;
+}
+double get_load_average15()
{
- /* stub */
- return 0;
+ double avenrun[LOADAVG_NSTATS], fload = 0;
+ if (getloadavg(avenrun, LOADAVG_NSTATS) > 0)
+ fload = avenrun[LOADAVG_15MIN];
+ return fload;
+}
+
+void update_load_average(void) {
+
+ info.loadavg[0] = get_load_average1();
+ info.loadavg[1] = get_load_average5();
+ info.loadavg[2] = get_load_average15();
+}
+
+int check_mount(char *s)
+{
+ /* stub */
+ return 0;
}
+
+void free_all_processes(void)
+{
+}
conkyrc # Conky settings #
background no
update_interval 1
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
no_buffers yes
text_buffer_size 2048
#imlib_cache_size 0
temperature_unit fahrenheit
# Window specifications #
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
minimum_size 200 250
maximum_width 200
alignment tr
gap_x 35
gap_y 55
# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
# Text settings #
use_xft yes
xftfont caviar dreams:size=8
xftalpha 0.5
uppercase no
temperature_unit celsius
default_color FFFFFF
# Lua Load #
lua_load ~/.lua/scripts/clock_rings.lua
lua_draw_hook_pre clock_rings
TEXT
${voffset 8}${color 3399FF}${font caviar dreams:size=16}${time %A}${font}${voffset -8}${alignr 50}${color FFFFFF}${font caviar dreams:size=32}${time %e}${font}
${color FFFFFF}${voffset -30}${color 3399FF}${font caviar dreams:size=18}${time %b}${font}${voffset -3} ${color FFFFFF}${font caviar dreams:size=20}${time %Y}${font}${color 3399FF}${hr}
${voffset 140}${font caviar dreams:size=10}${alignr}Home${font}
${font caviar dreams:size=12}${color FFFFFF}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ ULLI temperature temperature 30} °C${font}
${color 3399FF}${voffset 6}${sysname}${alignr}${kernel}${machine}
Uptime:$alignr${color FFFFFF}$uptime_short
${color FFFFFF}${goto 25}${voffset 35}${cpu cpu0}%
${color 3399FF}${goto 25}CPU
${color FFFFFF}${goto 50}${voffset 23}${memperc}%
${color 3399FF}${goto 50}RAM
${color FFFFFF}${goto 75}${voffset 23}${swapperc}%
${color 3399FF}${goto 75}SWAP
${color FFFFFF}${goto 100}${voffset 23}${fs_used_perc /}%
${color 3399FF}${goto 100}Disk
${color FFFFFF}${goto 125}${voffset 25}${upspeed rtls0}
${color FFFFFF}${goto 125}${downspeed rtls0}
${color 3399FF}${goto 125}Netclock_rings.lua --[[
Clock Rings by londonali1010 (2009) Edited by jpope
This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script.
IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num>5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num>3; conversely if you update Conky every 0.5s, you should use update_num>10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.
To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
lua_load ~/scripts/clock_rings.lua
lua_draw_hook_pre clock_rings
Changelog:
+ v1.0 -- Original release (30.09.2009)
v1.1p -- Jpope edit (05.10.2009)
]]
settings_table = {
{
-- Edit this table to customise your rings.
-- You can create more rings simply by adding more elements to settings_table.
-- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
name='time',
-- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
arg='%I.%M',
-- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
max=12,
-- "bg_colour" is the colour of the base ring.
bg_colour=0xffffff,
-- "bg_alpha" is the alpha value of the base ring.
bg_alpha=0.1,
-- "fg_colour" is the colour of the indicator part of the ring.
fg_colour=0x3399cc,
-- "fg_alpha" is the alpha value of the indicator part of the ring.
fg_alpha=0.2,
-- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
x=100, y=150,
-- "radius" is the radius of the ring.
radius=50,
-- "thickness" is the thickness of the ring, centred around the radius.
thickness=5,
-- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
start_angle=0,
-- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger than start_angle.
end_angle=360
},
{
name='time',
arg='%M.%S',
max=60,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0x3399cc,
fg_alpha=0.4,
x=100, y=150,
radius=56,
thickness=5,
start_angle=0,
end_angle=360
},
{
name='time',
arg='%S',
max=60,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0x3399cc,
fg_alpha=0.6,
x=100, y=150,
radius=62,
thickness=5,
start_angle=0,
end_angle=360
},
{
name='time',
arg='%d',
max=31,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0x3399cc,
fg_alpha=0.8,
x=100, y=150,
radius=70,
thickness=5,
start_angle=-90,
end_angle=90
},
{
name='time',
arg='%m',
max=12,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0x3399cc,
fg_alpha=1,
x=100, y=150,
radius=76,
thickness=5,
start_angle=-90,
end_angle=90
},
{
name='cpu',
arg='cpu0',
max=100,
bg_colour=0xffffff,
bg_alpha=0.2,
fg_colour=0xffff00,
fg_alpha=0.4,
x=50, y=300,
radius=25,
thickness=5,
start_angle=-90,
end_angle=180
},
{
name='memperc',
arg='',
max=100,
bg_colour=0xffffff,
bg_alpha=0.2,
fg_colour=0x33ccff,
fg_alpha=0.8,
x=75, y=350,
radius=25,
thickness=5,
start_angle=-90,
end_angle=180
},
{
name='swapperc',
arg='',
max=100,
bg_colour=0xffffff,
bg_alpha=0.2,
fg_colour=0x33ccff,
fg_alpha=0.8,
x=100, y=400,
radius=25,
thickness=5,
start_angle=-90,
end_angle=180
},
{
name='fs_used_perc',
arg='/',
max=100,
bg_colour=0xffffff,
bg_alpha=0.2,
fg_colour=0x3399cc,
fg_alpha=0.3,
x=125, y=450,
radius=25,
thickness=5,
start_angle=-90,
end_angle=180
},
{
name='upspeedf',
arg='rtls0',
max=100,
bg_colour=0xffff33,
bg_alpha=0.2,
fg_colour=0xffff33,
fg_alpha=0.3,
x=150, y=500,
radius=25,
thickness=4,
start_angle=-90,
end_angle=180
},
{
name='downspeedf',
arg='rtls0',
max=100,
bg_colour=0xccff33,
bg_alpha=0.2,
fg_colour=0xccff33,
fg_alpha=0.3,
x=150, y=500,
radius=20,
thickness=4,
start_angle=-90,
end_angle=180
},
}
-- Use these settings to define the origin and extent of your clock.
clock_r=65
-- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.
clock_x=100
clock_y=150
show_seconds=true
require 'cairo'
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function draw_ring(cr,t,pt)
local w,h=conky_window.width,conky_window.height
local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']
local angle_0=sa*(2*math.pi/360)-math.pi/2
local angle_f=ea*(2*math.pi/360)-math.pi/2
local t_arc=t*(angle_f-angle_0)
-- Draw background ring
cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
cairo_set_line_width(cr,ring_w)
cairo_stroke(cr)
-- Draw indicator ring
cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
cairo_stroke(cr)
end
function draw_clock_hands(cr,xc,yc)
local secs,mins,hours,secs_arc,mins_arc,hours_arc
local xh,yh,xm,ym,xs,ys
secs=os.date("%S")
mins=os.date("%M")
hours=os.date("%I")
secs_arc=(2*math.pi/60)*secs
mins_arc=(2*math.pi/60)*mins+secs_arc/60
hours_arc=(2*math.pi/12)*hours+mins_arc/12
-- Draw hour hand
xh=xc+0.7*clock_r*math.sin(hours_arc)
yh=yc-0.7*clock_r*math.cos(hours_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xh,yh)
cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
cairo_set_line_width(cr,5)
cairo_set_source_rgba(cr,0.2,0.6,1,0.4)
cairo_stroke(cr)
-- Draw minute hand
xm=xc+clock_r*math.sin(mins_arc)
ym=yc-clock_r*math.cos(mins_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xm,ym)
cairo_set_line_width(cr,3)
cairo_stroke(cr)
-- Draw seconds hand
if show_seconds then
xs=xc+clock_r*math.sin(secs_arc)
ys=yc-clock_r*math.cos(secs_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xs,ys)
cairo_set_line_width(cr,1)
cairo_stroke(cr)
end
end
function conky_clock_rings()
local function setup_rings(cr,pt)
local str=''
local value=0
str=string.format('${%s %s}',pt['name'],pt['arg'])
str=conky_parse(str)
value=tonumber(str)
pct=value/pt['max']
draw_ring(cr,pct,pt)
end
-- Check that Conky has been running for at least 5s
if conky_window==nil then return end
local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
local cr=cairo_create(cs)
local updates=conky_parse('${updates}')
update_num=tonumber(updates)
if update_num>5 then
for i in pairs(settings_table) do
setup_rings(cr,settings_table[i])
end
end
draw_clock_hands(cr,clock_x,clock_y)
end
Don’t forget to install tolua, tolua+ and tolua++ . |
||
|
Anmeldungsdatum: Beiträge: 275 |
Moin ihr conky-Freunde... Ich hatte unter 10.04. banshee als Player, bin jetzt aber auf 12.04. umgestiegen und möchte auch ganz gerne Rhythmbox nutzen. Unter Banshee konnte ich mit conkyBanshee Sachen wie Interpret, Album, usw. direkt ausgeben. Für Rhythmbox finde ich keine Config, die das ermöglicht. Ich kann zwar einfach ausgeben lassen was gerade gespielt wird, aber eben nicht formatiert. Hat so etwas jemand am laufen und würde den Code posten? Hier mal was ich für banshee hatte: ${if_running banshee-1}
${font Impact:size=10:}MUSIKPLAYER${font}
Interpret:$alignr${execi 10 conkyBanshee --datatype=AR}
Titel:$alignr${execi 10 conkyBanshee --datatype=TI}
Album:$alignr${execi 10 conkyBanshee --datatype=AL}
Dauer:$alignr${execi 10 conkyBanshee --datatype=PT} / ${execi 10 conkyRhythmbox --datatype=LE}
${execibar 10 conkyBanshee --datatype=PP}
${endif}Das PPA "conkyhardcore" gibt es übrigens nicht mehr für 12.04. Man muss das PPA conky-companions nehmen. Gruß |
||
|
Anmeldungsdatum: Beiträge: 418 Wohnort: Hessen |
Hi, Ist vielleicht hier was du suchst: https://launchpad.net/~conky-companions/+archive/ppa?field.series_filter=precise |
||
|
Anmeldungsdatum: Beiträge: 275 |
Ne, das PPA hatte ich ja schon. Ich finde aber keine Codebeispiele wie ich das vernünftig in Conky einbinden kann.. Gruß |
||
|
Anmeldungsdatum: Beiträge: 275 |
Ich hab mir jetzt mal die Beispieldaten aus /usr/share/conkyrhythmbox/example einverleibt, komme aber trotzdem nicht weiter. Das aktuelle Paket "conkyRhythmbox" ist installiert. Der Part in meiner .conkyrc sieht so aus: ${if_running rhythmbox}
${font Impact:size=10:}MUSIKPLAYER${font}
${voffset 5}
Interpret: ${exec conkyRhythmbox --datatype=AR}
Titel: ${exec conkyRhythmbox --datatype=TI}
Album: ${exec conkyRhythmbox --datatype=AL}
${exec conkyRhythmbox --datatype=PT}/${exec conkyRhythmbox --datatype=LE}
${endif}Es wird aber nur "Unknown" ausgegeben. Weiß jemand was ich falsch mache? Danke und Gruß |
||
|
Anmeldungsdatum: Beiträge: 8 |
kann mir mal einer helfen es transparent zu bekommen? |
||
|
Anmeldungsdatum: Beiträge: 8 |
...Doppelpost sorry |
||
|
Anmeldungsdatum: Beiträge: 17 |
Meine .conkyrc Im Prinzip die gleiche wie hier, allerdings an meine Bedürfnisse angepasst # Conky settings #
background no
update_interval 1
override_utf8_locale yes
double_buffer yes
no_buffers yes
text_buffer_size 2048
# Window specifications #
own_window yes
own_window_class conky
own_window_transparent yes
own_window_hints undecorate,below,sticky,skip_taskbar,skip_pager
border_inner_margin 0
border_outer_margin 0
alignment bl
gap_x 100
gap_y 100
# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
# Text settings #
use_xft yes
xftalpha 0
text_buffer_size 2048
uppercase no
default_color FFFFFF
TEXT
${voffset 10}${font Ubuntu Light:size=100}${time %k:%M}${font}${voffset -10}
${voffset 10}${font Ubuntu Light:size=45}${time %A}, ${time %B} ${time %e}${font}${voffset -10}
${voffset 10}${font Ubuntu Light:size=10}cpu ${font Ubuntu Light:size=15}$cpu% ${offset 50}${voffset -5}${font Ubuntu Light:size=10}ram ${font Ubuntu Light:size=15}$memperc% ${offset 50}${voffset -5}${font Ubuntu Light:size=10}freq ${font Ubuntu Light:size=15}$freq MHz${voffset -10}
Das Ganze sieht im Einsatz dann so aus. |
||
|
Anmeldungsdatum: Beiträge: 991 Wohnort: /home/micha |
Hallo Ihr lieben, seit gestern abend bastel ich auch an meinem Conky herum und bin soweit auch schon sehr zufrieden. Was mich stört und ich es leider nicht weg bekomme, ist der Rahmen drum herum. Den will ich weg haben, denn wenn die Anzeigen die ich alle haben möchte dann eingebaut sind, will ich sie auf dem ganzen Desktop verteilen, da kann ich jedoch keinen Rahmen für gebrauchen. Wo liegt der Fehler:
Ich hab schon mit allen möglichen Einstellungen herumprobiert und die Wiki hier hat auch nicht wirklich geholfen. Wäre über Eure Tipps und Ideen dankbar. LG Lupo |
||
|
Anmeldungsdatum: Beiträge: 2222 Wohnort: /home |
Ich hab das so bei mir: # Create own window instead of using desktop (required in nautilus) own_window yes # If own_window is yes, you may use type normal, desktop or override own_window_type normal # Use pseudo transparency with own_window? own_window_transparent yes # If own_window_transparent is set to no, you can set the background colour here #own_window_colour hotpink # If own_window is yes, these window manager hints may be used own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager Linu74 |