1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-25 12:10:03 +00:00

Adds a variable if_xmms2_connected to hide objects when xmms2d is not

running (thanks Lassi)
This commit is contained in:
Lassi Selander 2008-12-07 00:22:05 -07:00 committed by Brenden Matthews
parent e4e9cf4311
commit 20b2d2f464
3 changed files with 26 additions and 0 deletions

View File

@ -3,6 +3,8 @@
http://git.omp.am/?p=conky.git;a=summary and you can clone the repo with:
git clone git://git.omp.am/conky.git
* Fix for wrong usage of strncat (thanks Pavol)
* Adds a variable if_xmms2_connected to hide objects when xmms2d is not
running (thanks Lassi)
2008-12-06
* Removed duplicate sanity check for diskio

View File

@ -2461,6 +2461,14 @@
Prints the song name in either the form "artist - title" or file name, depending on whats available
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>
<command><option>if_xmms2_connected</option></command>
</term>
<listitem>
Display everything between $if_xmms2_connected and the matching $endif if xmms2 is running.
<para></para></listitem>
</varlistentry>
<varlistentry>
<term>

View File

@ -1358,6 +1358,7 @@ enum text_object_type {
OBJ_xmms2_smart,
OBJ_xmms2_playlist,
OBJ_xmms2_timesplayed,
OBJ_if_xmms2_connected,
#endif
#ifdef AUDACIOUS
OBJ_audacious_status,
@ -4041,6 +4042,13 @@ static struct text_object *construct_text_object(const char *s,
END OBJ(xmms2_smart, INFO_XMMS2)
END OBJ(xmms2_playlist, INFO_XMMS2)
END OBJ(xmms2_timesplayed, INFO_XMMS2)
END OBJ(if_xmms2_connected, INFO_XMMS2)
if (blockdepth >= MAX_IF_BLOCK_DEPTH) {
CRIT_ERR("MAX_IF_BLOCK_DEPTH exceeded");
}
blockstart[blockdepth] = object_count;
obj->data.ifblock.pos = object_count + 2;
blockdepth++;
#endif
#ifdef AUDACIOUS
END OBJ(audacious_status, INFO_AUDACIOUS)
@ -6216,6 +6224,14 @@ static void generate_text_internal(char *p, int p_max_size,
cur->xmms2.title);
}
}
OBJ(if_xmms2_connected) {
if (cur->xmms2_conn_state == 1) {
if_jumped = 0;
} else {
i = obj->data.ifblock.pos;
if_jumped = 1;
}
}
#endif
#ifdef AUDACIOUS
OBJ(audacious_status) {