1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-26 00:28:25 +00:00

Changed $font behavior so that the font persists past the next newline. It can be set back to the default with $font with no args. (closes bug 1478676 on sf.net)

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@628 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2006-05-09 23:08:23 +00:00
parent 8365978b5e
commit adbacc9f25
6 changed files with 130 additions and 121 deletions

View File

@ -1,5 +1,10 @@
# $Id$
2006-05-09
* Changed $font behavior so that the font persists past the next
newline. It can be set back to the default with $font with no args.
(closes bug 1478676 on sf.net)
2006-05-08
* Added simple POP3/IMAP mail clients

9
README
View File

@ -544,8 +544,11 @@ VARIABLES
Same as execigraph, but takes an interval arg graphs values
font font
Specify a different font. Only applies to one line.
font (font)
Specify a different font. This new font will apply to the cur-
rent line and everything following. You can use a $font with no
arguments to change back to the default font (much like with
$color)
freq Returns CPU frequency in MHz
@ -1153,4 +1156,4 @@ AUTHORS
2006-04-23 conky(1)
2006-05-09 conky(1)

View File

@ -1,5 +1,5 @@
.\" -*- coding: us-ascii -*-
.TH conky 1 2006-04-23
.TH conky 1 2006-05-09
.SH NAME
conky \- A system monitor for X originally based on the torsmo code, but more kickass. It just keeps on given'er. Yeah.
.SH SYNOPSIS
@ -497,8 +497,8 @@ Same as execbar, except with an interval
Same as execigraph, but takes an interval arg graphs values
.TP
\fBfont\fR \fBfont\fR
Specify a different font. Only applies to one line.
\fBfont\fR \fB(font)\fR
Specify a different font. This new font will apply to the current line and everything following. You can use a $font with no arguments to change back to the default font (much like with $color)
.TP
\fBfreq\fR

View File

@ -16,7 +16,7 @@
<firstname>Brenden</firstname>
<surname>Matthews</surname>
</author>
<date>2006-04-23</date>
<date>2006-05-09</date>
</refentryinfo>
<refmeta>

View File

@ -354,10 +354,10 @@
<varlistentry>
<term>
<command><option>font</option></command>
<option>font</option>
<option>(font)</option>
</term>
<listitem>
Specify a different font. Only applies to one line.
Specify a different font. This new font will apply to the current line and everything following. You can use a $font with no arguments to change back to the default font (much like with $color)
<para></para></listitem>
</varlistentry>

View File

@ -497,14 +497,16 @@ static char *scan_font(const char *args)
if (args && sizeof(args) < 127) {
return strdup(args);
}
else {
/* else {
ERR("font scan failed, lets hope it doesn't mess stuff up");
}
we'll assume this means to use the default font now, like $color
}*/
return NULL;
}
#ifdef X11
static void new_font(char *buf, char * args) {
if (args) {
struct special_t *s = new_special(buf, FONT);
if (!s->font_added || strcmp(args, fonts[s->font_added].name)) {
int tmp = selected_font;
@ -513,6 +515,14 @@ static void new_font(char *buf, char * args) {
//set_font();
selected_font = tmp;
}
} else {
struct special_t *s = new_special(buf, FONT);
int tmp = selected_font;
selected_font = s->font_added = 0;
load_fonts();
//set_font();
selected_font = tmp;
}
}
#endif
@ -1057,15 +1067,6 @@ int register_thread(struct thread_info_s *new_thread)
return thread_count - 1;
}
void replace_thread(struct thread_info_s *new_thread, int pos) // this isn't even used anymore; oh wells
{
if (pos >= 0 && pos < MAX_THREADS) {
thread_list[pos] = new_thread;
} else {
ERR("thread position out of bounds");
}
}
#define MAXDATASIZE 1000
#define POP3 0
#define IMAP 1
@ -4524,9 +4525,9 @@ static void text_size_updater(char *s)
text_width = maximum_width;
text_height += h;
if (fontchange) {
/* if (fontchange) {
selected_font = 0;
}
}*/
}
#endif /* X11 */
@ -5127,9 +5128,9 @@ static void draw_line(char *s)
draw_string(s);
cur_y += font_descent();
if (fontchange) {
/* if (fontchange) {
selected_font = 0;
}
}*/
#endif /* X11 */
}