From 8f8d5c1c8c914d4afb0dce3525b6313db73849c5 Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Tue, 3 Jun 2008 21:01:40 +0000 Subject: [PATCH] * Added --quiet patch (thanks sceptik) git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1123 7f574dfc-610e-0410-a909-a81674777703 --- AUTHORS | 3 +++ ChangeLog | 1 + README | 4 ++++ doc/command_options.xml | 7 +++++++ doc/conky.1 | 4 ++++ src/conky.c | 11 +++++++---- 6 files changed, 26 insertions(+), 4 deletions(-) diff --git a/AUTHORS b/AUTHORS index 6fa8c3c..9cf8097 100644 --- a/AUTHORS +++ b/AUTHORS @@ -271,6 +271,9 @@ Ryan Twitchell Mikko Sysikaski prss.c and prss.h +Sceptik + --quiet patch + Stepan Zastupov WiFi signal level detection support on FreeBSD diff --git a/ChangeLog b/ChangeLog index 0744dc6..e904736 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ 2008-06-03 * Added NVIDIA Graficcard support patch (thanks meissna) + * Added --quiet patch (thanks sceptik) 2008-05-30 * Simplified docs for color0-9 config settings and variables. diff --git a/README b/README index 21349b3..8126e99 100644 --- a/README +++ b/README @@ -90,6 +90,10 @@ OPTIONS Prints version and exits + -q | --quiet + Run Conky in 'quiet mode' (ie. no output) + + -a | --alignment=ALIGNMENT Text alignment on screen, {top,bottom,middle}_{left,right,mid- dle} or none diff --git a/doc/command_options.xml b/doc/command_options.xml index 4b43913..9dcbb65 100644 --- a/doc/command_options.xml +++ b/doc/command_options.xml @@ -7,6 +7,13 @@ + + + Run Conky in 'quiet mode' (ie. no output) + + + + Text alignment on screen, {top,bottom,middle}_{left,right,middle} or none diff --git a/doc/conky.1 b/doc/conky.1 index 9191862..fa27abf 100644 --- a/doc/conky.1 +++ b/doc/conky.1 @@ -83,6 +83,10 @@ Command line options override configurations defined in configuration file. Prints version and exits .TP +\fB\*(T<\fB\-q | \-\-quiet\fR\*(T>\fR +Run Conky in 'quiet mode' (ie. no output) + +.TP \fB\*(T<\fB\-a | \-\-alignment=\fR\*(T>\fR\*(T<\fBALIGNMENT\fR\*(T> Text alignment on screen, {top,bottom,middle}_{left,right,middle} or none diff --git a/src/conky.c b/src/conky.c index 1875711..9af0d8c 100644 --- a/src/conky.c +++ b/src/conky.c @@ -8591,7 +8591,7 @@ static void load_config_file(const char *f) } /* : means that character before that takes an argument */ -static const char *getopt_string = "vVdt:u:i:hc:" +static const char *getopt_string = "vVqdt:u:i:hc:" #ifdef X11 "x:y:w:a:f:" #ifdef OWN_WINDOW @@ -8679,13 +8679,16 @@ int main(int argc, char **argv) } current_config = strndup(optarg, max_user_text); break; - + case 'q': + freopen("/dev/null", "w", stderr); + break; case 'h': printf("Usage: %s [OPTION]...\n" - "Conky is a system monitor that renders text on desktop or to own transparent\n" - "window. Command line options will override configurations defined in config\n" + "Conky is a system monitor that renders text on desktop or to own transparent\n" + "window. Command line options will override configurations defined in config\n" "file.\n" " -v, --version version\n" + " -q, --quiet quiet mode\n" " -c, --config=FILE config file to load\n" " -d, --daemonize daemonize, fork to background\n" " -h, --help help\n" -- 1.7.9.5