* Added --quiet patch (thanks sceptik)
authorBrenden Matthews <brenden1@rty.ca>
Tue, 3 Jun 2008 21:01:40 +0000 (21:01 +0000)
committerBrenden Matthews <brenden1@rty.ca>
Tue, 3 Jun 2008 21:01:40 +0000 (21:01 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1123 7f574dfc-610e-0410-a909-a81674777703

AUTHORS
ChangeLog
README
doc/command_options.xml
doc/conky.1
src/conky.c

diff --git a/AUTHORS b/AUTHORS
index 6fa8c3c..9cf8097 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -271,6 +271,9 @@ Ryan Twitchell <tryan2 at rochester dot rr dot com>
 Mikko Sysikaski <sisu at users dot sourceforge dot net>
   prss.c and prss.h
 
+Sceptik <sceptik at users dot sourceforge dot net>
+  --quiet patch
+
 Stepan Zastupov <redchrom at gmail dot com>
   WiFi signal level detection support on FreeBSD
 
index 0744dc6..e904736 100644 (file)
--- 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 (file)
--- 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
index 4b43913..9dcbb65 100644 (file)
@@ -7,6 +7,13 @@
        </varlistentry>
 
        <varlistentry>
+               <term><command><option>-q | --quiet</option></command></term>
+               <listitem>
+                       Run Conky in 'quiet mode' (ie. no output)
+                       <para></para></listitem>
+       </varlistentry>
+
+       <varlistentry>
                <term><command><option>-a | --alignment=</option></command><option>ALIGNMENT</option></term>
                <listitem>
                        Text alignment on screen, {top,bottom,middle}_{left,right,middle} or none
index 9191862..fa27abf 100644 (file)
@@ -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
 
index 1875711..9af0d8c 100644 (file)
@@ -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"